mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 01:40:14 +01:00
renesas-ra: Add networking support using lwIP.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
This commit is contained in:
committed by
Damien George
parent
142e8b70e2
commit
62e650f2c2
@@ -126,6 +126,7 @@
|
||||
#define MICROPY_PY_TIME_GMTIME_LOCALTIME_MKTIME (1)
|
||||
#define MICROPY_PY_TIME_TIME_TIME_NS (1)
|
||||
#define MICROPY_PY_TIME_INCLUDEFILE "ports/renesas-ra/modtime.c"
|
||||
#define MICROPY_PY_LWIP_SOCK_RAW (MICROPY_PY_LWIP)
|
||||
#ifndef MICROPY_PY_MACHINE
|
||||
#define MICROPY_PY_MACHINE (1)
|
||||
#ifndef MICROPY_PY_MACHINE_BITSTREAM
|
||||
@@ -168,6 +169,25 @@
|
||||
#define MICROPY_FATFS_MAX_SS (FLASH_SECTOR_SIZE)
|
||||
#endif
|
||||
|
||||
// By default networking should include sockets, ssl, websockets, webrepl, dupterm.
|
||||
#if MICROPY_PY_NETWORK
|
||||
#ifndef MICROPY_PY_NETWORK_HOSTNAME_DEFAULT
|
||||
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "mpy-ra"
|
||||
#endif
|
||||
#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_WEBREPL
|
||||
#define MICROPY_PY_WEBREPL (1)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if MICROPY_PY_MACHINE
|
||||
#define MACHINE_BUILTIN_MODULE_CONSTANTS \
|
||||
{ MP_ROM_QSTR(MP_QSTR_machine), MP_ROM_PTR(&mp_module_machine) },
|
||||
@@ -181,6 +201,21 @@
|
||||
|
||||
#define MP_STATE_PORT MP_STATE_VM
|
||||
|
||||
#if MICROPY_PY_NETWORK_ESP_HOSTED
|
||||
extern const struct _mp_obj_type_t mod_network_esp_hosted_type;
|
||||
#define MICROPY_HW_NIC_ESP_HOSTED { MP_ROM_QSTR(MP_QSTR_WLAN), MP_ROM_PTR(&mod_network_esp_hosted_type) },
|
||||
#else
|
||||
#define MICROPY_HW_NIC_ESP_HOSTED
|
||||
#endif
|
||||
|
||||
#ifndef MICROPY_BOARD_NETWORK_INTERFACES
|
||||
#define MICROPY_BOARD_NETWORK_INTERFACES
|
||||
#endif
|
||||
|
||||
#define MICROPY_PORT_NETWORK_INTERFACES \
|
||||
MICROPY_HW_NIC_ESP_HOSTED \
|
||||
MICROPY_BOARD_NETWORK_INTERFACES \
|
||||
|
||||
// Miscellaneous settings
|
||||
|
||||
#ifndef MICROPY_HW_USB_VID
|
||||
@@ -269,6 +304,10 @@ static inline mp_uint_t disable_irq(void) {
|
||||
#define MICROPY_THREAD_YIELD()
|
||||
#endif
|
||||
|
||||
#define MICROPY_PY_LWIP_ENTER
|
||||
#define MICROPY_PY_LWIP_REENTER
|
||||
#define MICROPY_PY_LWIP_EXIT
|
||||
|
||||
#ifndef MICROPY_PY_BLUETOOTH_ENABLE_CENTRAL_MODE
|
||||
#define MICROPY_PY_BLUETOOTH_ENABLE_CENTRAL_MODE (1)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user