esp32s2: Add claim_pin_number
In ParallelImageCapture we need to grab a group of pins by number
This commit is contained in:
parent
1d03ec12b5
commit
3e83834621
|
@ -96,6 +96,13 @@ void reset_all_pins(void) {
|
|||
in_use[1] = 0;
|
||||
}
|
||||
|
||||
void claim_pin_number(gpio_num_t pin_number) {
|
||||
if (pin_number == NO_PIN) {
|
||||
return;
|
||||
}
|
||||
in_use[pin_number / 32] |= (1 << (pin_number % 32));
|
||||
}
|
||||
|
||||
void claim_pin(const mcu_pin_obj_t *pin) {
|
||||
in_use[pin->number / 32] |= (1 << (pin->number % 32));
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ void reset_all_pins(void);
|
|||
void reset_pin_number(gpio_num_t pin_number);
|
||||
void common_hal_reset_pin(const mcu_pin_obj_t *pin);
|
||||
void claim_pin(const mcu_pin_obj_t *pin);
|
||||
void claim_pin_number(gpio_num_t pin_number);
|
||||
bool pin_number_is_free(gpio_num_t pin_number);
|
||||
void never_reset_pin_number(gpio_num_t pin_number);
|
||||
|
||||
|
|
Loading…
Reference in New Issue