Skip to content

Commit fddc988

Browse files
committed
fix nonetype handling and nrf never reset
1 parent 6404aaf commit fddc988

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

ports/nrf/common-hal/microcontroller/Pin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void reset_all_pins(void) {
5353
}
5454

5555
for (uint32_t pin = 0; pin < NUMBER_OF_PINS; ++pin) {
56-
if (!(never_reset_pins[nrf_pin_port(pin)] & (1 << nrf_relative_pin_number(pin)))) {
56+
if ((never_reset_pins[nrf_pin_port(pin)] & (1 << nrf_relative_pin_number(pin))) != 0) {
5757
continue;
5858
}
5959
nrf_gpio_cfg_default(pin);

shared-module/displayio/__init__.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ primary_display_t displays[CIRCUITPY_DISPLAY_LIMIT];
1313

1414
void displayio_refresh_displays(void) {
1515
for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) {
16-
if (displays[i].display.base.type == NULL) {
16+
if (displays[i].display.base.type == NULL || displays[i].display.base.type == &mp_type_NoneType) {
1717
continue;
1818
}
1919
displayio_display_obj_t* display = &displays[i].display;

0 commit comments

Comments
 (0)