Added LDO control pin and initial setup

This commit is contained in:
Pontus Oldberg 2022-12-11 13:01:00 +01:00
parent b6276265c1
commit da413094f8
2 changed files with 8 additions and 0 deletions

View File

@ -25,5 +25,12 @@
*/
#include "supervisor/board.h"
#include "nrf_gpio.h"
#define PORTPIN(x, y) (x * 32 + y)
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.
void board_init(void) {
nrf_gpio_cfg_output(PORTPIN(1, 9));
nrf_gpio_pin_write(PORTPIN(1, 9), 1);
}

View File

@ -32,6 +32,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_P0_06) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_P1_08) },
{ MP_ROM_QSTR(MP_QSTR_LDO_CONTROL), MP_ROM_PTR(&pin_P1_09) },
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_12) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_11) },