#ifndef LV_CUSTOM_H
#define LV_CUSTOM_H

#include <stdint.h>
#include <stdbool.h>
#ifndef PC_SIMULATOR
#include "vmf/video_display_mechanism.h"
#endif

/* Type of coordinates. Should be `int16_t` (or `int32_t` for extreme cases) */
typedef int16_t lv_coord_t;

/* Use following function to setup above variables*/
void lv_scr_setup(void *, uint32_t, uint32_t, uint32_t, uint32_t, bool);

lv_coord_t lv_scr_get_hor_res(void);

lv_coord_t lv_scr_get_ver_res(void);

lv_coord_t lv_scr_get_hor_pos(void);

lv_coord_t lv_scr_get_ver_pos(void);

bool lv_scr_is_yuv_device(void);

#ifndef PC_SIMULATOR
VMF_VDISP_HANDLE_T *lv_scr_get_disp_handle(void);
#endif

/* 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  <time.h>       /*Header for the sys time function*/
uint32_t custom_tick_get(void);
#define LV_TICK_CUSTOM_SYS_TIME_EXPR custom_tick_get()     /*Expression evaluating to current systime in ms*/
#endif   /*LV_TICK_CUSTOM*/

#endif //LV_CUSTOM_H
