lvgl_riot_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Inria
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
9 #pragma once
10 
21 #include "kernel_defines.h"
22 #include "board.h"
23 #if IS_USED(MODULE_LV_DRIVERS_SDL)
24 #include "lv_drv_conf.h"
25 #endif
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
32 #ifndef LV_HOR_RES_MAX
33 #ifdef LCD_SCREEN_WIDTH
34 #define LV_HOR_RES_MAX (LCD_SCREEN_WIDTH)
35 #else
36 #define LV_HOR_RES_MAX (320)
37 #endif
38 #endif
39 
41 #ifndef LV_VER_RES_MAX
42 #ifdef LCD_SCREEN_HEIGHT
43 #define LV_VER_RES_MAX (LCD_SCREEN_HEIGHT)
44 #else
45 #define LV_VER_RES_MAX (240)
46 #endif
47 #endif
48 
51 #define LV_ATTRIBUTE_MEM_ALIGN __attribute__((aligned(4)))
52 
53 /* Type of coordinates. Should be `int16_t` (or `int32_t` for extreme cases) */
54 typedef int16_t lv_coord_t;
55 
56 #define LV_TICK_CUSTOM 1
57 #define LV_TICK_CUSTOM_INCLUDE "ztimer.h" /*Header for the sys time function*/
58 #define LV_TICK_CUSTOM_SYS_TIME_EXPR (ztimer_now(ZTIMER_MSEC)) /*Expression evaluating to current systime in ms*/
59 
60 #ifdef __cplusplus
61 }
62 #endif
63 
Common macros and compiler attributes/pragmas configuration.