Skip to content

Commit 684999f

Browse files
committed
Add CONFIG_WROVER_KIT_V1 flag to control LCD backlight polarity
Default to later versions of the board (currently just V2) which reverse the polarity.
1 parent 4d7687c commit 684999f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

components/nofrendo-esp32/spi_lcd.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,14 @@
5050
#define LCD_SEL_DATA() GPIO.out_w1ts = (1 << PIN_NUM_DC) // High to send data
5151
#define LCD_RST_SET() GPIO.out_w1ts = (1 << PIN_NUM_RST)
5252
#define LCD_RST_CLR() GPIO.out_w1tc = (1 << PIN_NUM_RST)
53+
54+
#ifdef CONFIG_WROVER_KIT_V1
5355
#define LCD_BKG_ON() GPIO.out_w1ts = (1 << PIN_NUM_BCKL) // Backlight ON
54-
#define LCD_BKG_OFF() GPIO.out_w1tc = (1 << PIN_NUM_BCKL) //Backlight OFF
56+
#define LCD_BKG_OFF() GPIO.out_w1tc = (1 << PIN_NUM_BCKL) // Backlight OFF
57+
#else
58+
#define LCD_BKG_ON() GPIO.out_w1tc = (1 << PIN_NUM_BCKL) // Backlight ON
59+
#define LCD_BKG_OFF() GPIO.out_w1ts = (1 << PIN_NUM_BCKL) // Backlight OFF
60+
#endif
5561

5662

5763
#define SPI_NUM 0x3

0 commit comments

Comments
 (0)