Skip to content

Commit

Permalink
tests/pkg_lvgl: adapt to new lvgl API
Browse files Browse the repository at this point in the history
  • Loading branch information
aabadie committed Jul 29, 2020
1 parent 4842da2 commit 1f6c516
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions tests/pkg_lvgl/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@
#include "lvgl/lvgl.h"
#include "lvgl_riot.h"

#include "screen_dev.h"

#include "ili9341.h"
#include "ili9341_params.h"
#include "disp_dev.h"
#include "ili9341_disp_dev.h"

static ili9341_t dev;
static ili9341_t s_disp_dev;
static screen_dev_t s_screen;

#define CPU_LABEL_COLOR "FF0000"
#define MEM_LABEL_COLOR "0000FF"
Expand Down Expand Up @@ -128,17 +131,17 @@ void sysmon_create(void)
int main(void)
{
/* Configure the generic display driver interface */
disp_dev_t *disp_dev = (disp_dev_t *)&dev;
disp_dev->driver = &ili9341_disp_dev_driver;
s_screen.display = (disp_dev_t *)&s_disp_dev;
s_screen.display->driver = &ili9341_disp_dev_driver;

/* Enable backlight */
disp_dev_backlight_on();

/* Initialize the concrete display driver */
ili9341_init(&dev, &ili9341_params[0]);
ili9341_init(&s_disp_dev, &ili9341_params[0]);

/* Initialize lvgl with the generic display driver interface */
lvgl_init(disp_dev);
/* Initialize lvgl with the generic display and touch drivers */
lvgl_init(&s_screen);

/* Create the system monitor widget */
sysmon_create();
Expand Down

0 comments on commit 1f6c516

Please sign in to comment.