Skip to content

Commit 2e6c877

Browse files
authored
Merge pull request #320 from adafruit/sense-tft
add & enable DISPLAY_VSENSOR_PIN if available (required for sense tft)
2 parents 64d8e34 + 59df4f9 commit 2e6c877

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/boards/boards.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,11 @@ void board_display_init(void) {
250250
//------------- Display Init -------------//
251251
nrf_gpio_cfg_output(DISPLAY_PIN_DC);
252252

253+
#if defined(DISPLAY_VSENSOR_PIN) && DISPLAY_VSENSOR_PIN >= 0
254+
nrf_gpio_cfg_output(DISPLAY_VSENSOR_PIN);
255+
nrf_gpio_pin_write(DISPLAY_VSENSOR_PIN, DISPLAY_VSENSOR_ON);
256+
#endif
257+
253258
#if defined(DISPLAY_PIN_RST) && DISPLAY_PIN_RST >= 0
254259
nrf_gpio_cfg_output(DISPLAY_PIN_RST);
255260
nrf_gpio_pin_clear(DISPLAY_PIN_RST);
@@ -771,4 +776,4 @@ static void tft_controller_init(void) {
771776
}
772777
}
773778

774-
#endif
779+
#endif

src/boards/feather_nrf52840_sense_tft/board.h

+5
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050
//--------------------------------------------------------------------+
5151
// Display
5252
//--------------------------------------------------------------------+
53+
54+
// VSensor required to power the display
55+
#define DISPLAY_VSENSOR_PIN _PINNUM(1, 7)
56+
#define DISPLAY_VSENSOR_ON 1
57+
5358
#define DISPLAY_CONTROLLER_ST7789
5459

5560
#define DISPLAY_PIN_SCK _PINNUM(0, 26)

0 commit comments

Comments
 (0)