Skip to content

Commit a2bd599

Browse files
committed
Rename SSD1306 driver to unified OLED name
git mv ssd1306_display_driver.c -> oled_display_driver.c; rename the create_port entry point and the log TAG accordingly. Pure rename -- all three OLED compatibles (solomon-systech,ssd1306, solomon-systech,ssd1315, sino-wealth,sh1106) now dispatch through oled_display_create_port. The previous filename attributed a Sino Wealth controller (SH1106) to Solomon Systech and was obsolete since the file started driving multiple variants. Signed-off-by: Davide Bettio <davide@uninstall.it>
1 parent c914c01 commit a2bd599

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ idf_component_register(SRCS
4343
"font_data.c"
4444
"memory_display_driver.c"
4545
"oled_commands.c"
46-
"ssd1306_display_driver.c"
46+
"oled_display_driver.c"
4747
"spi_dc_driver.c"
4848
"spi_display.c"
4949
"ufontlib.c"

display_driver.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static const char *TAG = "display_driver";
3232
Context *epaper_display_create_port(GlobalContext *global, term opts);
3333
Context *dcs_lcd_display_create_port(GlobalContext *global, term opts);
3434
Context *memory_lcd_display_create_port(GlobalContext *global, term opts);
35-
Context *ssd1306_display_create_port(GlobalContext *global, term opts);
35+
Context *oled_display_create_port(GlobalContext *global, term opts);
3636

3737
Context *display_create_port(GlobalContext *global, term opts)
3838
{
@@ -64,11 +64,11 @@ Context *display_create_port(GlobalContext *global, term opts)
6464
|| !strcmp(compat_string, "sitronix,st7796")) {
6565
ctx = dcs_lcd_display_create_port(global, opts);
6666
} else if (!strcmp(compat_string, "solomon-systech,ssd1306")) {
67-
ctx = ssd1306_display_create_port(global, opts);
67+
ctx = oled_display_create_port(global, opts);
6868
} else if (!strcmp(compat_string, "solomon-systech,ssd1315")) {
69-
ctx = ssd1306_display_create_port(global, opts);
69+
ctx = oled_display_create_port(global, opts);
7070
} else if (!strcmp(compat_string, "sino-wealth,sh1106")) {
71-
ctx = ssd1306_display_create_port(global, opts);
71+
ctx = oled_display_create_port(global, opts);
7272
} else {
7373
ESP_LOGE(TAG, "No matching display driver for given `comptaible`: `%s`.", compat_string);
7474
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#include "mono_draw.h"
4545
#include "oled_commands.h"
4646

47-
#define TAG "SSD1306"
47+
#define TAG "oled_display"
4848

4949
#define DISPLAY_WIDTH 128
5050
#define DISPLAY_HEIGHT 64
@@ -298,7 +298,7 @@ static void display_init(Context *ctx, term opts)
298298
i2c_driver_release(i2c_host, glb);
299299
}
300300

301-
Context *ssd1306_display_create_port(GlobalContext *global, term opts)
301+
Context *oled_display_create_port(GlobalContext *global, term opts)
302302
{
303303
Context *ctx = context_new(global);
304304
ctx->native_handler = display_task_consume_mailbox;

0 commit comments

Comments
 (0)