mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 12:10:13 +01:00
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>
26 lines
843 B
C
26 lines
843 B
C
// Board and hardware specific configuration
|
|
#define MICROPY_HW_BOARD_NAME "Raspberry Pi Pico W"
|
|
|
|
// todo: We need something to check our binary size
|
|
#define MICROPY_HW_FLASH_STORAGE_BYTES (848 * 1024)
|
|
|
|
// Enable networking.
|
|
#define MICROPY_PY_NETWORK 1
|
|
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "PicoW"
|
|
|
|
// CYW43 driver configuration.
|
|
#define CYW43_USE_SPI (1)
|
|
#define CYW43_LWIP (1)
|
|
#define CYW43_GPIO (1)
|
|
#define CYW43_SPI_PIO (1)
|
|
|
|
// For debugging mbedtls - also set
|
|
// Debug level (0-4) 1=warning, 2=info, 3=debug, 4=verbose
|
|
// #define MODUSSL_MBEDTLS_DEBUG_LEVEL 1
|
|
|
|
#define MICROPY_HW_PIN_EXT_COUNT CYW43_WL_GPIO_COUNT
|
|
|
|
// 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)
|