2018-12-01 04:54:18 -05:00
|
|
|
#include "shared-bindings/board/__init__.h"
|
|
|
|
|
2019-01-17 18:15:59 -05:00
|
|
|
#include "supervisor/shared/board_busses.h"
|
2018-12-01 04:54:18 -05:00
|
|
|
|
|
|
|
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_03) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_04) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_28) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_P0_29) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_P0_30) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_P0_31) },
|
|
|
|
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&pin_P0_11) },
|
|
|
|
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_P0_05) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_P0_05) },
|
|
|
|
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_CHARGE_STATUS), MP_ROM_PTR(&pin_P1_09) },
|
|
|
|
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_NFC1), MP_ROM_PTR(&pin_P0_09) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_NFC2), MP_ROM_PTR(&pin_P0_10) },
|
|
|
|
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_P1_01) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P1_02) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_P1_08) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_P1_10) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_P1_11) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_P1_12) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P1_12) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_P1_03) },
|
|
|
|
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_RGB_LED_RED), MP_ROM_PTR(&pin_P0_13) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_RGB_LED_GREEN), MP_ROM_PTR(&pin_P0_14) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_RGB_LED_BLUE), MP_ROM_PTR(&pin_P0_15) },
|
|
|
|
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_P1_15) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P1_15) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_P1_13) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P1_13) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_P1_14) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P1_14) },
|
|
|
|
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_P0_06) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P0_06) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_P0_08) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P0_08) },
|
|
|
|
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_P0_27) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_27) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P0_26) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_26) },
|
|
|
|
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_ANTENNA_EXTERNAL), MP_ROM_PTR(&pin_P0_25) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_ANTENNA_PCB), MP_ROM_PTR(&pin_P0_24) },
|
2019-02-24 09:34:33 -05:00
|
|
|
|
|
|
|
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-01 04:54:18 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);
|