Skip to content

Commit

Permalink
Merge pull request #6094 from ladyada/main
Browse files Browse the repository at this point in the history
fix missing pins, speed up
  • Loading branch information
gamblor21 committed Feb 26, 2022
2 parents 01d8808 + a9d87e6 commit bfd56d4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
12 changes: 6 additions & 6 deletions ports/espressif/boards/adafruit_esp32s2_camera/board.c
Expand Up @@ -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) {
Expand All @@ -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

Expand Down
6 changes: 4 additions & 2 deletions ports/espressif/boards/adafruit_esp32s2_camera/pins.c
Expand Up @@ -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) },

Expand Down

0 comments on commit bfd56d4

Please sign in to comment.