fixup for idf 5.0
This commit is contained in:
parent
9fed1cc47b
commit
2440b9b434
16 changed files with 82 additions and 82 deletions
|
@ -92,16 +92,16 @@ void sh1107_init(void)
|
|||
};
|
||||
|
||||
//Initialize non-SPI GPIOs
|
||||
gpio_pad_select_gpio(SH1107_DC);
|
||||
//gpio_pad_select_gpio(SH1107_DC);
|
||||
gpio_set_direction(SH1107_DC, GPIO_MODE_OUTPUT);
|
||||
gpio_pad_select_gpio(SH1107_RST);
|
||||
//gpio_pad_select_gpio(SH1107_RST);
|
||||
gpio_set_direction(SH1107_RST, GPIO_MODE_OUTPUT);
|
||||
|
||||
//Reset the display
|
||||
gpio_set_level(SH1107_RST, 0);
|
||||
vTaskDelay(100 / portTICK_RATE_MS);
|
||||
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||
gpio_set_level(SH1107_RST, 1);
|
||||
vTaskDelay(100 / portTICK_RATE_MS);
|
||||
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||
|
||||
//Send all the commands
|
||||
uint16_t cmd = 0;
|
||||
|
@ -109,7 +109,7 @@ void sh1107_init(void)
|
|||
sh1107_send_cmd(init_cmds[cmd].cmd);
|
||||
sh1107_send_data(init_cmds[cmd].data, init_cmds[cmd].databytes&0x1F);
|
||||
if (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