Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32S2: pin_number_is_free should not check never_reset tables #4205

Merged
merged 1 commit into from
Feb 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ports/esp32s2/common-hal/microcontroller/Pin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down