rp2/mpconfigport: Make networking options consistent across boards.

Enable the same set of networking features on boards with wifi/ethernet.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
Jim Mussared 2022-07-11 10:45:04 +10:00 committed by Damien George
parent 662dc8602b
commit c5563aa024
4 changed files with 25 additions and 11 deletions

View File

@ -4,13 +4,8 @@
#define MICROPY_HW_BOARD_NAME "Arduino Nano RP2040 Connect" #define MICROPY_HW_BOARD_NAME "Arduino Nano RP2040 Connect"
#define MICROPY_HW_FLASH_STORAGE_BYTES (8 * 1024 * 1024) #define MICROPY_HW_FLASH_STORAGE_BYTES (8 * 1024 * 1024)
// Enable networking and sockets. // Enable networking.
#define MICROPY_PY_NETWORK (1) #define MICROPY_PY_NETWORK (1)
#define MICROPY_PY_USOCKET (1)
#define MICROPY_PY_WEBREPL (1)
#define MICROPY_PY_UWEBSOCKET (1)
#define MICROPY_PY_UHASHLIB_SHA1 (1)
#define MICROPY_PY_OS_DUPTERM (1)
// Disable internal error numbers. // Disable internal error numbers.
#define MICROPY_USE_INTERNAL_ERRNO (0) #define MICROPY_USE_INTERNAL_ERRNO (0)

View File

@ -4,9 +4,8 @@
// todo: We need something to check our binary size // todo: We need something to check our binary size
#define MICROPY_HW_FLASH_STORAGE_BYTES (848 * 1024) #define MICROPY_HW_FLASH_STORAGE_BYTES (848 * 1024)
// Enable networking.
#define MICROPY_PY_NETWORK 1 #define MICROPY_PY_NETWORK 1
#define MICROPY_PY_USOCKET 1
#define MICROPY_PY_USSL 1
// CYW43 driver configuration. // CYW43 driver configuration.
#define CYW43_USE_SPI (1) #define CYW43_USE_SPI (1)

View File

@ -4,10 +4,8 @@
#define MICROPY_HW_BOARD_NAME "W5100S-EVB-Pico" #define MICROPY_HW_BOARD_NAME "W5100S-EVB-Pico"
#define MICROPY_HW_FLASH_STORAGE_BYTES (1408 * 1024) #define MICROPY_HW_FLASH_STORAGE_BYTES (1408 * 1024)
// Enable networking and sockets. // Enable networking.
#define MICROPY_PY_NETWORK (1) #define MICROPY_PY_NETWORK (1)
#define MICROPY_PY_USOCKET (1)
#define MICROPY_PY_USSL (1)
// Wiznet HW config. // Wiznet HW config.
#define MICROPY_HW_WIZNET_SPI_ID (0) #define MICROPY_HW_WIZNET_SPI_ID (0)

View File

@ -155,6 +155,28 @@ struct _mp_bluetooth_nimble_malloc_t;
#define MICROPY_PORT_ROOT_POINTER_BLUETOOTH_NIMBLE #define MICROPY_PORT_ROOT_POINTER_BLUETOOTH_NIMBLE
#endif #endif
// By default networking should include sockets, ssl, websockets, webrepl, dupterm.
#if MICROPY_PY_NETWORK
#ifndef MICROPY_PY_USOCKET
#define MICROPY_PY_USOCKET (1)
#endif
#ifndef MICROPY_PY_USSL
#define MICROPY_PY_USSL (1)
#endif
#ifndef MICROPY_PY_UWEBSOCKET
#define MICROPY_PY_UWEBSOCKET (1)
#endif
#ifndef MICROPY_PY_UHASHLIB_SHA1
#define MICROPY_PY_UHASHLIB_SHA1 (1)
#endif
#ifndef MICROPY_PY_WEBREPL
#define MICROPY_PY_WEBREPL (1)
#endif
#ifndef MICROPY_PY_OS_DUPTERM
#define MICROPY_PY_OS_DUPTERM (1)
#endif
#endif
#if MICROPY_PY_NETWORK_CYW43 #if MICROPY_PY_NETWORK_CYW43
extern const struct _mp_obj_type_t mp_network_cyw43_type; extern const struct _mp_obj_type_t mp_network_cyw43_type;
#define MICROPY_HW_NIC_CYW43 \ #define MICROPY_HW_NIC_CYW43 \