Skip to content

Commit 7663cb9

Browse files
committed
wk-50 - include standard neopixel reset code
1 parent ce0217e commit 7663cb9

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

ports/raspberrypi/boards/wk-50/board.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,13 @@
55
// SPDX-License-Identifier: MIT
66

77
#include "supervisor/board.h"
8+
#include "shared-bindings/microcontroller/Pin.h"
9+
#include "src/rp2_common/hardware_gpio/include/hardware/gpio.h"
10+
#include "supervisor/shared/board.h"
11+
12+
void reset_board(void) {
13+
// turn off any left over LED
14+
board_reset_user_neopixels(&pin_GPIO0, 58);
15+
}
816

917
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

ports/raspberrypi/boards/wk-50/mpconfigboard.h

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

99
#define MICROPY_HW_BOARD_NAME "WK-50 Trackball Keyboard"
1010
#define MICROPY_HW_MCU_NAME "rp2040"
11+
12+
#define MICROPY_HW_NEOPIXEL (&pin_GPIO0)

ports/raspberrypi/boards/wk-50/pins.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
static const mp_rom_map_elem_t board_module_globals_table[] = {
1010
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
1111

12-
{ MP_ROM_QSTR(MP_QSTR_ARGB), MP_ROM_PTR(&pin_GPIO0) },
12+
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO0) },
1313
{ MP_ROM_QSTR(MP_QSTR_COL13), MP_ROM_PTR(&pin_GPIO1) },
1414

1515
// { MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2) },

0 commit comments

Comments
 (0)