Tab5 audio, I2C improvements, UiDensity moved to lvgl-module and cleanup (#506)
- UiDensity moved to lvgl-module - Deleted tt_hal and tt_hal_gpio (breaks apps, but will fix those right after merging) - Added I2C 8 bit register operations - Added device.properties to simulator - Improved Tab5 hardware init, implement audio - Add README.md to kernel
This commit is contained in:
committed by
GitHub
parent
3a24d058c9
commit
d860ba1f34
@@ -1,7 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
# ####################################
|
||||
# Read properties
|
||||
# Read sdkconfig properties
|
||||
# ####################################
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/../../Buildscripts/properties.cmake")
|
||||
@@ -33,6 +33,34 @@ message(" - statusbar: ${statusbar_symbol_size}")
|
||||
message(" - launcher: ${launcher_symbol_size}")
|
||||
message(" - shared: ${shared_symbol_size}")
|
||||
|
||||
# ####################################
|
||||
# Read device properties
|
||||
# ####################################
|
||||
|
||||
# Load device.properties as a map
|
||||
get_property(TACTILITY_DEVICE_ID GLOBAL PROPERTY TACTILITY_DEVICE_ID)
|
||||
READ_PROPERTIES_TO_MAP(
|
||||
"${CMAKE_CURRENT_LIST_DIR}/../../Devices/${TACTILITY_DEVICE_ID}/device.properties"
|
||||
device_properties
|
||||
)
|
||||
# Read UI density
|
||||
GET_VALUE_FROM_MAP(device_properties "[lvgl]uiDensity" ui_density)
|
||||
# Define UiDensity enum value
|
||||
if (ui_density)
|
||||
if (ui_density STREQUAL "default")
|
||||
set(ui_density_variable "LVGL_UI_DENSITY_DEFAULT")
|
||||
elseif (ui_density STREQUAL "compact")
|
||||
set(ui_density_variable "LVGL_UI_DENSITY_COMPACT")
|
||||
else ()
|
||||
message(FATAL_ERROR "Invalid [lvgl]uiDensity: '${ui_density}'. Must be either 'default' or 'compact'")
|
||||
endif ()
|
||||
message("UI density set to '${ui_density}' via properties")
|
||||
else ()
|
||||
set(ui_density "default")
|
||||
set(ui_density_variable "LVGL_UI_DENSITY_DEFAULT")
|
||||
message("UI density set to default: ${ui_density}")
|
||||
endif ()
|
||||
|
||||
# ####################################
|
||||
# Create module
|
||||
# ####################################
|
||||
@@ -66,17 +94,22 @@ tactility_add_module(lvgl-module
|
||||
tactility_get_module_name("lvgl-module" MODULE_NAME)
|
||||
|
||||
target_compile_definitions(${MODULE_NAME} PUBLIC
|
||||
# Ensure it loads <lvgl.h>
|
||||
"-DLV_LVGL_H_INCLUDE_SIMPLE"
|
||||
# Text fonts
|
||||
"-DTT_LVGL_TEXT_FONT_SMALL_SIZE=${font_size_small}"
|
||||
"-DTT_LVGL_TEXT_FONT_SMALL_SYMBOL=lv_font_montserrat_${font_size_small}"
|
||||
"-DTT_LVGL_TEXT_FONT_DEFAULT_SIZE=${font_size_default}"
|
||||
"-DTT_LVGL_TEXT_FONT_DEFAULT_SYMBOL=lv_font_montserrat_${font_size_default}"
|
||||
"-DTT_LVGL_TEXT_FONT_LARGE_SIZE=${font_size_large}"
|
||||
"-DTT_LVGL_TEXT_FONT_LARGE_SYMBOL=lv_font_montserrat_${font_size_large}"
|
||||
# Icon fonts
|
||||
"-DTT_LVGL_STATUSBAR_FONT_ICON_SIZE=${statusbar_symbol_size}"
|
||||
"-DTT_LVGL_STATUSBAR_FONT_ICON_SYMBOL=material_symbols_statusbar_${statusbar_symbol_size}"
|
||||
"-DTT_LVGL_LAUNCHER_FONT_ICON_SIZE=${launcher_symbol_size}"
|
||||
"-DTT_LVGL_LAUNCHER_FONT_ICON_SYMBOL=material_symbols_launcher_${launcher_symbol_size}"
|
||||
"-DTT_LVGL_SHARED_FONT_ICON_SIZE=${shared_symbol_size}"
|
||||
"-DTT_LVGL_SHARED_FONT_ICON_SYMBOL=material_symbols_shared_${shared_symbol_size}"
|
||||
# UiDensity
|
||||
"-DTT_LVGL_UI_DENSITY=${ui_density_variable}"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user