Skip to content

Commit c47836f

Browse files
committed
display: update sdkconfig define
1 parent f2537d3 commit c47836f

File tree

6 files changed

+19
-16
lines changed

6 files changed

+19
-16
lines changed

components/ugfx/src/gdriver/gdriver_mk.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
#include "gdriver.c"
99

10-
#if defined(CONFIG_OLED_PANEL_SSD1331)
10+
#if defined(CONFIG_SCREEN_PANEL_SSD1331)
1111

1212
#undef GDISP_DRIVER_LIST
1313
#define GDISP_DRIVER_LIST GDISPVMT_SSD1331
1414
#include "../../drivers/gdisp/SSD1331/gdisp_lld_SSD1331.c"
1515

16-
#elif defined(CONFIG_OLED_PANEL_SSD1351)
16+
#elif defined(CONFIG_SCREEN_PANEL_SSD1351)
1717

1818
#undef GDISP_DRIVER_LIST
1919
#define GDISP_DRIVER_LIST GDISPVMT_SSD1351

main/inc/tasks/gui_task.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#include <stdint.h>
1212

13-
#if defined(CONFIG_OLED_PANEL_SSD1331)
13+
#if defined(CONFIG_SCREEN_PANEL_SSD1331)
1414
// ani0_96x64.gif
1515
extern const uint8_t ani0_96x64_gif_ptr[] asm("_binary_ani0_96x64_gif_start");
1616
extern const uint8_t ani0_96x64_gif_end[] asm("_binary_ani0_96x64_gif_end");
@@ -23,7 +23,7 @@ extern const uint8_t ani2_96x64_gif_end[] asm("_binary_ani2_96x64_gif_end");
2323
// ani3_96x64.gif
2424
extern const uint8_t ani3_96x64_gif_ptr[] asm("_binary_ani3_96x64_gif_start");
2525
extern const uint8_t ani3_96x64_gif_end[] asm("_binary_ani3_96x64_gif_end");
26-
#elif defined(CONFIG_OLED_PANEL_SSD1351)
26+
#elif defined(CONFIG_SCREEN_PANEL_SSD1351)
2727
// ani0_128x128.gif
2828
extern const uint8_t ani0_128x128_gif_ptr[] asm("_binary_ani0_128x128_gif_start");
2929
extern const uint8_t ani0_128x128_gif_end[] asm("_binary_ani0_128x128_gif_end");

main/src/device/spi.c

+4-7
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@
66
*/
77

88
#include "driver/spi_master.h"
9-
#if defined(CONFIG_OLED_PANEL_SSD1331)
109
#include "driver/ssd1331.h"
11-
#elif defined(CONFIG_OLED_PANEL_SSD1351)
1210
#include "driver/ssd1351.h"
13-
#endif
1411

1512
spi_device_handle_t spi1;
1613

@@ -24,20 +21,20 @@ void spi1_init(void)
2421
.sclk_io_num=5,
2522
.quadwp_io_num=-1,
2623
.quadhd_io_num=-1,
27-
#if defined(CONFIG_OLED_PANEL_SSD1331)
24+
#if defined(CONFIG_SCREEN_PANEL_SSD1331)
2825
.max_transfer_sz=96*64*2
29-
#elif defined(CONFIG_OLED_PANEL_SSD1351)
26+
#elif defined(CONFIG_SCREEN_PANEL_SSD1351)
3027
.max_transfer_sz=128*128*2
3128
#endif
3229
};
3330
spi_device_interface_config_t devcfg={
3431
.clock_speed_hz=20000000, // Clock out at 20 MHz
3532
.mode=0, // SPI mode 0
3633
.spics_io_num=27, // CS pin
37-
#if defined(CONFIG_OLED_PANEL_SSD1331)
34+
#if defined(CONFIG_SCREEN_PANEL_SSD1331)
3835
.queue_size=3, // We want to be able to queue 3 transactions at a time
3936
.pre_cb=ssd1331_setpin_dc, // Specify pre-transfer callback to handle D/C line
40-
#elif defined(CONFIG_OLED_PANEL_SSD1351)
37+
#elif defined(CONFIG_SCREEN_PANEL_SSD1351)
4138
.queue_size=6, // We want to be able to queue 6 transactions at a time
4239
.pre_cb=ssd1351_setpin_dc, // Specify pre-transfer callback to handle D/C line
4340
#endif

main/src/system/init.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,20 @@
1616
void device_init(void)
1717
{
1818
bt0_init();
19-
#if defined(CONFIG_OLED_PANEL_SSD1331) || defined(CONFIG_OLED_PANEL_SSD1351)
19+
#if !defined(CONFIG_SCREEN_PANEL_NONE)
2020
spi1_init();
2121
#endif
2222
i2s0_init();
23+
#if !defined(CONFIG_I2S_OUTPUT_INTERNAL_DAC) && !defined(CONFIG_I2S_OUTPUT_PDM)
2324
gpio0_init();
25+
#endif
2426
spiffs0_init();
2527
}
2628

2729
void driver_init(void)
2830
{
31+
#if !defined(CONFIG_I2S_OUTPUT_INTERNAL_DAC)
2932
led_init();
33+
#endif
3034
}
3135

main/src/system/task.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@
1515

1616
void task_init(void)
1717
{
18-
#if defined(CONFIG_OLED_PANEL_SSD1331) || defined(CONFIG_OLED_PANEL_SSD1351)
18+
#if !defined(CONFIG_SCREEN_PANEL_NONE)
1919
xTaskCreate(gui_task, "gui_task", 2048, NULL, 5, NULL);
2020
#endif
2121
xTaskCreate(mp3_player_task, "mp3_player_task", 8192, NULL, 5, NULL);
2222
xTaskCreate(bt_speaker_task, "bt_speaker_task", 2560, NULL, 5, NULL);
23+
#if !defined(CONFIG_I2S_OUTPUT_INTERNAL_DAC) && !defined(CONFIG_I2S_OUTPUT_PDM)
2324
xTaskCreate(led_indicator_task, "led_indicator_task", 1024, NULL, 5, NULL);
25+
#endif
2426
}

main/src/tasks/gui_task.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
#define TAG "gui_task"
1515

1616
static const uint8_t *img_file_ptr[][2] = {
17-
#if defined(CONFIG_OLED_PANEL_SSD1331)
17+
#if defined(CONFIG_SCREEN_PANEL_SSD1331)
1818
{ani0_96x64_gif_ptr, ani0_96x64_gif_end}, // "Bluetooth"
1919
{ani1_96x64_gif_ptr, ani1_96x64_gif_end}, // "Standby"
2020
{ani2_96x64_gif_ptr, ani2_96x64_gif_end}, // "Pause"
2121
{ani3_96x64_gif_ptr, ani3_96x64_gif_end} // "Playing"
22-
#elif defined(CONFIG_OLED_PANEL_SSD1351)
22+
#elif defined(CONFIG_SCREEN_PANEL_SSD1351)
2323
{ani0_128x128_gif_ptr, ani0_128x128_gif_end}, // "Bluetooth"
2424
{ani1_128x128_gif_ptr, ani1_128x128_gif_end}, // "Standby"
2525
{ani2_128x128_gif_ptr, ani2_128x128_gif_end}, // "Pause"
@@ -30,7 +30,7 @@ uint8_t img_file_index = 0;
3030

3131
void gui_show_image(uint8_t filename_index)
3232
{
33-
#if defined(CONFIG_OLED_PANEL_SSD1331) || defined(CONFIG_OLED_PANEL_SSD1351)
33+
#if defined(CONFIG_SCREEN_PANEL_SSD1331) || defined(CONFIG_SCREEN_PANEL_SSD1351)
3434
if (filename_index >= (sizeof(img_file_ptr) / 2)) {
3535
ESP_LOGE(TAG, "invalid filename index");
3636
return;

0 commit comments

Comments
 (0)