Merge pull request #4679 from t-ikegami/wio_add_pin_assign

Add DAC* and RTL_* pin assignments to Wio Terminal board.
This commit is contained in:
Scott Shawcroft 2021-05-03 11:08:28 -07:00 committed by GitHub
commit 25ccd5d8f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 48 additions and 0 deletions

View File

@ -34,3 +34,12 @@
// USB is always used internally so skip the pin objects for it.
#define IGNORE_PIN_PA24 1
#define IGNORE_PIN_PA25 1
#define IGNORE_PIN_PA00 1 // XIN32
#define IGNORE_PIN_PA01 1 // XOUT32
#define IGNORE_PIN_PA03 1 // VREFA (VCC3V3)
#define IGNORE_PIN_PA23 1 // NC
#define IGNORE_PIN_PB15 1 // NC
#define IGNORE_PIN_PB22 1 // XIN
#define IGNORE_PIN_PB23 1 // XOUT
#define IGNORE_PIN_PC00 1 // NC (for XOSC32K)

View File

@ -83,6 +83,27 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_GYROSCOPE_SDA), MP_ROM_PTR(&pin_PA13) },
{ MP_ROM_QSTR(MP_QSTR_GYROSCOPE_INT), MP_ROM_PTR(&pin_PC21) },
// DAC
{ MP_OBJ_NEW_QSTR(MP_QSTR_DAC0), MP_ROM_PTR(&pin_PA02) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_DAC1), MP_ROM_PTR(&pin_PA05) },
// I2S
{ MP_OBJ_NEW_QSTR(MP_QSTR_I2S_LRCLK), MP_ROM_PTR(&pin_PA20) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_I2S_SDIN), MP_ROM_PTR(&pin_PA21) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_I2S_SDOUT), MP_ROM_PTR(&pin_PA22) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_I2S_BLCK), MP_ROM_PTR(&pin_PB16) },
// RTL8720D
{ MP_OBJ_NEW_QSTR(MP_QSTR_RTL_PWR), MP_ROM_PTR(&pin_PA18) }, // CHIP_PU
{ MP_OBJ_NEW_QSTR(MP_QSTR_RTL_RXD), MP_ROM_PTR(&pin_PC22) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_RTL_TXD), MP_ROM_PTR(&pin_PC23) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_RTL_MOSI), MP_ROM_PTR(&pin_PB24) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_RTL_CLK), MP_ROM_PTR(&pin_PB25) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_RTL_MISO), MP_ROM_PTR(&pin_PC24) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_RTL_CS), MP_ROM_PTR(&pin_PC25) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_RTL_READY), MP_ROM_PTR(&pin_PC20) }, // IRQ0
{ MP_OBJ_NEW_QSTR(MP_QSTR_RTL_DIR), MP_ROM_PTR(&pin_PA19) }, // SYNC
// Comm objects
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },

View File

@ -268,6 +268,24 @@ STATIC const mp_rom_map_elem_t mcu_pin_global_dict_table[] = {
#if defined(PIN_PB23) && !defined(IGNORE_PIN_PB23)
{ MP_ROM_QSTR(MP_QSTR_PB23), MP_ROM_PTR(&pin_PB23) },
#endif
#if defined(PIN_PB24) && !defined(IGNORE_PIN_PB24)
{ MP_ROM_QSTR(MP_QSTR_PB24), MP_ROM_PTR(&pin_PB24) },
#endif
#if defined(PIN_PB25) && !defined(IGNORE_PIN_PB25)
{ MP_ROM_QSTR(MP_QSTR_PB25), MP_ROM_PTR(&pin_PB25) },
#endif
#if defined(PIN_PB26) && !defined(IGNORE_PIN_PB26)
{ MP_ROM_QSTR(MP_QSTR_PB26), MP_ROM_PTR(&pin_PB26) },
#endif
#if defined(PIN_PB27) && !defined(IGNORE_PIN_PB27)
{ MP_ROM_QSTR(MP_QSTR_PB27), MP_ROM_PTR(&pin_PB27) },
#endif
#if defined(PIN_PB28) && !defined(IGNORE_PIN_PB28)
{ MP_ROM_QSTR(MP_QSTR_PB28), MP_ROM_PTR(&pin_PB28) },
#endif
#if defined(PIN_PB29) && !defined(IGNORE_PIN_PB29)
{ MP_ROM_QSTR(MP_QSTR_PB29), MP_ROM_PTR(&pin_PB29) },
#endif
#if defined(PIN_PB30) && !defined(IGNORE_PIN_PB30)
{ MP_ROM_QSTR(MP_QSTR_PB30), MP_ROM_PTR(&pin_PB30) },
#endif