PPP: Add CYW43 wireless.
If we're bringing in lwip and networking, this variant might as well support CYW43.
This commit is contained in:
parent
fd7621fdcb
commit
544f1cae8c
4
.github/workflows/micropython.yml
vendored
4
.github/workflows/micropython.yml
vendored
@ -30,9 +30,9 @@ jobs:
|
|||||||
- name: pico_plus2_rp2350_psram
|
- name: pico_plus2_rp2350_psram
|
||||||
board: PIMORONI_PICO_PLUS2
|
board: PIMORONI_PICO_PLUS2
|
||||||
variant: PSRAM
|
variant: PSRAM
|
||||||
- name: pico_plus2_rp2350_psram_n_ppp
|
- name: pico_plus2_rp2350_wireless
|
||||||
board: PIMORONI_PICO_PLUS2
|
board: PIMORONI_PICO_PLUS2
|
||||||
variant: PPP
|
variant: WIRELESS
|
||||||
- name: pico_plus2_rp2350
|
- name: pico_plus2_rp2350
|
||||||
board: PIMORONI_PICO_PLUS2
|
board: PIMORONI_PICO_PLUS2
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
require("bundle-networking")
|
require("bundle-networking")
|
||||||
|
|
||||||
|
# Bluetooth
|
||||||
|
require("aioble")
|
||||||
|
|
||||||
include("manifest.py")
|
include("manifest.py")
|
||||||
|
|
||||||
freeze("$(BOARD_DIR)/../../modules_py", "lte.py")
|
freeze("$(BOARD_DIR)/../../modules_py", "lte.py")
|
||||||
@ -7,19 +7,39 @@
|
|||||||
|
|
||||||
#define MICROPY_HW_PSRAM_CS_PIN PIMORONI_PICO_PLUS2_PSRAM_CS_PIN
|
#define MICROPY_HW_PSRAM_CS_PIN PIMORONI_PICO_PLUS2_PSRAM_CS_PIN
|
||||||
|
|
||||||
#ifdef PPP_ENABLE_PPP
|
// Might be defined in mpconfigvariant_PSRAM.cmake
|
||||||
|
// or mpconfigvariant_PPP.cmake
|
||||||
|
#if defined(MICROPY_HW_ENABLE_PSRAM)
|
||||||
|
|
||||||
// Enable networking.
|
#define MICROPY_GC_SPLIT_HEAP (1)
|
||||||
#define MICROPY_PY_NETWORK 1
|
|
||||||
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "Pico"
|
|
||||||
|
|
||||||
#define MICROPY_PY_NETWORK_PPP_LWIP 1
|
#endif
|
||||||
|
|
||||||
#define MICROPY_HW_NIC_PPP { MP_ROM_QSTR(MP_QSTR_PINT), MP_ROM_PTR(&mp_network_ppp_lwip_type) },
|
// Set up networking.
|
||||||
|
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "PPP2"
|
||||||
|
|
||||||
|
#if defined(MICROPY_PY_NETWORK_CYW43)
|
||||||
|
|
||||||
|
// CYW43 driver configuration.
|
||||||
|
#define CYW43_USE_SPI (1)
|
||||||
|
#define CYW43_LWIP (1)
|
||||||
|
#define CYW43_GPIO (1)
|
||||||
|
#define CYW43_SPI_PIO (1)
|
||||||
|
|
||||||
|
#define MICROPY_HW_PIN_EXT_COUNT CYW43_WL_GPIO_COUNT
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Might be defined in mpconfigvariant_PPP.cmake
|
||||||
|
// This is not checked by mpconfigport.h so we must set up networking below
|
||||||
|
#if defined(MICROPY_PY_NETWORK_PPP_LWIP)
|
||||||
|
|
||||||
|
// TODO: This should be upstreamed to mpconfigport.h
|
||||||
|
#define MICROPY_HW_NIC_PPP { MP_ROM_QSTR(MP_QSTR_PPP), MP_ROM_PTR(&mp_network_ppp_lwip_type) },
|
||||||
|
|
||||||
#define MICROPY_BOARD_NETWORK_INTERFACES \
|
#define MICROPY_BOARD_NETWORK_INTERFACES \
|
||||||
MICROPY_HW_NIC_PPP
|
MICROPY_HW_NIC_PPP
|
||||||
|
|
||||||
#define MICROPY_PY_SOCKET_EXTENDED_STATE 1
|
#define MICROPY_PY_SOCKET_EXTENDED_STATE (1)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -1,11 +0,0 @@
|
|||||||
# Override the MicroPython board name
|
|
||||||
list(APPEND MICROPY_DEF_BOARD
|
|
||||||
"MICROPY_HW_ENABLE_PSRAM=1"
|
|
||||||
"MICROPY_GC_SPLIT_HEAP=1"
|
|
||||||
"MICROPY_HW_BOARD_NAME=\"Pimoroni Pico Plus 2 (LTE + PSRAM)\""
|
|
||||||
"PPP_ENABLE_PPP=1"
|
|
||||||
)
|
|
||||||
|
|
||||||
set(MICROPY_PY_LWIP ON)
|
|
||||||
|
|
||||||
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest-ppp.py)
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
# Override the MicroPython board name
|
# Override the MicroPython board name
|
||||||
|
# And set basic options which are expanded upon in mpconfigboard.h
|
||||||
list(APPEND MICROPY_DEF_BOARD
|
list(APPEND MICROPY_DEF_BOARD
|
||||||
"MICROPY_HW_ENABLE_PSRAM=1"
|
|
||||||
"MICROPY_GC_SPLIT_HEAP=1"
|
|
||||||
"MICROPY_HW_BOARD_NAME=\"Pimoroni Pico Plus 2 (PSRAM)\""
|
"MICROPY_HW_BOARD_NAME=\"Pimoroni Pico Plus 2 (PSRAM)\""
|
||||||
|
"MICROPY_HW_ENABLE_PSRAM=1"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -0,0 +1,36 @@
|
|||||||
|
# Override the MicroPython board name
|
||||||
|
# And set basic options which are expanded upon in mpconfigboard.h
|
||||||
|
list(APPEND MICROPY_DEF_BOARD
|
||||||
|
"MICROPY_HW_BOARD_NAME=\"Pimoroni Pico Plus 2 (Wireless + PSRAM)\""
|
||||||
|
"MICROPY_HW_ENABLE_PSRAM=1"
|
||||||
|
"MICROPY_PY_NETWORK=1"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Links micropy_lib_lwip and sets MICROPY_PY_LWIP = 1
|
||||||
|
# Picked up and expanded upon in mpconfigboard.h
|
||||||
|
set(MICROPY_PY_LWIP ON)
|
||||||
|
|
||||||
|
# Links cyw43-driver and sets:
|
||||||
|
# MICROPY_PY_NETWORK_CYW43 = 1,
|
||||||
|
# MICROPY_PY_SOCKET_DEFAULT_TIMEOUT_MS = 30000
|
||||||
|
set(MICROPY_PY_NETWORK_CYW43 ON)
|
||||||
|
|
||||||
|
# Adds mpbthciport.c
|
||||||
|
# And sets:
|
||||||
|
# MICROPY_PY_BLUETOOTH = 1,
|
||||||
|
# MICROPY_PY_BLUETOOTH_USE_SYNC_EVENTS = 1,
|
||||||
|
# MICROPY_PY_BLUETOOTH_ENABLE_CENTRAL_MODE = 1
|
||||||
|
set(MICROPY_PY_BLUETOOTH ON)
|
||||||
|
|
||||||
|
# Links pico_btstack_hci_transport_cyw43
|
||||||
|
# And sets:
|
||||||
|
# MICROPY_BLUETOOTH_BTSTACK = 1,
|
||||||
|
# MICROPY_BLUETOOTH_BTSTACK_CONFIG_FILE =
|
||||||
|
set(MICROPY_BLUETOOTH_BTSTACK ON)
|
||||||
|
|
||||||
|
# Sets:
|
||||||
|
# CYW43_ENABLE_BLUETOOTH = 1,
|
||||||
|
# MICROPY_PY_BLUETOOTH_CYW43 = 1
|
||||||
|
set(MICROPY_PY_BLUETOOTH_CYW43 ON)
|
||||||
|
|
||||||
|
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest-wireless.py)
|
||||||
@ -44,4 +44,9 @@ GP44,GPIO44
|
|||||||
GP45,GPIO45
|
GP45,GPIO45
|
||||||
GP46,GPIO46
|
GP46,GPIO46
|
||||||
GP47,GPIO47
|
GP47,GPIO47
|
||||||
LED,GPIO25
|
LED,GPIO25
|
||||||
|
SPICE_TX,GPIO32
|
||||||
|
SPICE_RX,GPIO33
|
||||||
|
SPICE_NETLIGHT,GPIO34
|
||||||
|
SPICE_RESET,GPIO35
|
||||||
|
SPICE_PWRKEY,GPIO36
|
||||||
|
Loading…
Reference in New Issue
Block a user