From bad9d6c93f9684efcee9b8521ada161e71792ef4 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Thu, 19 Mar 2020 10:23:51 +0100 Subject: [PATCH] boards/pinetime: add defines for controlling the backlight --- boards/pinetime/include/board.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/boards/pinetime/include/board.h b/boards/pinetime/include/board.h index c7f8d25e20..b56237317f 100644 --- a/boards/pinetime/include/board.h +++ b/boards/pinetime/include/board.h @@ -52,6 +52,17 @@ extern "C" { #define BATTERY_ADC NRF52_AIN7 /** @} */ +/** + * @name Backlight control defines, default uses LCD_BACKLIGHT_LOW values + * @{ + */ +#ifndef BACKLIGHT_MASK +#define BACKLIGHT_MASK (1 << 14) +#endif +#define BACKLIGHT_ON (NRF_P0->OUTCLR = BACKLIGHT_MASK) +#define BACKLIGHT_OFF (NRF_P0->OUTSET = BACKLIGHT_MASK) +/** @ */ + /** * @name LCD configuration * @{