acid-drop

- Hacking the planet from a LilyGo T-Deck using custom firmware
git clone git://git.acid.vegas/acid-drop.git
Log | Files | Refs | Archive | README | LICENSE

lv_hal.h (1003B)

      1 /**
      2  * @file lv_hal.h
      3  *
      4  */
      5 
      6 #ifndef LV_HAL_H
      7 #define LV_HAL_H
      8 
      9 #ifdef __cplusplus
     10 extern "C" {
     11 #endif
     12 
     13 /*********************
     14  *      INCLUDES
     15  *********************/
     16 #include "lv_hal_disp.h"
     17 #include "lv_hal_indev.h"
     18 #include "lv_hal_tick.h"
     19 
     20 /*********************
     21  *      DEFINES
     22  *********************/
     23 /**
     24  * Same as Android's DIP. (Different name is chosen to avoid mistype between LV_DPI and LV_DIP)
     25  * 1 dip is 1 px on a 160 DPI screen
     26  * 1 dip is 2 px on a 320 DPI screen
     27  * https://stackoverflow.com/questions/2025282/what-is-the-difference-between-px-dip-dp-and-sp
     28  */
     29 #define _LV_DPX_CALC(dpi, n)   ((n) == 0 ? 0 :LV_MAX((( (dpi) * (n) + 80) / 160), 1)) /*+80 for rounding*/
     30 #define LV_DPX(n)   _LV_DPX_CALC(lv_disp_get_dpi(NULL), n)
     31 
     32 /**********************
     33  *      TYPEDEFS
     34  **********************/
     35 
     36 /**********************
     37  * GLOBAL PROTOTYPES
     38  **********************/
     39 
     40 /**********************
     41  *      MACROS
     42  **********************/
     43 
     44 #ifdef __cplusplus
     45 } /*extern "C"*/
     46 #endif
     47 
     48 #endif