Skip to content

Commit

Permalink
Config: Bring up WiFi/BT.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Aug 20, 2024
1 parent 2d9a93d commit 17f2ac1
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
6 changes: 5 additions & 1 deletion presto/manifest.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Board-specific frozen libs go here
# Board-specific frozen libs go here

require("bundle-networking")
require("sdcard")
require("aioble")
9 changes: 9 additions & 0 deletions presto/mpconfigboard.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ set(PICO_BOARD "presto")
set(PICO_PLATFORM "rp2350-arm-s")
set(PICO_NUM_GPIOS 48)

# WiFi
set(MICROPY_PY_LWIP ON)
set(MICROPY_PY_NETWORK_CYW43 ON)

# Bluetooth
set(MICROPY_PY_BLUETOOTH ON)
set(MICROPY_BLUETOOTH_BTSTACK ON)
set(MICROPY_PY_BLUETOOTH_CYW43 ON)

# Make sure we find pga2350.h (PICO_BOARD) in the current dir
set(PICO_BOARD_HEADER_DIRS ${CMAKE_CURRENT_LIST_DIR})

Expand Down
16 changes: 15 additions & 1 deletion presto/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,18 @@
#define MICROPY_PY_THREAD (0)

// TODO: Remove when https://github.com/micropython/micropython/pull/15655 is merged
#define core1_entry (NULL)
#define core1_entry (NULL)

// Enable networking.
#define MICROPY_PY_NETWORK 1
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT MICROPY_HW_BOARD_NAME

// 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

0 comments on commit 17f2ac1

Please sign in to comment.