Skip to content

Commit 02d0690

Browse files
committed
fix:优化代码
1 parent 93741a2 commit 02d0690

File tree

5 files changed

+11
-87
lines changed

5 files changed

+11
-87
lines changed

.github/workflows/upload_component.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
bsp/esp32_s3_touch_lcd_2_8d;
4141
bsp/esp32_s3_touch_lcd_1_83;
4242
bsp/esp32_s3_touch_amoled_1_32;
43+
bsp/esp32_c6_touch_amoled_1_32;
4344
bsp/esp32_c6_touch_amoled_2_06;
4445
sensor/qmi8658;
4546
sensor/pcf85063a;

bsp/esp32_c6_touch_amoled_1_32/Kconfig

Lines changed: 5 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ menu "Board Support Package"
1010
config BSP_I2C_NUM
1111
int "I2C peripheral index"
1212
default 0
13-
range 0 1
1413
help
15-
ESP32-S2 has two I2C peripherals, pick the one you want to use.
14+
ESP32-S2 has one I2C peripherals.
1615

1716
config BSP_I2C_FAST_MODE
1817
bool "Enable I2C fast mode"
@@ -50,72 +49,21 @@ menu "Board Support Package"
5049
default 2
5150
help
5251
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
6752

6853
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.
10654

55+
menu "Display"
10756
config BSP_DISPLAY_LVGL_BUF_HEIGHT
108-
depends on !BSP_DISPLAY_LVGL_AVOID_TEAR
10957
int "LVGL buffer height"
11058
default 100
11159
help
11260
Height of LVGL buffer. The width of the buffer is the same as that of the LCD.
61+
11362
endmenu
114-
63+
11564
config BSP_I2S_NUM
11665
int "I2S peripheral index"
11766
default 0
118-
range 0 1
11967
help
120-
ESP32S3 has two I2S peripherals, pick the one you want to use.
68+
ESP32C6 has One I2S peripherals.
12169
endmenu

bsp/esp32_c6_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-C6-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-C6-Touch-AMOLED-1.32) | ^1 |

bsp/esp32_c6_touch_amoled_1_32/esp32_c6_touch_amoled_1_32.c

Lines changed: 1 addition & 15 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,
@@ -469,11 +465,6 @@ static lv_display_t *bsp_display_lcd_init()
469465
.swap_bytes = true,
470466
#endif
471467
}};
472-
473-
#if CONFIG_BSP_LCD_RGB_BOUNCE_BUFFER_MODE
474-
ESP_LOGW(TAG, "CONFIG_BSP_LCD_RGB_BOUNCE_BUFFER_MODE");
475-
#endif
476-
477468
lv_display_t *disp = lvgl_port_add_disp(&disp_cfg);
478469
if (!disp)
479470
{
@@ -515,12 +506,7 @@ lv_display_t *bsp_display_start(void)
515506
{
516507
bsp_display_cfg_t cfg = {
517508
.lvgl_port_cfg = ESP_LVGL_PORT_INIT_CONFIG(),
518-
.buffer_size = BSP_LCD_DRAW_BUFF_SIZE,
519-
.double_buffer = BSP_LCD_DRAW_BUFF_DOUBLE,
520-
.flags = {
521-
.buff_dma = false,
522-
.buff_spiram = true,
523-
}};
509+
};
524510
return bsp_display_start_with_config(&cfg);
525511
}
526512

bsp/esp32_c6_touch_amoled_1_32/include/bsp/esp32_c6_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)