fixes for idf 5.x
This commit is contained in:
parent
bc57b32d87
commit
f8b0f34a59
18 changed files with 84 additions and 83 deletions
|
@ -86,20 +86,20 @@ void st7789_init(void)
|
|||
};
|
||||
|
||||
//Initialize non-SPI GPIOs
|
||||
gpio_pad_select_gpio(ST7789_DC);
|
||||
gpio_reset_pin(ST7789_DC);
|
||||
gpio_set_direction(ST7789_DC, GPIO_MODE_OUTPUT);
|
||||
|
||||
#if !defined(ST7789_SOFT_RST)
|
||||
gpio_pad_select_gpio(ST7789_RST);
|
||||
gpio_reset_pin(ST7789_RST);
|
||||
gpio_set_direction(ST7789_RST, GPIO_MODE_OUTPUT);
|
||||
#endif
|
||||
|
||||
//Reset the display
|
||||
#if !defined(ST7789_SOFT_RST)
|
||||
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
|
||||
|
@ -112,7 +112,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++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue