Skip to content

Commit 9eb61ef

Browse files
committed
Enable WiFi, leave DV enable to usercode
1 parent d333ae9 commit 9eb61ef

File tree

5 files changed

+19
-28
lines changed

5 files changed

+19
-28
lines changed

ports/raspberrypi/boards/pimoroni_pico_dv_base_w/board.c

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,4 @@
2626

2727
#include "supervisor/board.h"
2828

29-
#include "bindings/picodvi/Framebuffer.h"
30-
#include "shared-module/displayio/__init__.h"
31-
#include "shared-bindings/framebufferio/FramebufferDisplay.h"
32-
33-
void board_init(void) {
34-
picodvi_framebuffer_obj_t *fb = &allocate_display_bus()->picodvi;
35-
fb->base.type = &picodvi_framebuffer_type;
36-
common_hal_picodvi_framebuffer_construct(fb, 320, 240,
37-
&pin_GPIO7, &pin_GPIO6,
38-
&pin_GPIO9, &pin_GPIO8,
39-
&pin_GPIO11, &pin_GPIO10,
40-
&pin_GPIO13, &pin_GPIO12,
41-
8);
42-
43-
framebufferio_framebufferdisplay_obj_t *display = &displays[0].framebuffer_display;
44-
display->base.type = &framebufferio_framebufferdisplay_type;
45-
common_hal_framebufferio_framebufferdisplay_construct(
46-
display,
47-
MP_OBJ_FROM_PTR(fb),
48-
0,
49-
true);
50-
}
51-
5229
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

ports/raspberrypi/boards/pimoroni_pico_dv_base_w/mpconfigboard.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@
66

77
#define DEFAULT_UART_BUS_RX (&pin_GPIO1)
88
#define DEFAULT_UART_BUS_TX (&pin_GPIO0)
9+
10+
#define MICROPY_HW_LED_STATUS (&pin_CYW0)

ports/raspberrypi/boards/pimoroni_pico_dv_base_w/mpconfigboard.mk

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,19 @@ CHIP_FAMILY = rp2
99
EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ"
1010

1111
CIRCUITPY__EVE = 1
12+
13+
CIRCUITPY_CYW43 = 1
14+
CIRCUITPY_SSL = 1
15+
CIRCUITPY_SSL_MBEDTLS = 1
16+
CIRCUITPY_HASHLIB = 1
17+
CIRCUITPY_WEB_WORKFLOW = 1
18+
CIRCUITPY_MDNS = 1
19+
CIRCUITPY_SOCKETPOOL = 1
20+
CIRCUITPY_WIFI = 1
21+
1222
CIRCUITPY_PICODVI = 1
1323

24+
CFLAGS += -DCYW43_PIN_WL_HOST_WAKE=24 -DCYW43_PIN_WL_REG_ON=23 -DCYW43_WL_GPIO_COUNT=3 -DCYW43_WL_GPIO_LED_PIN=0
1425
# Must be accompanied by a linker script change
1526
CFLAGS += -DCIRCUITPY_FIRMWARE_SIZE='(1536 * 1024)'
1627

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
11
// Put board-specific pico-sdk definitions here. This file must exist.
2-
3-
// Allow extra time for xosc to start.
4-
#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64

ports/raspberrypi/boards/pimoroni_pico_dv_base_w/pins.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
4444
{ MP_ROM_QSTR(MP_QSTR_SD_MISO), MP_ROM_PTR(&pin_GPIO19)},
4545
{ MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO22)},
4646

47+
{ MP_ROM_QSTR(MP_QSTR_SMPS_MODE), MP_ROM_PTR(&pin_CYW1) },
48+
49+
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_CYW0) },
50+
51+
{ MP_ROM_QSTR(MP_QSTR_VBUS_SENSE), MP_ROM_PTR(&pin_CYW2) },
52+
4753
{ MP_ROM_QSTR(MP_QSTR_I2S_WORD_SELECT), MP_ROM_PTR(&pin_GPIO26) },
4854
{ MP_ROM_QSTR(MP_QSTR_GP26_A0), MP_ROM_PTR(&pin_GPIO26) },
4955
{ MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) },
@@ -75,8 +81,6 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
7581
{ MP_ROM_QSTR(MP_QSTR_D2N), MP_ROM_PTR(&pin_GPIO12) },
7682
{ MP_ROM_QSTR(MP_QSTR_D2P), MP_ROM_PTR(&pin_GPIO13) },
7783
{ MP_ROM_QSTR(MP_QSTR_DV_HPD), MP_ROM_PTR(&pin_GPIO17) },
78-
79-
{ MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].framebuffer_display)},
8084
};
8185

8286
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);

0 commit comments

Comments
 (0)