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_conf_kconfig.h (6916B)

      1 /** * @file lv_conf_kconfig.h * Configs that need special handling when LVGL is used with Kconfig */
      2 
      3 #ifndef LV_CONF_KCONFIG_H
      4 #define LV_CONF_KCONFIG_H
      5 
      6 #ifdef __cplusplus
      7 extern "C" {
      8 #endif
      9 
     10 #ifdef LV_CONF_KCONFIG_EXTERNAL_INCLUDE
     11 #  include LV_CONF_KCONFIG_EXTERNAL_INCLUDE
     12 #else
     13 
     14 #  ifdef ESP_PLATFORM
     15 #    include "sdkconfig.h"
     16 #    include "esp_attr.h"
     17 #  endif
     18 
     19 #  ifdef __NuttX__
     20 #    include <nuttx/config.h>
     21 #  elif defined(__RTTHREAD__)
     22 #    define LV_CONF_INCLUDE_SIMPLE
     23 #    include <lv_rt_thread_conf.h>
     24 #  endif
     25 
     26 #endif /*LV_CONF_KCONFIG_EXTERNAL_INCLUDE*/
     27 
     28 /*******************
     29  * LV COLOR CHROMA KEY
     30  *******************/
     31 
     32 #ifdef CONFIG_LV_COLOR_CHROMA_KEY_HEX
     33 #  define CONFIG_LV_COLOR_CHROMA_KEY lv_color_hex(CONFIG_LV_COLOR_CHROMA_KEY_HEX)
     34 #endif
     35 
     36 /*******************
     37  * LV_MEM_SIZE
     38  *******************/
     39 
     40 #ifdef CONFIG_LV_MEM_SIZE_KILOBYTES
     41 #  define CONFIG_LV_MEM_SIZE (CONFIG_LV_MEM_SIZE_KILOBYTES * 1024U)
     42 #endif
     43 
     44 /********************
     45  * FONT SELECTION
     46  *******************/
     47 
     48 /**
     49  * NOTE: In Kconfig instead of `LV_DEFAULT_FONT`
     50  *       `CONFIG_LV_FONT_DEFAULT_<font_name>` is defined
     51  *       hence the large selection with if-s
     52  */
     53 
     54 /*------------------
     55  * DEFAULT FONT
     56  *-----------------*/
     57 #ifdef CONFIG_LV_FONT_DEFAULT_MONTSERRAT_8
     58 #  define CONFIG_LV_FONT_DEFAULT &lv_font_montserrat_8
     59 #elif defined(CONFIG_LV_FONT_DEFAULT_MONTSERRAT_10)
     60 #  define CONFIG_LV_FONT_DEFAULT &lv_font_montserrat_10
     61 #elif defined(CONFIG_LV_FONT_DEFAULT_MONTSERRAT_12)
     62 #  define CONFIG_LV_FONT_DEFAULT &lv_font_montserrat_12
     63 #elif defined(CONFIG_LV_FONT_DEFAULT_MONTSERRAT_14)
     64 #  define CONFIG_LV_FONT_DEFAULT &lv_font_montserrat_14
     65 #elif defined(CONFIG_LV_FONT_DEFAULT_MONTSERRAT_16)
     66 #  define CONFIG_LV_FONT_DEFAULT &lv_font_montserrat_16
     67 #elif defined(CONFIG_LV_FONT_DEFAULT_MONTSERRAT_18)
     68 #  define CONFIG_LV_FONT_DEFAULT &lv_font_montserrat_18
     69 #elif defined(CONFIG_LV_FONT_DEFAULT_MONTSERRAT_20)
     70 #  define CONFIG_LV_FONT_DEFAULT &lv_font_montserrat_20
     71 #elif defined(CONFIG_LV_FONT_DEFAULT_MONTSERRAT_22)
     72 #  define CONFIG_LV_FONT_DEFAULT &lv_font_montserrat_22
     73 #elif defined(CONFIG_LV_FONT_DEFAULT_MONTSERRAT_24)
     74 #  define CONFIG_LV_FONT_DEFAULT &lv_font_montserrat_24
     75 #elif defined(CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26)
     76 #  define CONFIG_LV_FONT_DEFAULT &lv_font_montserrat_26
     77 #elif defined(CONFIG_LV_FONT_DEFAULT_MONTSERRAT_28)
     78 #  define CONFIG_LV_FONT_DEFAULT &lv_font_montserrat_28
     79 #elif defined(CONFIG_LV_FONT_DEFAULT_MONTSERRAT_30)
     80 #  define CONFIG_LV_FONT_DEFAULT &lv_font_montserrat_30
     81 #elif defined(CONFIG_LV_FONT_DEFAULT_MONTSERRAT_32)
     82 #  define CONFIG_LV_FONT_DEFAULT &lv_font_montserrat_32
     83 #elif defined(CONFIG_LV_FONT_DEFAULT_MONTSERRAT_34)
     84 #  define CONFIG_LV_FONT_DEFAULT &lv_font_montserrat_34
     85 #elif defined(CONFIG_LV_FONT_DEFAULT_MONTSERRAT_36)
     86 #  define CONFIG_LV_FONT_DEFAULT &lv_font_montserrat_36
     87 #elif defined(CONFIG_LV_FONT_DEFAULT_MONTSERRAT_38)
     88 #  define CONFIG_LV_FONT_DEFAULT &lv_font_montserrat_38
     89 #elif defined(CONFIG_LV_FONT_DEFAULT_MONTSERRAT_40)
     90 #  define CONFIG_LV_FONT_DEFAULT &lv_font_montserrat_40
     91 #elif defined(CONFIG_LV_FONT_DEFAULT_MONTSERRAT_42)
     92 #  define CONFIG_LV_FONT_DEFAULT &lv_font_montserrat_42
     93 #elif defined(CONFIG_LV_FONT_DEFAULT_MONTSERRAT_44)
     94 #  define CONFIG_LV_FONT_DEFAULT &lv_font_montserrat_44
     95 #elif defined(CONFIG_LV_FONT_DEFAULT_MONTSERRAT_46)
     96 #  define CONFIG_LV_FONT_DEFAULT &lv_font_montserrat_46
     97 #elif defined(CONFIG_LV_FONT_DEFAULT_MONTSERRAT_48)
     98 #  define CONFIG_LV_FONT_DEFAULT &lv_font_montserrat_48
     99 #elif defined(CONFIG_LV_FONT_DEFAULT_MONTSERRAT_12_SUBPX)
    100 #  define CONFIG_LV_FONT_DEFAULT &lv_font_montserrat_12_subpx
    101 #elif defined(CONFIG_LV_FONT_DEFAULT_MONTSERRAT_28_COMPRESSED)
    102 #  define CONFIG_LV_FONT_DEFAULT &lv_font_montserrat_28_compressed
    103 #elif defined(CONFIG_LV_FONT_DEFAULT_DEJAVU_16_PERSIAN_HEBREW)
    104 #  define CONFIG_LV_FONT_DEFAULT &lv_font_dejavu_16_persian_hebrew
    105 #elif defined(CONFIG_LV_FONT_DEFAULT_SIMSUN_16_CJK)
    106 #  define CONFIG_LV_FONT_DEFAULT &lv_font_simsun_16_cjk
    107 #elif defined(CONFIG_LV_FONT_DEFAULT_UNSCII_8)
    108 #  define CONFIG_LV_FONT_DEFAULT &lv_font_unscii_8
    109 #elif defined(CONFIG_LV_FONT_DEFAULT_UNSCII_16)
    110 #  define CONFIG_LV_FONT_DEFAULT &lv_font_unscii_16
    111 #endif
    112 
    113 /*------------------
    114  * TEXT ENCODING
    115  *-----------------*/
    116 #ifdef CONFIG_LV_TXT_ENC_UTF8
    117 #  define CONFIG_LV_TXT_ENC LV_TXT_ENC_UTF8
    118 #elif defined(CONFIG_LV_TXT_ENC_ASCII)
    119 #  define CONFIG_LV_TXT_ENC LV_TXT_ENC_ASCII
    120 #endif
    121 
    122 /*------------------
    123  * BIDI DIRECTION
    124  *-----------------*/
    125 
    126 #ifdef CONFIG_LV_BASE_DIR_LTR
    127 #  define CONFIG_LV_BIDI_BASE_DIR_DEF LV_BASE_DIR_LTR
    128 #elif defined(CONFIG_LV_BASE_DIR_RTL)
    129 #  define CONFIG_LV_BIDI_BASE_DIR_DEF LV_BASE_DIR_RTL
    130 #elif defined(CONFIG_LV_BASE_DIR_AUTO)
    131 #  define CONFIG_LV_BIDI_BASE_DIR_DEF LV_BASE_DIR_AUTO
    132 #endif
    133 
    134 /*------------------
    135  * MONITOR POSITION
    136  *-----------------*/
    137 
    138 #ifdef CONFIG_LV_PERF_MONITOR_ALIGN_TOP_LEFT
    139 #  define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_TOP_LEFT
    140 #elif defined(CONFIG_LV_USE_PERF_MONITOR_ALIGN_TOP_MID)
    141 #  define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_TOP_MID
    142 #elif defined(CONFIG_LV_PERF_MONITOR_ALIGN_TOP_RIGHT)
    143 #  define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_TOP_RIGHT
    144 #elif defined(CONFIG_LV_PERF_MONITOR_ALIGN_BOTTOM_LEFT)
    145 #  define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_LEFT
    146 #elif defined(CONFIG_LV_PERF_MONITOR_ALIGN_BOTTOM_MID)
    147 #  define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_MID
    148 #elif defined(CONFIG_LV_PERF_MONITOR_ALIGN_BOTTOM_RIGHT)
    149 #  define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT
    150 #elif defined(CONFIG_LV_PERF_MONITOR_ALIGN_LEFT_MID)
    151 #  define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_LEFT_MID
    152 #elif defined(CONFIG_LV_PERF_MONITOR_ALIGN_RIGHT_MID)
    153 #  define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_RIGHT_MID
    154 #elif defined(CONFIG_LV_PERF_MONITOR_ALIGN_CENTER)
    155 #  define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_CENTER
    156 #endif
    157 
    158 #ifdef CONFIG_LV_MEM_MONITOR_ALIGN_TOP_LEFT
    159 #  define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_TOP_LEFT
    160 #elif defined(CONFIG_LV_USE_MEM_MONITOR_ALIGN_TOP_MID)
    161 #  define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_TOP_MID
    162 #elif defined(CONFIG_LV_MEM_MONITOR_ALIGN_TOP_RIGHT)
    163 #  define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_TOP_RIGHT
    164 #elif defined(CONFIG_LV_MEM_MONITOR_ALIGN_BOTTOM_LEFT)
    165 #  define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_LEFT
    166 #elif defined(CONFIG_LV_MEM_MONITOR_ALIGN_BOTTOM_MID)
    167 #  define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_MID
    168 #elif defined(CONFIG_LV_MEM_MONITOR_ALIGN_BOTTOM_RIGHT)
    169 #  define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT
    170 #elif defined(CONFIG_LV_MEM_MONITOR_ALIGN_LEFT_MID)
    171 #  define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_LEFT_MID
    172 #elif defined(CONFIG_LV_MEM_MONITOR_ALIGN_RIGHT_MID)
    173 #  define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_RIGHT_MID
    174 #elif defined(CONFIG_LV_MEM_MONITOR_ALIGN_CENTER)
    175 #  define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_CENTER
    176 #endif
    177 
    178 #ifdef __cplusplus
    179 } /*extern "C"*/
    180 #endif
    181 
    182 #endif /*LV_CONF_KCONFIG_H*/