Skip to content

Commit da41309

Browse files
committed
Added LDO control pin and initial setup
1 parent b627626 commit da41309

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

ports/nrf/boards/challenger_840/board.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,12 @@
2525
*/
2626

2727
#include "supervisor/board.h"
28+
#include "nrf_gpio.h"
29+
30+
#define PORTPIN(x, y) (x * 32 + y)
2831

2932
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.
33+
void board_init(void) {
34+
nrf_gpio_cfg_output(PORTPIN(1, 9));
35+
nrf_gpio_pin_write(PORTPIN(1, 9), 1);
36+
}

ports/nrf/boards/challenger_840/pins.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
3232
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_P0_06) },
3333

3434
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_P1_08) },
35+
{ MP_ROM_QSTR(MP_QSTR_LDO_CONTROL), MP_ROM_PTR(&pin_P1_09) },
3536

3637
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_12) },
3738
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_11) },

0 commit comments

Comments
 (0)