@@ -67,20 +67,43 @@ STATIC const mp_rom_map_elem_t timings800_table[] = {
6767};
6868MP_DEFINE_CONST_DICT (timings800_dict , timings800_table );
6969
70+ STATIC const mp_rom_map_elem_t timings1024_table [] = {
71+ { MP_ROM_QSTR (MP_QSTR_frequency ), MP_ROM_INT (10000000 ) }, // nominal 16MHz, but display is unstable/tears at that frequency
72+ { MP_ROM_QSTR (MP_QSTR_width ), MP_ROM_INT (1024 ) },
73+ { MP_ROM_QSTR (MP_QSTR_height ), MP_ROM_INT (600 ) },
74+ { MP_ROM_QSTR (MP_QSTR_hsync_pulse_width ), MP_ROM_INT (30 ) },
75+ { MP_ROM_QSTR (MP_QSTR_hsync_front_porch ), MP_ROM_INT (210 ) },
76+ { MP_ROM_QSTR (MP_QSTR_hsync_back_porch ), MP_ROM_INT (16 ) },
77+ { MP_ROM_QSTR (MP_QSTR_hsync_idle_low ), MP_ROM_FALSE },
78+ { MP_ROM_QSTR (MP_QSTR_vsync_pulse_width ), MP_ROM_INT (13 ) },
79+ { MP_ROM_QSTR (MP_QSTR_vsync_front_porch ), MP_ROM_INT (22 ) },
80+ { MP_ROM_QSTR (MP_QSTR_vsync_back_porch ), MP_ROM_INT (10 ) },
81+ { MP_ROM_QSTR (MP_QSTR_vsync_idle_low ), MP_ROM_FALSE },
82+ { MP_ROM_QSTR (MP_QSTR_de_idle_high ), MP_ROM_FALSE },
83+ { MP_ROM_QSTR (MP_QSTR_pclk_active_high ), MP_ROM_FALSE },
84+ { MP_ROM_QSTR (MP_QSTR_pclk_idle_high ), MP_ROM_FALSE },
85+ };
86+ MP_DEFINE_CONST_DICT (timings1024_dict , timings1024_table );
87+
7088STATIC const mp_rom_map_elem_t board_module_globals_table [] = {
7189 CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
7290
7391 { MP_ROM_QSTR (MP_QSTR_TFT_PINS ), MP_ROM_PTR (& tft_pins_dict ) },
7492 { MP_ROM_QSTR (MP_QSTR_TFT_TIMINGS ), MP_ROM_PTR (& timings800_dict ) },
93+ { MP_ROM_QSTR (MP_QSTR_TFT_TIMINGS800 ), MP_ROM_PTR (& timings800_dict ) },
94+ { MP_ROM_QSTR (MP_QSTR_TFT_TIMINGS1024 ), MP_ROM_PTR (& timings1024_dict ) },
7595 { MP_ROM_QSTR (MP_QSTR_TFT_BACKLIGHT ), MP_ROM_PTR (& pin_GPIO10 ) },
7696
7797 // GPIO pins available on Mabee connector port (also shared with I2S & USB D+/D-)
7898 { MP_ROM_QSTR (MP_QSTR_GPIO20 ), MP_ROM_PTR (& pin_GPIO20 ) },
7999 { MP_ROM_QSTR (MP_QSTR_GPIO19 ), MP_ROM_PTR (& pin_GPIO19 ) },
80100
101+ // I2S pins are shared with USB D+/D-, these are only useful if USB is disabled
102+ #if CIRCUITPY_USB == 0
81103 { MP_ROM_QSTR (MP_QSTR_I2S_BIT_CLOCK ), MP_ROM_PTR (& pin_GPIO20 ) },
82104 { MP_ROM_QSTR (MP_QSTR_I2S_WORD_SELECT ), MP_ROM_PTR (& pin_GPIO2 ) },
83105 { MP_ROM_QSTR (MP_QSTR_I2S_DATA ), MP_ROM_PTR (& pin_GPIO19 ) },
106+ #endif
84107
85108 { MP_ROM_QSTR (MP_QSTR_TX ), MP_ROM_PTR (& pin_GPIO43 ) },
86109 { MP_ROM_QSTR (MP_QSTR_RX ), MP_ROM_PTR (& pin_GPIO44 ) },
@@ -89,16 +112,16 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
89112 { MP_ROM_QSTR (MP_QSTR_SDA ), MP_ROM_PTR (& pin_GPIO17 ) },
90113 { MP_ROM_QSTR (MP_QSTR_TOUCH_RESET ), MP_ROM_PTR (& pin_GPIO38 ) },
91114
92- { MP_ROM_QSTR (MP_QSTR_SDIO_CMD ), MP_ROM_PTR (& pin_GPIO11 ) },
93- { MP_ROM_QSTR (MP_QSTR_SDIO_D0 ), MP_ROM_PTR (& pin_GPIO13 ) },
94- { MP_ROM_QSTR (MP_QSTR_SDIO_CLK ), MP_ROM_PTR (& pin_GPIO12 ) },
115+ // IO10 <> SD_CS is cut at factory (non-placed resistor position R34) and pulled up.
116+ // Permanent SDIO 1-bit mode?
117+ // Until SDIO 1-bit mode is support on Espressif ports these pins aren't useful
118+ // { MP_ROM_QSTR(MP_QSTR_SDIO_CMD), MP_ROM_PTR(&pin_GPIO11) },
119+ // { MP_ROM_QSTR(MP_QSTR_SDIO_D0), MP_ROM_PTR(&pin_GPIO13) },
120+ // { MP_ROM_QSTR(MP_QSTR_SDIO_CLK), MP_ROM_PTR(&pin_GPIO12) },
95121
96122 // boot mode button can be used in SW as well
97123 { MP_ROM_QSTR (MP_QSTR_BUTTON ), MP_ROM_PTR (& pin_GPIO1 ) },
98124
99- // IO10 <> SD_CS is cut at factory (non-placed resistor position R34) and pulled up.
100- // Permanent SDIO 1-bit mode?
101-
102125 { MP_ROM_QSTR (MP_QSTR_I2C ), MP_ROM_PTR (& board_i2c_obj ) },
103126};
104127MP_DEFINE_CONST_DICT (board_module_globals , board_module_globals_table );
0 commit comments