Skip to content

Commit 6eba74a

Browse files
committed
fix:根据要求重新优化代码
1 parent ce132e3 commit 6eba74a

File tree

5 files changed

+9
-90
lines changed

5 files changed

+9
-90
lines changed

.github/workflows/upload_component.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
bsp/esp32_s3_touch_lcd_4_3c;
3939
bsp/esp32_s3_touch_lcd_2_8d;
4040
bsp/esp32_s3_touch_lcd_1_83;
41+
bsp/esp32_s3_touch_amoled_1_32;
4142
bsp/esp32_c6_touch_amoled_2_06;
4243
sensor/qmi8658;
4344
sensor/pcf85063a;

bsp/esp32_s3_touch_amoled_1_32/Kconfig

Lines changed: 3 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -50,68 +50,18 @@ menu "Board Support Package"
5050
default 2
5151
help
5252
Supported max files for SPIFFS in the Virtual File System.
53-
endmenu
54-
55-
menu "uSD card - Virtual File System"
56-
config BSP_SD_FORMAT_ON_MOUNT_FAIL
57-
bool "Format uSD card if mounting fails"
58-
default n
59-
help
60-
The SDMMC host will format (FAT) the uSD card if it fails to mount the filesystem.
61-
62-
config BSP_SD_MOUNT_POINT
63-
string "uSD card mount point"
64-
default "/sdcard"
65-
help
66-
Mount point of the uSD card in the Virtual File System
6753

6854
endmenu
69-
menu "Display"
70-
config BSP_LCD_RGB_BOUNCE_BUFFER_HEIGHT
71-
int "RGB Bounce buffer height"
72-
default 20
73-
help
74-
Height of bounce buffer. The width of the buffer is the same as that of the LCD.
75-
config BSP_LCD_RGB_BUFFER_NUMS
76-
int "Set number of frame buffers"
77-
default 1
78-
range 1 3
79-
help
80-
Let DPI LCD driver create a specified number of frame-size buffers. Only when it is set to multiple can the avoiding tearing be turned on.
81-
82-
config BSP_DISPLAY_LVGL_AVOID_TEAR
83-
bool "Avoid tearing effect"
84-
depends on BSP_LCD_RGB_BUFFER_NUMS > 1
85-
default "n"
86-
help
87-
Avoid tearing effect through LVGL buffer mode and double frame buffers of RGB LCD. This feature is only available for RGB LCD.
88-
89-
choice BSP_DISPLAY_LVGL_MODE
90-
depends on BSP_DISPLAY_LVGL_AVOID_TEAR
91-
prompt "Select LVGL buffer mode"
92-
default BSP_DISPLAY_LVGL_FULL_REFRESH
93-
config BSP_DISPLAY_LVGL_FULL_REFRESH
94-
bool "Full refresh"
95-
config BSP_DISPLAY_LVGL_DIRECT_MODE
96-
bool "Direct mode"
97-
endchoice
98-
99-
config BSP_DISPLAY_BRIGHTNESS_LEDC_CH
100-
int "LEDC channel index"
101-
default 1
102-
range 0 7
103-
help
104-
LEDC channel is used to generate PWM signal that controls display brightness.
105-
Set LEDC index that should be used.
10655

56+
menu "Display"
10757
config BSP_DISPLAY_LVGL_BUF_HEIGHT
108-
depends on !BSP_DISPLAY_LVGL_AVOID_TEAR
10958
int "LVGL buffer height"
11059
default 100
11160
help
11261
Height of LVGL buffer. The width of the buffer is the same as that of the LCD.
62+
11363
endmenu
114-
64+
11565
config BSP_I2S_NUM
11666
int "I2S peripheral index"
11767
default 1

bsp/esp32_s3_touch_amoled_1_32/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
The ESP32-S3-Touch-AMOLED-1.32 is a 1.32-inch 466×466 capacitive touch development board designed by waveshare electronics.
66

7-
| HW version | BSP Version |
8-
|:---------------------------------------------------------------:| :---------: |
7+
| HW version | BSP Version |
8+
|:---------------------------------------------------------------: | :---------: |
99
| [V1.0](http://www.waveshare.com/wiki/ESP32-S3-Touch-AMOLED-1.32) | ^1 |

bsp/esp32_s3_touch_amoled_1_32/esp32_s3_touch_amoled_1_32.c

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -440,11 +440,7 @@ static lv_display_t *bsp_display_lcd_init()
440440
BSP_ERROR_CHECK_RETURN_NULL(bsp_display_new(&disp_config, &panel_handle, &io_handle));
441441

442442
int buffer_size = 0;
443-
#if CONFIG_BSP_DISPLAY_LVGL_AVOID_TEAR
444-
buffer_size = BSP_LCD_H_RES * BSP_LCD_V_RES;
445-
#else
446443
buffer_size = BSP_LCD_H_RES * LVGL_BUFFER_HEIGHT;
447-
#endif /* CONFIG_BSP_DISPLAY_LVGL_AVOID_TEAR */
448444

449445
const lvgl_port_display_cfg_t disp_cfg = {
450446
.io_handle = io_handle,
@@ -457,7 +453,6 @@ static lv_display_t *bsp_display_lcd_init()
457453
#if LVGL_VERSION_MAJOR >= 9
458454
.color_format = LV_COLOR_FORMAT_RGB565,
459455
#endif
460-
461456
.rotation = {
462457
.swap_xy = false,
463458
.mirror_x = false,
@@ -466,21 +461,10 @@ static lv_display_t *bsp_display_lcd_init()
466461
.flags = {
467462
.sw_rotate = true,
468463
.buff_dma = false,
469-
#if CONFIG_BSP_DISPLAY_LVGL_PSRAM
470-
.buff_spiram = false,
471-
#endif
472-
#if CONFIG_BSP_DISPLAY_LVGL_FULL_REFRESH
473-
.full_refresh = 1,
474-
#elif CONFIG_BSP_DISPLAY_LVGL_DIRECT_MODE
475-
.direct_mode = 1,
476-
#endif
477464
#if LVGL_VERSION_MAJOR >= 9
478465
.swap_bytes = true,
479466
#endif
480467
}};
481-
#if CONFIG_BSP_LCD_RGB_BOUNCE_BUFFER_MODE
482-
ESP_LOGW(TAG, "CONFIG_BSP_LCD_RGB_BOUNCE_BUFFER_MODE");
483-
#endif
484468
lv_display_t *disp = lvgl_port_add_disp(&disp_cfg);
485469
if (!disp)
486470
{
@@ -522,12 +506,7 @@ lv_display_t *bsp_display_start(void)
522506
{
523507
bsp_display_cfg_t cfg = {
524508
.lvgl_port_cfg = ESP_LVGL_PORT_INIT_CONFIG(),
525-
.buffer_size = BSP_LCD_DRAW_BUFF_SIZE,
526-
.double_buffer = BSP_LCD_DRAW_BUFF_DOUBLE,
527-
.flags = {
528-
.buff_dma = false,
529-
.buff_spiram = true,
530-
}};
509+
};
531510
return bsp_display_start_with_config(&cfg);
532511
}
533512

bsp/esp32_s3_touch_amoled_1_32/include/bsp/esp32_s3_touch_amoled_1_32.h

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
#define BSP_CAPS_AUDIO 1
2525
#define BSP_CAPS_AUDIO_SPEAKER 1
2626
#define BSP_CAPS_AUDIO_MIC 1
27+
#define BSP_CAPS_SDCARD 0
28+
#define BSP_CAPS_IMU 0
2729

2830
/**************************************************************************************************
2931
* ESP-SparkBot-BSP pinout
@@ -184,19 +186,6 @@ esp_err_t bsp_spiffs_mount(void);
184186
*/
185187
esp_err_t bsp_spiffs_unmount(void);
186188

187-
/**************************************************************************************************
188-
*
189-
* uSD card
190-
*
191-
* After mounting the uSD card, it can be accessed with stdio functions ie.:
192-
* \code{.c}
193-
* FILE* f = fopen(BSP_MOUNT_POINT"/hello.txt", "w");
194-
* fprintf(f, "Hello %s!\n", bsp_sdcard->cid.name);
195-
* fclose(f);
196-
* \endcode
197-
**************************************************************************************************/
198-
#define BSP_SD_MOUNT_POINT CONFIG_BSP_SD_MOUNT_POINT
199-
200189
/**************************************************************************************************
201190
*
202191
* LCD interface

0 commit comments

Comments
 (0)