mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 01:40:14 +01:00
rp2/mphalport: Add mp_hal_is_pin_reserved() function.
As cyw43 pins might be dynamic, add a function that returns if a pin is reserved. This is used by `MICROPY_HW_PIN_RESERVED` to prevent the pin IRQ from being reset across a soft-reset. Signed-off-by: Peter Harper <peter.harper@raspberrypi.com>
This commit is contained in:
committed by
Damien George
parent
30163e0ae4
commit
4a6c246008
@@ -20,4 +20,6 @@
|
||||
|
||||
#define MICROPY_HW_PIN_EXT_COUNT CYW43_WL_GPIO_COUNT
|
||||
|
||||
#define MICROPY_HW_PIN_RESERVED(i) ((i) == CYW43_PIN_WL_HOST_WAKE || (i) == CYW43_PIN_WL_REG_ON)
|
||||
// If this returns true for a pin then its irq will not be disabled on a soft reboot
|
||||
int mp_hal_is_pin_reserved(int n);
|
||||
#define MICROPY_HW_PIN_RESERVED(i) mp_hal_is_pin_reserved(i)
|
||||
|
||||
Reference in New Issue
Block a user