fixup for idf 5.0

This commit is contained in:
Eric Poulsen 2023-03-20 16:45:30 -07:00
parent 9fed1cc47b
commit 2440b9b434
16 changed files with 82 additions and 82 deletions

View file

@ -88,25 +88,25 @@ void st7789_init(void)
};
//Initialize non-SPI GPIOs
gpio_pad_select_gpio(ST7789_DC);
//gpio_pad_select_gpio(ST7789_DC);
gpio_set_direction(ST7789_DC, GPIO_MODE_OUTPUT);
#if !defined(CONFIG_LV_DISP_ST7789_SOFT_RESET)
gpio_pad_select_gpio(ST7789_RST);
//gpio_pad_select_gpio(ST7789_RST);
gpio_set_direction(ST7789_RST, GPIO_MODE_OUTPUT);
#endif
#if ST7789_ENABLE_BACKLIGHT_CONTROL
gpio_pad_select_gpio(ST7789_BCKL);
//gpio_pad_select_gpio(ST7789_BCKL);
gpio_set_direction(ST7789_BCKL, GPIO_MODE_OUTPUT);
#endif
//Reset the display
#if !defined(CONFIG_LV_DISP_ST7789_SOFT_RESET)
gpio_set_level(ST7789_RST, 0);
vTaskDelay(100 / portTICK_RATE_MS);
vTaskDelay(100 / portTICK_PERIOD_MS);
gpio_set_level(ST7789_RST, 1);
vTaskDelay(100 / portTICK_RATE_MS);
vTaskDelay(100 / portTICK_PERIOD_MS);
#else
st7789_send_cmd(ST7789_SWRESET);
#endif
@ -119,7 +119,7 @@ void st7789_init(void)
st7789_send_cmd(st7789_init_cmds[cmd].cmd);
st7789_send_data(st7789_init_cmds[cmd].data, st7789_init_cmds[cmd].databytes&0x1F);
if (st7789_init_cmds[cmd].databytes & 0x80) {
vTaskDelay(100 / portTICK_RATE_MS);
vTaskDelay(100 / portTICK_PERIOD_MS);
}
cmd++;
}