Merge pull request #6094 from ladyada/main

fix missing pins, speed up
This commit is contained in:
Mark 2022-02-25 20:46:07 -06:00 committed by GitHub
commit bfd56d4380
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 8 deletions

View File

@ -41,13 +41,13 @@ displayio_fourwire_obj_t board_display_obj;
#define DELAY 0x80
uint8_t display_init_sequence[] = {
0x01, 0 | DELAY, 150, // SWRESET
0x11, 0 | DELAY, 255, // SLPOUT
0x01, 0 | DELAY, 120, // SWRESET
0x11, 0 | DELAY, 5, // SLPOUT
0x36, 1, 0b10100000, // _MADCTL for rotation 0
0x3a, 1, 0x55, // COLMOD - 16bit color
0x21, 0 | DELAY, 10, // _INVON
0x13, 0 | DELAY, 10, // _NORON
0x29, 0 | DELAY, 255, // _DISPON
0x21, 0, // _INVON
0x13, 0, // _NORON
0x29, 0 | DELAY, 5, // _DISPON
};
void board_init(void) {
@ -59,7 +59,7 @@ void board_init(void) {
&pin_GPIO39, // TFT_DC Command or data
&pin_GPIO40, // TFT_CS Chip select
&pin_GPIO41, // TFT_RESET Reset
5000000, // Baudrate
40000000, // Baudrate
0, // Polarity
0); // Phase

View File

@ -21,14 +21,16 @@ STATIC const mp_rom_obj_tuple_t camera_data_tuple = {
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
{ MP_ROM_QSTR(MP_QSTR_TFT_MOSI), MP_ROM_PTR(&pin_GPIO35) },
{ MP_ROM_QSTR(MP_QSTR_TFT_SCK), MP_ROM_PTR(&pin_GPIO36) },
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) },
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) },
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO37) },
{ MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_GPIO38) },
{ MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_GPIO39) },
{ MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_GPIO40) },
{ MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_GPIO41) },
{ MP_ROM_QSTR(MP_QSTR_CARD_CS), MP_ROM_PTR(&pin_GPIO4) },
{ MP_ROM_QSTR(MP_QSTR_CARD_POWER), MP_ROM_PTR(&pin_GPIO1) },
{ MP_ROM_QSTR(MP_QSTR_IRQ), MP_ROM_PTR(&pin_GPIO3) },