Merge pull request #320 from adafruit/sense-tft

add & enable DISPLAY_VSENSOR_PIN if available (required for sense tft)
This commit is contained in:
Ha Thach 2024-01-29 17:03:31 +07:00 committed by GitHub
commit 2e6c877d1b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions

View file

@ -250,6 +250,11 @@ void board_display_init(void) {
//------------- Display Init -------------//
nrf_gpio_cfg_output(DISPLAY_PIN_DC);
#if defined(DISPLAY_VSENSOR_PIN) && DISPLAY_VSENSOR_PIN >= 0
nrf_gpio_cfg_output(DISPLAY_VSENSOR_PIN);
nrf_gpio_pin_write(DISPLAY_VSENSOR_PIN, DISPLAY_VSENSOR_ON);
#endif
#if defined(DISPLAY_PIN_RST) && DISPLAY_PIN_RST >= 0
nrf_gpio_cfg_output(DISPLAY_PIN_RST);
nrf_gpio_pin_clear(DISPLAY_PIN_RST);

View file

@ -50,6 +50,11 @@
//--------------------------------------------------------------------+
// Display
//--------------------------------------------------------------------+
// VSensor required to power the display
#define DISPLAY_VSENSOR_PIN _PINNUM(1, 7)
#define DISPLAY_VSENSOR_ON 1
#define DISPLAY_CONTROLLER_ST7789
#define DISPLAY_PIN_SCK _PINNUM(0, 26)