d73f390a4d
This also expose the battery control pin as BATTERY_ENABLE, so users can fully power off the keyboard.
51 lines
2.1 KiB
C
51 lines
2.1 KiB
C
#include "shared-bindings/board/__init__.h"
|
|
|
|
#include "supervisor/board.h"
|
|
#include "shared-module/displayio/__init__.h"
|
|
|
|
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
|
|
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_R1), MP_ROM_PTR(&pin_P0_05) },
|
|
{ MP_ROM_QSTR(MP_QSTR_R2), MP_ROM_PTR(&pin_P0_06) },
|
|
{ MP_ROM_QSTR(MP_QSTR_R3), MP_ROM_PTR(&pin_P0_07) },
|
|
{ MP_ROM_QSTR(MP_QSTR_R4), MP_ROM_PTR(&pin_P0_08) },
|
|
{ MP_ROM_QSTR(MP_QSTR_R5), MP_ROM_PTR(&pin_P1_09) },
|
|
{ MP_ROM_QSTR(MP_QSTR_R6), MP_ROM_PTR(&pin_P1_08) },
|
|
{ MP_ROM_QSTR(MP_QSTR_R7), MP_ROM_PTR(&pin_P0_12) },
|
|
{ MP_ROM_QSTR(MP_QSTR_R8), MP_ROM_PTR(&pin_P0_11) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_C1), MP_ROM_PTR(&pin_P0_19) },
|
|
{ MP_ROM_QSTR(MP_QSTR_C2), MP_ROM_PTR(&pin_P0_20) },
|
|
{ MP_ROM_QSTR(MP_QSTR_C3), MP_ROM_PTR(&pin_P0_21) },
|
|
{ MP_ROM_QSTR(MP_QSTR_C4), MP_ROM_PTR(&pin_P0_22) },
|
|
{ MP_ROM_QSTR(MP_QSTR_C5), MP_ROM_PTR(&pin_P0_23) },
|
|
{ MP_ROM_QSTR(MP_QSTR_C6), MP_ROM_PTR(&pin_P0_24) },
|
|
{ MP_ROM_QSTR(MP_QSTR_C7), MP_ROM_PTR(&pin_P0_25) },
|
|
{ MP_ROM_QSTR(MP_QSTR_C8), MP_ROM_PTR(&pin_P0_26) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_TXD), MP_ROM_PTR(&pin_P0_16) },
|
|
{ MP_ROM_QSTR(MP_QSTR_RXD), MP_ROM_PTR(&pin_P0_15) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P1_06) },
|
|
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P1_05) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_LED_R), MP_ROM_PTR(&pin_P0_30) },
|
|
{ MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_P0_29) },
|
|
{ MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_P0_31) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_BTN), MP_ROM_PTR(&pin_P0_27) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_CHARGING), MP_ROM_PTR(&pin_P0_03) },
|
|
{ MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_P0_02) },
|
|
{ MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_P0_02) },
|
|
{ MP_ROM_QSTR(MP_QSTR_BATTERY_ENABLE), MP_ROM_PTR(&pin_P0_28) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_RGB_POWER), MP_ROM_PTR(&pin_P1_04) },
|
|
|
|
// { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
|
|
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }
|
|
};
|
|
|
|
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);
|