1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00

pkg/lvgl: split riot specific defines out of lv_conf.h

This commit is contained in:
Alexandre Abadie 2021-04-18 16:27:49 +02:00
parent 438753f285
commit be09c44bda
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
2 changed files with 40 additions and 11 deletions

View File

@ -22,6 +22,7 @@ extern "C" {
#endif
#include <stdint.h>
#include "lvgl_riot_conf.h"
/*====================
Graphical settings
@ -83,9 +84,6 @@ extern "C" {
#define LV_DISP_MEDIUM_LIMIT 50
#define LV_DISP_LARGE_LIMIT 70
/* Type of coordinates. Should be `int16_t` (or `int32_t` for extreme cases) */
typedef int16_t lv_coord_t;
/*=========================
Memory manager settings
*=========================*/
@ -298,14 +296,6 @@ typedef void * lv_img_decoder_user_data_t;
* HAL settings
*==================*/
/* 1: use a custom tick source.
* It removes the need to manually update the tick with `lv_tick_inc`) */
#define LV_TICK_CUSTOM 1
#if LV_TICK_CUSTOM == 1
#define LV_TICK_CUSTOM_INCLUDE "xtimer.h" /*Header for the sys time function*/
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (xtimer_now_usec() / US_PER_MS) /*Expression evaluating to current systime in ms*/
#endif /*LV_TICK_CUSTOM*/
typedef void * lv_disp_drv_user_data_t; /*Type of user data in the display driver*/
typedef void * lv_indev_drv_user_data_t; /*Type of user data in the input device driver*/

View File

@ -0,0 +1,39 @@
/*
* Copyright (C) 2021 Inria
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup pkg_lvgl
* @{
*
* @file
* @brief Definitions specific to RIOT for the LittlevGL engine
*
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
*/
#ifndef LVGL_RIOT_CONF_H
#define LVGL_RIOT_CONF_H
#ifdef __cplusplus
extern "C" {
#endif
/* Type of coordinates. Should be `int16_t` (or `int32_t` for extreme cases) */
typedef int16_t lv_coord_t;
#define LV_TICK_CUSTOM 1
#if LV_TICK_CUSTOM == 1
#define LV_TICK_CUSTOM_INCLUDE "xtimer.h" /*Header for the sys time function*/
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (xtimer_now_usec() / US_PER_MS) /*Expression evaluating to current systime in ms*/
#endif /*LV_TICK_CUSTOM*/
#ifdef __cplusplus
}
#endif
#endif /* LVGL_RIOT_CONF_H */