Skip to content

Commit 39ca7f0

Browse files
committed
Added I2C support and removed backlight pin
1 parent 3e11e8a commit 39ca7f0

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

ports/espressif/boards/vidi_x/board.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ void board_init(void) {
9898
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
9999
display_init_sequence,
100100
sizeof(display_init_sequence),
101-
&pin_GPIO14, // backlight pin
101+
NULL, // backlight pin
102102
NO_BRIGHTNESS_COMMAND,
103103
1.0f, // brightness
104104
false, // single_byte_bounds

ports/espressif/boards/vidi_x/mpconfigboard.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
#define CIRCUITPY_BOARD_SPI (1)
3535
#define CIRCUITPY_BOARD_SPI_PIN {{.clock = &pin_GPIO18, .mosi = &pin_GPIO23, .miso = &pin_GPIO19}}
3636

37+
#define CIRCUITPY_BOARD_I2C (1)
38+
#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO32, .sda = &pin_GPIO33}}
39+
3740
#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0)
3841

3942
// Explanation of how a user got into safe mode

ports/espressif/boards/vidi_x/pins.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
103103
{ MP_ROM_QSTR(MP_QSTR_EXP26), MP_ROM_PTR(&pin_GPIO39) },
104104

105105
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
106+
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
107+
{ MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) },
106108

107109
{ MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)},
108110
};

0 commit comments

Comments
 (0)