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:
Peter Harper
2024-10-09 18:03:55 +01:00
committed by Damien George
parent 30163e0ae4
commit 4a6c246008
3 changed files with 12 additions and 1 deletions

View File

@@ -210,5 +210,6 @@ enum {
void mp_hal_get_mac(int idx, uint8_t buf[6]);
void mp_hal_get_mac_ascii(int idx, size_t chr_off, size_t chr_len, char *dest);
void mp_hal_generate_laa_mac(int idx, uint8_t buf[6]);
int mp_hal_is_pin_reserved(int n);
#endif // MICROPY_INCLUDED_RP2_MPHALPORT_H