updated pin defs
This commit is contained in:
parent
4cad5beb90
commit
53f4137d6f
|
@ -26,34 +26,7 @@
|
|||
|
||||
#include "supervisor/board.h"
|
||||
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "py/obj.h"
|
||||
#include "peripherals/nrf/pins.h"
|
||||
#include "supervisor/shared/board.h"
|
||||
|
||||
#include "nrf_gpio.h"
|
||||
|
||||
void board_init(void) {
|
||||
// Turn on power to sensors and neopixels.
|
||||
nrf_gpio_cfg(POWER_SWITCH_PIN->number,
|
||||
NRF_GPIO_PIN_DIR_OUTPUT,
|
||||
NRF_GPIO_PIN_INPUT_DISCONNECT,
|
||||
NRF_GPIO_PIN_NOPULL,
|
||||
NRF_GPIO_PIN_S0S1,
|
||||
NRF_GPIO_PIN_NOSENSE);
|
||||
nrf_gpio_pin_write(POWER_SWITCH_PIN->number, true);
|
||||
}
|
||||
|
||||
void board_deinit(void) {
|
||||
// Turn off power to sensors and neopixels.
|
||||
nrf_gpio_cfg(POWER_SWITCH_PIN->number,
|
||||
NRF_GPIO_PIN_DIR_OUTPUT,
|
||||
NRF_GPIO_PIN_INPUT_DISCONNECT,
|
||||
NRF_GPIO_PIN_NOPULL,
|
||||
NRF_GPIO_PIN_S0S1,
|
||||
NRF_GPIO_PIN_NOSENSE);
|
||||
nrf_gpio_pin_write(POWER_SWITCH_PIN->number, false);
|
||||
}
|
||||
|
||||
bool board_requests_safe_mode(void) {
|
||||
|
@ -61,5 +34,5 @@ bool board_requests_safe_mode(void) {
|
|||
}
|
||||
|
||||
void reset_board(void) {
|
||||
board_reset_user_neopixels(&pin_P0_7, 1);
|
||||
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#define MICROPY_HW_BOARD_NAME "BlueMicro833"
|
||||
#define MICROPY_HW_MCU_NAME "nRF52833"
|
||||
|
||||
#define MICROPY_HW_NEOPIXEL (&pin_P0_7)
|
||||
#define MICROPY_HW_NEOPIXEL (&pin_P0_07)
|
||||
#define MICROPY_HW_LED_STATUS (&pin_P0_25)
|
||||
|
||||
#define CIRCUITPY_INTERNAL_NVM_SIZE 0
|
||||
|
|
|
@ -10,6 +10,8 @@ INTERNAL_FLASH_FILESYSTEM = 1
|
|||
CIRCUITPY_AESIO = 0
|
||||
CIRCUITPY_ALARM = 0
|
||||
CIRCUITPY_AUDIOMP3 = 0
|
||||
CIRCUITPY_AUDIOBUSIO = 0
|
||||
CIRCUITPY_AUDIOMIXER = 0
|
||||
CIRCUITPY_BINASCII = 0
|
||||
CIRCUITPY_BITBANGIO = 0
|
||||
CIRCUITPY_BITMAPTOOLS = 0
|
||||
|
|
|
@ -53,4 +53,4 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
|
|||
{ MP_ROM_QSTR(MP_QSTR_BUTTON4), MP_ROM_PTR(&pin_P0_25) },
|
||||
};
|
||||
|
||||
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);
|
||||
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);
|
Loading…
Reference in New Issue