Merge pull request #6272 from dhalbert/feather_esp32_s2_tft-fix

Force pin 21 high; patch; need to diagnose further
This commit is contained in:
Dan Halbert 2022-04-09 23:21:44 -04:00 committed by GitHub
commit 4a65664c98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -71,6 +71,12 @@ uint8_t display_init_sequence[] = {
void board_init(void) {
// THIS SHOULD BE HANDLED BY espressif_board_reset_pin_number(), but it is not working.
// TEMPORARY FIX UNTIL IT'S DIAGNOSED.
common_hal_never_reset_pin(&pin_GPIO21);
gpio_set_direction(21, GPIO_MODE_DEF_OUTPUT);
gpio_set_level(21, true);
busio_spi_obj_t *spi = common_hal_board_create_spi(0);
displayio_fourwire_obj_t *bus = &displays[0].fourwire_bus;
bus->base.type = &displayio_fourwire_type;