Skip to content

ESP32-S2 Camera board: fix missing pins, speed up #6094

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions ports/espressif/boards/adafruit_esp32s2_camera/board.c
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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