Skip to content

Commit

Permalink
Merge branch 'bugfix/i80_lcd_reset_gpio_config' into 'master'
Browse files Browse the repository at this point in the history
fix(i80_lcd): reset cs gpio on exit

See merge request espressif/esp-idf!25209
  • Loading branch information
suda-morris committed Aug 7, 2023
2 parents 27eec5b + aacd7d8 commit 5748ce4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/esp_lcd/src/esp_lcd_panel_io_i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,11 @@ static esp_err_t panel_io_i80_del(esp_lcd_panel_io_t *io)
LIST_REMOVE(i80_device, device_list_entry);
portEXIT_CRITICAL(&bus->spinlock);

// reset CS GPIO
if (i80_device->cs_gpio_num >= 0) {
gpio_reset_pin(i80_device->cs_gpio_num);
}

ESP_LOGD(TAG, "del i80 lcd panel io @%p", i80_device);
vQueueDelete(i80_device->trans_queue);
vQueueDelete(i80_device->done_queue);
Expand Down
5 changes: 5 additions & 0 deletions components/esp_lcd/src/esp_lcd_panel_io_i80.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,11 @@ static esp_err_t panel_io_i80_del(esp_lcd_panel_io_t *io)
LIST_REMOVE(i80_device, device_list_entry);
portEXIT_CRITICAL(&bus->spinlock);

// reset CS to normal GPIO
if (i80_device->cs_gpio_num >= 0) {
gpio_reset_pin(i80_device->cs_gpio_num);
}

ESP_LOGD(TAG, "del i80 lcd panel io @%p", i80_device);
vQueueDelete(i80_device->trans_queue);
vQueueDelete(i80_device->done_queue);
Expand Down

0 comments on commit 5748ce4

Please sign in to comment.