Skip to content

Commit 5bfedbc

Browse files
robertalexa2000xiaoxiang781216
authored andcommitted
esp32: macros related to SSD1306 OLED display should not be board-specific
Signed-off-by: Robert-Ionut Alexa <[email protected]>
1 parent f2530c5 commit 5bfedbc

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

boards/xtensa/esp32/common/src/esp32_ssd1306.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,14 @@
4141
#include "esp32_i2c.h"
4242
#include "hardware/esp32_gpio_sigmap.h"
4343

44-
#include "ttgo_lora_esp32.h"
44+
#define HAVE_SSD1306 1
45+
46+
#if !defined(CONFIG_ESP32_I2C) || !defined(CONFIG_ESP32_I2C0) || \
47+
!defined(CONFIG_LCD_SSD1306_I2C)
48+
# undef HAVE_SSD1306
49+
#endif
50+
51+
#define GPIO_SSD1306_RST 16
4552

4653
#ifdef HAVE_SSD1306
4754

boards/xtensa/esp32/ttgo_lora_esp32/src/ttgo_lora_esp32.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,6 @@
3535

3636
/* TTGO-LoRa-SX1276-ESP32 GPIOs *********************************************/
3737

38-
/* OLED SSD1306 */
39-
40-
#define HAVE_SSD1306 1
41-
42-
#if !defined(CONFIG_ESP32_I2C) || !defined(CONFIG_ESP32_I2C0) || \
43-
!defined(CONFIG_LCD_SSD1306_I2C)
44-
# undef HAVE_SSD1306
45-
#endif
46-
47-
#define GPIO_SSD1306_RST 16
48-
4938
/* SX1276 pins */
5039

5140
#define GPIO_SX127X_RESET 23 /* RESET connected to IO23 */

0 commit comments

Comments
 (0)