1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

tests: use backlight defines instead of board module

This commit is contained in:
Alexandre Abadie 2020-03-19 10:24:24 +01:00
parent 1498a7ada2
commit 6202e2da71
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
3 changed files with 8 additions and 8 deletions

View File

@ -35,17 +35,13 @@ static ili9341_t ili9341;
int main(void)
{
#ifdef BOARD_PINETIME
/* on PineTime, enable the backlight */
gpio_clear(LCD_BACKLIGHT_LOW);
#endif
ili9341_init(&ili9341, &ili9341_params[0]);
disp_dev_t *dev = (disp_dev_t *)&ili9341;
dev->driver = &ili9341_disp_dev_driver;
disp_dev_set_invert(dev, true);
disp_dev_backlight_on();
uint16_t max_width = disp_dev_width(dev);
uint16_t max_height = disp_dev_height(dev);

View File

@ -20,6 +20,7 @@
#include <stdio.h>
#include "xtimer.h"
#include "board.h"
#include "ili9341.h"
#include "ili9341_params.h"
@ -34,9 +35,9 @@ int main(void)
/* initialize the sensor */
printf("Initializing display...");
#ifdef BOARD_PINETIME
/* on PineTime, enable the backlight */
gpio_clear(LCD_BACKLIGHT_LOW);
/* Enable backlight if macro is defined */
#ifdef BACKLIGHT_ON
BACKLIGHT_ON;
#endif
if (ili9341_init(&dev, &ili9341_params[0]) == 0) {

View File

@ -131,6 +131,9 @@ int main(void)
disp_dev_t *disp_dev = (disp_dev_t *)&dev;
disp_dev->driver = &ili9341_disp_dev_driver;
/* Enable backlight */
disp_dev_backlight_on();
/* Initialize the concrete display driver */
ili9341_init(&dev, &ili9341_params[0]);