Skip to content

Commit

Permalink
Added I2C support and removed backlight pin
Browse files Browse the repository at this point in the history
  • Loading branch information
lovrojakic committed Jul 9, 2024
1 parent 3e11e8a commit 39ca7f0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ports/espressif/boards/vidi_x/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void board_init(void) {
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
display_init_sequence,
sizeof(display_init_sequence),
&pin_GPIO14, // backlight pin
NULL, // backlight pin
NO_BRIGHTNESS_COMMAND,
1.0f, // brightness
false, // single_byte_bounds
Expand Down
3 changes: 3 additions & 0 deletions ports/espressif/boards/vidi_x/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
#define CIRCUITPY_BOARD_SPI (1)
#define CIRCUITPY_BOARD_SPI_PIN {{.clock = &pin_GPIO18, .mosi = &pin_GPIO23, .miso = &pin_GPIO19}}

#define CIRCUITPY_BOARD_I2C (1)
#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO32, .sda = &pin_GPIO33}}

#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0)

// Explanation of how a user got into safe mode
Expand Down
2 changes: 2 additions & 0 deletions ports/espressif/boards/vidi_x/pins.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_EXP26), MP_ROM_PTR(&pin_GPIO39) },

{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) },

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

0 comments on commit 39ca7f0

Please sign in to comment.