fix nonetype handling and nrf never reset

This commit is contained in:
Scott Shawcroft 2019-01-17 18:51:40 -08:00
parent 6404aaf411
commit fddc98858a
No known key found for this signature in database
GPG Key ID: FD0EDC4B6C53CA59
2 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ void reset_all_pins(void) {
}
for (uint32_t pin = 0; pin < NUMBER_OF_PINS; ++pin) {
if (!(never_reset_pins[nrf_pin_port(pin)] & (1 << nrf_relative_pin_number(pin)))) {
if ((never_reset_pins[nrf_pin_port(pin)] & (1 << nrf_relative_pin_number(pin))) != 0) {
continue;
}
nrf_gpio_cfg_default(pin);

View File

@ -13,7 +13,7 @@ primary_display_t displays[CIRCUITPY_DISPLAY_LIMIT];
void displayio_refresh_displays(void) {
for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) {
if (displays[i].display.base.type == NULL) {
if (displays[i].display.base.type == NULL || displays[i].display.base.type == &mp_type_NoneType) {
continue;
}
displayio_display_obj_t* display = &displays[i].display;