a377302623
This provides a standard interface to setting the global networking config for all interfaces and interface types. For ports that already use either a static hostname (mimxrt, rp2) they will now use the configured value. The default is configured by the port (or optionally the board). For interfaces that previously supported .config(hostname), this is still supported but now implemented using the global network.hostname. Similarly, pyb.country and rp2.country are now deprecated, but the methods still exist (and forward to network.hostname). Because ESP32/ESP8266 do not use extmod/modnetwork.c they are not affected by this commit. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
24 lines
759 B
C
24 lines
759 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
|
|
|
|
#define MICROPY_HW_PIN_RESERVED(i) ((i) == CYW43_PIN_WL_HOST_WAKE || (i) == CYW43_PIN_WL_REG_ON)
|