tests/pkg_lvgl: adapt to new lvgl API
This commit is contained in:
parent
4842da272c
commit
1f6c51602a
@ -25,12 +25,15 @@
|
|||||||
#include "lvgl/lvgl.h"
|
#include "lvgl/lvgl.h"
|
||||||
#include "lvgl_riot.h"
|
#include "lvgl_riot.h"
|
||||||
|
|
||||||
|
#include "screen_dev.h"
|
||||||
|
|
||||||
#include "ili9341.h"
|
#include "ili9341.h"
|
||||||
#include "ili9341_params.h"
|
#include "ili9341_params.h"
|
||||||
#include "disp_dev.h"
|
#include "disp_dev.h"
|
||||||
#include "ili9341_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 CPU_LABEL_COLOR "FF0000"
|
||||||
#define MEM_LABEL_COLOR "0000FF"
|
#define MEM_LABEL_COLOR "0000FF"
|
||||||
@ -128,17 +131,17 @@ void sysmon_create(void)
|
|||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
/* Configure the generic display driver interface */
|
/* Configure the generic display driver interface */
|
||||||
disp_dev_t *disp_dev = (disp_dev_t *)&dev;
|
s_screen.display = (disp_dev_t *)&s_disp_dev;
|
||||||
disp_dev->driver = &ili9341_disp_dev_driver;
|
s_screen.display->driver = &ili9341_disp_dev_driver;
|
||||||
|
|
||||||
/* Enable backlight */
|
/* Enable backlight */
|
||||||
disp_dev_backlight_on();
|
disp_dev_backlight_on();
|
||||||
|
|
||||||
/* Initialize the concrete display driver */
|
/* 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 */
|
/* Initialize lvgl with the generic display and touch drivers */
|
||||||
lvgl_init(disp_dev);
|
lvgl_init(&s_screen);
|
||||||
|
|
||||||
/* Create the system monitor widget */
|
/* Create the system monitor widget */
|
||||||
sysmon_create();
|
sysmon_create();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user