spi_lcd: make tjpgd example runnable on C2

This commit is contained in:
morris
2022-06-07 10:25:47 +08:00
parent c26bfae1fd
commit 8dd26e9e9f
3 changed files with 11 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 |
| ----------------- | ----- | -------- | -------- | -------- |
| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 |
| ----------------- | ----- | -------- | -------- | -------- | -------- |
## LCD tjpgd example

View File

@@ -7,4 +7,11 @@ menu "Example Configuration"
help
This option can be chosen when using 8-line lcd.
config EXAMPLE_LCD_FLUSH_PARALLEL_LINES
int "LCD flush parallel lines"
default 12 if IDF_TARGET_ESP32C2
default 16
help
To speed up transfers, every SPI transfer sends a bunch of lines.
endmenu

View File

@@ -5,6 +5,7 @@
*/
#include <stdio.h>
#include "sdkconfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_lcd_panel_io.h"
@@ -20,7 +21,7 @@
// To speed up transfers, every SPI transfer sends a bunch of lines. This define specifies how many.
// More means more memory use, but less overhead for setting up / finishing transfers. Make sure 240
// is dividable by this.
#define PARALLEL_LINES 12
#define PARALLEL_LINES CONFIG_EXAMPLE_LCD_FLUSH_PARALLEL_LINES
// The number of frames to show before rotate the graph
#define ROTATE_FRAME 30