is_free should not check never_reset

This commit is contained in:
Lucian Copeland 2021-02-15 10:29:05 -05:00
parent 766e79ad3d
commit 6d5ffc677b

View File

@ -134,7 +134,7 @@ bool pin_number_is_free(gpio_num_t pin_number) {
uint8_t offset = pin_number / 32;
uint32_t mask = 1 << (pin_number % 32);
return (never_reset_pins[offset] & mask) == 0 && (in_use[offset] & mask) == 0;
return (in_use[offset] & mask) == 0;
}
bool common_hal_mcu_pin_is_free(const mcu_pin_obj_t *pin) {