ihm test work
This commit is contained in:
parent
1375e82550
commit
1fea5e284d
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,2 +1,6 @@
|
|||||||
build/
|
build/
|
||||||
managed_components/
|
managed_components/
|
||||||
|
build_slave/
|
||||||
|
CMakeFiles/
|
||||||
|
esp-idf/
|
||||||
|
gdbinit/
|
||||||
|
|||||||
@ -2,20 +2,22 @@
|
|||||||
# in this exact order for cmake to work correctly
|
# in this exact order for cmake to work correctly
|
||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
|
|
||||||
|
if($ENV{IDF_TARGET} STREQUAL "esp32p4")
|
||||||
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||||
# "Trim" the build. Include the minimal set of components, main and anything it depends on.
|
# "Trim" the build. Include the minimal set of components, main and anything it depends on.
|
||||||
set(COMPONENTS main)
|
set(COMPONENTS main)
|
||||||
|
|
||||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
|
||||||
|
|
||||||
if(${IDF_TARGET} STREQUAL "esp32p4")
|
|
||||||
set(EXTRA_COMPONENT_DIRS
|
set(EXTRA_COMPONENT_DIRS
|
||||||
/home/marc/esp-dev-kits/examples/esp32-p4-function-ev-board/examples/common_components
|
/home/marc/esp-dev-kits/examples/esp32-p4-function-ev-board/examples/common_components
|
||||||
$ENV{IDF_PATH}/examples/protocols/linux_stubs/esp_stubs
|
$ENV{IDF_PATH}/examples/protocols/linux_stubs/esp_stubs
|
||||||
)
|
)
|
||||||
|
project(rgb_lcd)
|
||||||
|
add_link_options("-Wl,--disable-non-contiguous-regions")
|
||||||
else()
|
else()
|
||||||
# PROJECT_PLATFORM_LINUX
|
# PROJECT_PLATFORM_LINUX
|
||||||
# PROJECT_PLATFORM_ESP32
|
# PROJECT_PLATFORM_ESP32
|
||||||
add_compile_definitions(PROJECT_PLATFORM_LINUX)
|
add_compile_definitions(PROJECT_PLATFORM_LINUX)
|
||||||
|
set(EXCLUDE_COMPONENTS main driver bh1750 espressif__bh1750 wifi_logger)
|
||||||
|
|
||||||
set(EXTRA_COMPONENT_DIRS
|
set(EXTRA_COMPONENT_DIRS
|
||||||
$ENV{IDF_PATH}/examples/protocols/linux_stubs/esp_stubs
|
$ENV{IDF_PATH}/examples/protocols/linux_stubs/esp_stubs
|
||||||
@ -23,6 +25,27 @@ else()
|
|||||||
"/home/marc/esp-protocols/common_components/linux_compat"
|
"/home/marc/esp-protocols/common_components/linux_compat"
|
||||||
"/home/marc/esp-protocols/components/mdns/tests/host_test/components"
|
"/home/marc/esp-protocols/components/mdns/tests/host_test/components"
|
||||||
)
|
)
|
||||||
|
project(rgb_lcd)
|
||||||
|
|
||||||
|
add_executable(domotic_display
|
||||||
|
components/domotic_display/ihm.c
|
||||||
|
# ajoute d’autres fichiers si nécessaire
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# -- FreeRTOS config
|
||||||
|
add_library(freertos_config INTERFACE)
|
||||||
|
target_include_directories(freertos_config INTERFACE
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/FreeRTOSConfig
|
||||||
|
)
|
||||||
|
|
||||||
|
add_subdirectory(FreeRTOS/FreeRTOS/Source)
|
||||||
|
add_subdirectory(components/meteofrance)
|
||||||
|
add_subdirectory(components/stateManagement)
|
||||||
|
add_subdirectory(managed_components/lvgl__lvgl)
|
||||||
|
target_include_directories(domotic_display PRIVATE components/domotic_display/include)
|
||||||
|
# --- Liens nécessaires ---
|
||||||
|
target_link_libraries(domotic_display PRIVATE freertos_kernel lvgl m pthread meteofrance)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
project(rgb_lcd)
|
|
||||||
15
FreeRTOSConfig/FreeRTOSConfig.h
Normal file
15
FreeRTOSConfig/FreeRTOSConfig.h
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#ifndef FREERTOS_CONFIG_H
|
||||||
|
#define FREERTOS_CONFIG_H
|
||||||
|
|
||||||
|
#define configUSE_PREEMPTION 1
|
||||||
|
#define configUSE_IDLE_HOOK 0
|
||||||
|
#define configUSE_TICK_HOOK 0
|
||||||
|
#define configCPU_CLOCK_HZ ( ( unsigned long ) 80000000 )
|
||||||
|
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
|
||||||
|
#define configMAX_PRIORITIES 5
|
||||||
|
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 )
|
||||||
|
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 64 * 1024 ) )
|
||||||
|
#define configMAX_TASK_NAME_LEN 10
|
||||||
|
#define configUSE_16_BIT_TICKS 0
|
||||||
|
|
||||||
|
#endif /* FREERTOS_CONFIG_H */
|
||||||
8647
compile_commands.json
Normal file
8647
compile_commands.json
Normal file
File diff suppressed because one or more lines are too long
@ -8,7 +8,7 @@ make_font(24)
|
|||||||
|
|
||||||
idf_component_register(SRC_DIRS . fonts
|
idf_component_register(SRC_DIRS . fonts
|
||||||
INCLUDE_DIRS "include"
|
INCLUDE_DIRS "include"
|
||||||
REQUIRES bsp_extra esp32_p4_function_ev_board meteofrance eventsManager)
|
REQUIRES meteofrance eventsManager lvgl)
|
||||||
|
|
||||||
|
|
||||||
if(${IDF_TARGET} STREQUAL "esp32p4")
|
if(${IDF_TARGET} STREQUAL "esp32p4")
|
||||||
|
|||||||
@ -1,13 +1,9 @@
|
|||||||
#include "bsp/display.h"
|
|
||||||
#include "bsp_board_extra.h"
|
|
||||||
#include "lv_theme_domotic.h"
|
#include "lv_theme_domotic.h"
|
||||||
#include "esp_lvgl_port.h"
|
|
||||||
#include "ihm.h"
|
#include "ihm.h"
|
||||||
#include "misc/lv_types.h"
|
#include "misc/lv_types.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
#include "meteofrance.h"
|
#include "meteofrance.h"
|
||||||
#include "bsp/esp-bsp.h"
|
|
||||||
#include "cJSON.h"
|
#include "cJSON.h"
|
||||||
#include "eventsManager.h"
|
#include "eventsManager.h"
|
||||||
|
|
||||||
@ -45,6 +41,12 @@ static lv_subject_t wifiStatus;
|
|||||||
LV_IMAGE_DECLARE(wifi_ok);
|
LV_IMAGE_DECLARE(wifi_ok);
|
||||||
LV_IMAGE_DECLARE(wifi_ko);
|
LV_IMAGE_DECLARE(wifi_ko);
|
||||||
|
|
||||||
|
int bsp_display_lock(int arg){
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
void bsp_display_unlock(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
static void wifiStatus_obs_cb(lv_observer_t * observer, lv_subject_t * subject)
|
static void wifiStatus_obs_cb(lv_observer_t * observer, lv_subject_t * subject)
|
||||||
{
|
{
|
||||||
@ -136,7 +138,7 @@ void drawIhm(void *xIHMEventQueueParam) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case IHM_EVT_OTA_PROGRESS:
|
case IHM_EVT_OTA_PROGRESS:
|
||||||
setOTAProgress((int)xReceivedEvent->pvData);
|
//setOTAProgress((int)xReceivedEvent->pvData);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IHM_EVT_HUMID_TEMP:
|
case IHM_EVT_HUMID_TEMP:
|
||||||
@ -234,6 +236,7 @@ static void event_handler(lv_event_t *e)
|
|||||||
|
|
||||||
|
|
||||||
void init_display(){
|
void init_display(){
|
||||||
|
/*
|
||||||
lvgl_port_cfg_t lvgl_cfg = ESP_LVGL_PORT_INIT_CONFIG();
|
lvgl_port_cfg_t lvgl_cfg = ESP_LVGL_PORT_INIT_CONFIG();
|
||||||
lvgl_cfg.task_priority=15;
|
lvgl_cfg.task_priority=15;
|
||||||
bsp_display_cfg_t cfg = {
|
bsp_display_cfg_t cfg = {
|
||||||
@ -252,6 +255,7 @@ void init_display(){
|
|||||||
|
|
||||||
bsp_display_backlight_on();
|
bsp_display_backlight_on();
|
||||||
bsp_display_brightness_set(50);
|
bsp_display_brightness_set(50);
|
||||||
|
*/
|
||||||
mainState.display_init=true;
|
mainState.display_init=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -422,7 +426,7 @@ void meteo_obs_cb(lv_observer_t *observer, lv_subject_t *subject)
|
|||||||
ESP_LOGI(TAG, "On passe dans le callback de chgt de statut meteo; %li", lv_subject_get_int(subject));
|
ESP_LOGI(TAG, "On passe dans le callback de chgt de statut meteo; %li", lv_subject_get_int(subject));
|
||||||
if (display_lock("meteo_obs_cb"))
|
if (display_lock("meteo_obs_cb"))
|
||||||
{
|
{
|
||||||
lv_obj_t *meteoSt = observer->target;
|
lv_obj_t *meteoSt = lv_observer_get_target(observer);
|
||||||
switch (lv_subject_get_int(subject))
|
switch (lv_subject_get_int(subject))
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@ -455,7 +459,7 @@ static void weatherdata_obs_cb(lv_observer_t *observer, lv_subject_t *subject)
|
|||||||
// char buff[40] = {};
|
// char buff[40] = {};
|
||||||
// sprintf(buff,"%s %.1f %.1f", data->previsions.desc, data->previsions.min, data->previsions.max);
|
// sprintf(buff,"%s %.1f %.1f", data->previsions.desc, data->previsions.min, data->previsions.max);
|
||||||
if(data->isValid){
|
if(data->isValid){
|
||||||
lv_obj_t *parent = (lv_obj_t *)(observer->target);
|
lv_obj_t *parent = (lv_obj_t *)(lv_observer_get_target(observer));
|
||||||
lv_obj_t *datefld = lv_obj_get_child(parent, 0);
|
lv_obj_t *datefld = lv_obj_get_child(parent, 0);
|
||||||
lv_obj_t *desc_icon = lv_obj_get_child(parent, 1);
|
lv_obj_t *desc_icon = lv_obj_get_child(parent, 1);
|
||||||
lv_obj_t *temps = lv_obj_get_child(parent, 2);
|
lv_obj_t *temps = lv_obj_get_child(parent, 2);
|
||||||
@ -484,7 +488,7 @@ static void weatherdataH_obs_cb(lv_observer_t *observer, lv_subject_t *subject)
|
|||||||
sprintf(buff,"%.1f", data->previsions.value);
|
sprintf(buff,"%.1f", data->previsions.value);
|
||||||
ESP_LOGV(TAG, "On a recu [%s]", buff);
|
ESP_LOGV(TAG, "On a recu [%s]", buff);
|
||||||
|
|
||||||
lv_obj_t *parent = (lv_obj_t *)(observer->target);
|
lv_obj_t *parent = (lv_obj_t *)(lv_observer_get_target(observer));
|
||||||
lv_obj_t *datefld = lv_obj_get_child(parent, 0);
|
lv_obj_t *datefld = lv_obj_get_child(parent, 0);
|
||||||
lv_obj_t *temp_desc_icon = lv_obj_get_child(parent, 1);
|
lv_obj_t *temp_desc_icon = lv_obj_get_child(parent, 1);
|
||||||
showMeteoIcon(data->previsions.icon, temp_desc_icon, 1);
|
showMeteoIcon(data->previsions.icon, temp_desc_icon, 1);
|
||||||
@ -690,7 +694,7 @@ void btnRestart_cb(lv_event_t * e){
|
|||||||
lv_event_code_t code = lv_event_get_code(e);
|
lv_event_code_t code = lv_event_get_code(e);
|
||||||
|
|
||||||
if(code == LV_EVENT_CLICKED) {
|
if(code == LV_EVENT_CLICKED) {
|
||||||
esp_restart();
|
//esp_restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -713,7 +717,7 @@ static void log_event_handler(lv_event_t * e)
|
|||||||
|
|
||||||
static lv_style_t style_lbvValue;
|
static lv_style_t style_lbvValue;
|
||||||
static lv_style_t style_btn;
|
static lv_style_t style_btn;
|
||||||
|
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||||
static void draw_event_cb(lv_event_t * e)
|
static void draw_event_cb(lv_event_t * e)
|
||||||
{
|
{
|
||||||
lv_draw_task_t * draw_task = lv_event_get_draw_task(e);
|
lv_draw_task_t * draw_task = lv_event_get_draw_task(e);
|
||||||
@ -1023,6 +1027,7 @@ void draw_tabVolets(lv_obj_t* parent)
|
|||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
/* Dessin IHM */
|
/* Dessin IHM */
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
|
|
||||||
void draw_ihm()
|
void draw_ihm()
|
||||||
{
|
{
|
||||||
lv_subject_init_string(&tempExtSubj, tempExtStr, NULL, 6, "--");
|
lv_subject_init_string(&tempExtSubj, tempExtStr, NULL, 6, "--");
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "meteofrance.h"
|
#include "meteofrance.h"
|
||||||
#include "esp_lvgl_port.h"
|
#include "lvgl.h"
|
||||||
#include "bsp/esp-bsp.h"
|
|
||||||
|
|
||||||
void app_main_display();
|
void app_main_display();
|
||||||
void app_ota_display();
|
void app_ota_display();
|
||||||
|
|||||||
@ -13,7 +13,7 @@ extern "C" {
|
|||||||
/*********************
|
/*********************
|
||||||
* INCLUDES
|
* INCLUDES
|
||||||
*********************/
|
*********************/
|
||||||
#include "esp_lvgl_port.h"
|
#include "lvgl.h"
|
||||||
|
|
||||||
/*********************
|
/*********************
|
||||||
* DEFINES
|
* DEFINES
|
||||||
|
|||||||
@ -9,7 +9,6 @@
|
|||||||
*********************/
|
*********************/
|
||||||
#if LV_USE_THEME_SIMPLE_DOMOTIC
|
#if LV_USE_THEME_SIMPLE_DOMOTIC
|
||||||
#include "lv_theme_domotic.h"
|
#include "lv_theme_domotic.h"
|
||||||
#include "esp_lvgl_port.h"
|
|
||||||
/*********************
|
/*********************
|
||||||
* DEFINES
|
* DEFINES
|
||||||
*********************/
|
*********************/
|
||||||
|
|||||||
29
components/domotic_display/test_host/CMakeLists.txt
Normal file
29
components/domotic_display/test_host/CMakeLists.txt
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||||
|
set(COMPONENTS main)
|
||||||
|
# This test app doesn't require FreeRTOS, using mock instead
|
||||||
|
list(APPEND EXTRA_COMPONENT_DIRS
|
||||||
|
"$ENV{IDF_PATH}/tools/mocks/freertos/"
|
||||||
|
"$ENV{IDF_PATH}/tools/mocks/esp_timer"
|
||||||
|
../../meteofrance
|
||||||
|
../../stateManagement
|
||||||
|
../../eventsManager
|
||||||
|
)
|
||||||
|
|
||||||
|
idf_build_set_property(COMPILE_DEFINITIONS "NO_DEBUG_STORAGE" APPEND)
|
||||||
|
project(nvs_host_test)
|
||||||
|
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/coverage_report/index.html"
|
||||||
|
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
|
COMMAND gcovr --root $ENV{IDF_PATH}/components/nvs_flash --html-details
|
||||||
|
--exclude ${CMAKE_CURRENT_SOURCE_DIR}/managed_components/*
|
||||||
|
-o ${CMAKE_CURRENT_BINARY_DIR}/coverage_report/index.html ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
COMMENT "Generate coverage report"
|
||||||
|
)
|
||||||
|
|
||||||
|
add_custom_target(coverage
|
||||||
|
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
|
DEPENDS "coverage_report/index.html"
|
||||||
|
)
|
||||||
17
components/domotic_display/test_host/dependencies.lock
Normal file
17
components/domotic_display/test_host/dependencies.lock
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
dependencies:
|
||||||
|
idf:
|
||||||
|
source:
|
||||||
|
type: idf
|
||||||
|
version: 5.5.1
|
||||||
|
lvgl/lvgl:
|
||||||
|
component_hash: 17e68bfd21f0edf4c3ee838e2273da840bf3930e5dbc3bfa6c1190c3aed41f9f
|
||||||
|
dependencies: []
|
||||||
|
source:
|
||||||
|
registry_url: https://components.espressif.com/
|
||||||
|
type: service
|
||||||
|
version: 9.4.0
|
||||||
|
direct_dependencies:
|
||||||
|
- lvgl/lvgl
|
||||||
|
manifest_hash: b69f67d8253596e504fba179d3e69969cb4958216d37d471849a023add797535
|
||||||
|
target: linux
|
||||||
|
version: 2.0.0
|
||||||
5
components/domotic_display/test_host/idf_component.yml
Normal file
5
components/domotic_display/test_host/idf_component.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
dependencies:
|
||||||
|
lvgl/lvgl:
|
||||||
|
version: 9.4.0
|
||||||
|
#espressif/esp32_p4_function_ev_board:
|
||||||
|
# version: "4.1.*"
|
||||||
27
components/domotic_display/test_host/main/CMakeLists.txt
Normal file
27
components/domotic_display/test_host/main/CMakeLists.txt
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
set(LV_BUILD_USE_KCONFIG ON)
|
||||||
|
idf_component_register(SRCS "test_ihm.c" "../../ihm.c" "driver_backends.c" "sdl.c" "../../lv_theme_domotic.c"
|
||||||
|
INCLUDE_DIRS
|
||||||
|
"../../include"
|
||||||
|
WHOLE_ARCHIVE
|
||||||
|
REQUIRES lvgl meteofrance)
|
||||||
|
|
||||||
|
message("Including SDL2 support")
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(SDL2 REQUIRED sdl2)
|
||||||
|
pkg_check_modules(SDL2_IMAGE REQUIRED SDL2_image)
|
||||||
|
|
||||||
|
list(APPEND PKG_CONFIG_LIB ${SDL2_LIBRARIES} ${SDL2_IMAGE_LIBRARIES})
|
||||||
|
list(APPEND PKG_CONFIG_INC ${SDL2_INCLUDE_DIRS} ${SDL2_IMAGE_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
target_compile_options(${COMPONENT_LIB} PUBLIC --coverage)
|
||||||
|
target_link_libraries(${COMPONENT_LIB} PUBLIC ${PKG_CONFIG_LIB} --coverage)
|
||||||
|
target_include_directories(${COMPONENT_LIB} PRIVATE ${CMAKE_SOURCE_DIR}/mock ${PKG_CONFIG_INC})
|
||||||
|
|
||||||
|
|
||||||
|
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
|
target_compile_options(${COMPONENT_LIB} PRIVATE -std=gnu++20)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Currently 'main' for IDF_TARGET=linux is defined in freertos component.
|
||||||
|
# Since we are using a freertos mock here, need to let Catch2 provide 'main'.
|
||||||
|
#target_link_libraries(${COMPONENT_LIB} PRIVATE Catch2WithMain)
|
||||||
97
components/domotic_display/test_host/main/backends.h
Normal file
97
components/domotic_display/test_host/main/backends.h
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
/**
|
||||||
|
* @file backends.h
|
||||||
|
*
|
||||||
|
* Interface for abstration layer of a device backend
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 EDGEMTech Ltd.
|
||||||
|
*
|
||||||
|
* Author: EDGEMTech Ltd, Erik Tagirov (erik.tagirov@edgemtech.ch)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifndef BACKENDS_H
|
||||||
|
#define BACKENDS_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*********************
|
||||||
|
* INCLUDES
|
||||||
|
*********************/
|
||||||
|
|
||||||
|
/*********************
|
||||||
|
* DEFINES
|
||||||
|
*********************/
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* TYPEDEFS
|
||||||
|
**********************/
|
||||||
|
/* Prototype of the display initialization functions */
|
||||||
|
typedef lv_display_t *(*display_init_t)(void);
|
||||||
|
|
||||||
|
/* Prototype of the run loop */
|
||||||
|
typedef void (*run_loop_t)(void);
|
||||||
|
|
||||||
|
/* Represents a display driver handle */
|
||||||
|
typedef struct {
|
||||||
|
display_init_t init_display; /* The display creation/initialization function */
|
||||||
|
run_loop_t run_loop; /* The run loop of the driver handle */
|
||||||
|
lv_display_t *display; /* The LVGL display that was created */
|
||||||
|
} display_backend_t;
|
||||||
|
|
||||||
|
/* Prototype for the initialization of an indev driver backend */
|
||||||
|
typedef lv_indev_t *(*indev_init_t)(lv_display_t *display);
|
||||||
|
|
||||||
|
/* Represents an indev driver backend */
|
||||||
|
typedef struct {
|
||||||
|
indev_init_t init_indev;
|
||||||
|
} indev_backend_t;
|
||||||
|
|
||||||
|
/* Regroup all different types of driver backend */
|
||||||
|
typedef union {
|
||||||
|
display_backend_t *display;
|
||||||
|
indev_backend_t *indev;
|
||||||
|
} backend_handle_t;
|
||||||
|
|
||||||
|
/* Define each type of driver backend */
|
||||||
|
typedef enum {
|
||||||
|
BACKEND_DISPLAY,
|
||||||
|
BACKEND_INDEV
|
||||||
|
} backend_type_t;
|
||||||
|
|
||||||
|
/* Driver backend descriptor */
|
||||||
|
typedef struct {
|
||||||
|
backend_handle_t *handle;
|
||||||
|
char *name;
|
||||||
|
backend_type_t type;
|
||||||
|
} backend_t;
|
||||||
|
|
||||||
|
/* Prototype used to register a backend */
|
||||||
|
typedef int (*backend_init_t)(backend_t *);
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* GLOBAL PROTOTYPES
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
/* Graphics backends */
|
||||||
|
int backend_init_fbdev(backend_t *backend);
|
||||||
|
int backend_init_drm(backend_t *backend);
|
||||||
|
int backend_init_sdl(backend_t *backend);
|
||||||
|
int backend_init_glfw3(backend_t *backend);
|
||||||
|
int backend_init_wayland(backend_t *backend);
|
||||||
|
int backend_init_x11(backend_t *backend);
|
||||||
|
|
||||||
|
/* Input device driver backends */
|
||||||
|
int backend_init_evdev(backend_t *backend);
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* MACROS
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} /*extern "C"*/
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /*BACKEND_H*/
|
||||||
|
|
||||||
|
|
||||||
281
components/domotic_display/test_host/main/driver_backends.c
Normal file
281
components/domotic_display/test_host/main/driver_backends.c
Normal file
@ -0,0 +1,281 @@
|
|||||||
|
/**
|
||||||
|
* @file driver_backends.c
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 EDGEMTech Ltd.
|
||||||
|
*
|
||||||
|
* Author: EDGEMTech Ltd, Erik Tagirov (erik.tagirov@edgemtech.ch)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*********************
|
||||||
|
* INCLUDES
|
||||||
|
*********************/
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <pthread.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
|
#include "lvgl.h"
|
||||||
|
|
||||||
|
#include "simulator_util.h"
|
||||||
|
#include "simulator_settings.h"
|
||||||
|
#include "driver_backends.h"
|
||||||
|
|
||||||
|
#include "backends.h"
|
||||||
|
|
||||||
|
/*********************
|
||||||
|
* DEFINES
|
||||||
|
*********************/
|
||||||
|
|
||||||
|
/* Catch configuration errors at compile time - checks if no backend was selected */
|
||||||
|
#if LV_USE_SDL == 0 && \
|
||||||
|
LV_USE_WAYLAND == 0 && \
|
||||||
|
LV_USE_LINUX_DRM == 0 && \
|
||||||
|
LV_USE_GLFW == 0 && \
|
||||||
|
LV_USE_X11 == 0 && \
|
||||||
|
LV_USE_LINUX_FBDEV == 0
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* TYPEDEFS
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* STATIC PROTOTYPES
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* STATIC VARIABLES
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
/* The default backend is the one that will end up at index 0
|
||||||
|
* To add support for a new driver backend add the declaration
|
||||||
|
* and append an entry to the available_backends array
|
||||||
|
*/
|
||||||
|
backend_init_t available_backends[] = {
|
||||||
|
|
||||||
|
#if LV_USE_LINUX_FBDEV
|
||||||
|
backend_init_fbdev,
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if LV_USE_LINUX_DRM
|
||||||
|
backend_init_drm,
|
||||||
|
#endif
|
||||||
|
|
||||||
|
backend_init_sdl,
|
||||||
|
|
||||||
|
#if LV_USE_WAYLAND
|
||||||
|
backend_init_wayland,
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if LV_USE_X11
|
||||||
|
backend_init_x11,
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if LV_USE_GLFW
|
||||||
|
backend_init_glfw3,
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if LV_USE_EVDEV
|
||||||
|
backend_init_evdev,
|
||||||
|
#endif
|
||||||
|
NULL /* Sentinel */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Contains the backend descriptors */
|
||||||
|
static backend_t *backends[sizeof(available_backends) / sizeof(available_backends[0])];
|
||||||
|
|
||||||
|
/* Set once the user selects a backend - or it is set to the default backend */
|
||||||
|
static backend_t *sel_display_backend = NULL;
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* GLOBAL VARIABLES
|
||||||
|
**********************/
|
||||||
|
/* Contains global simulator settings common to each backend */
|
||||||
|
simulator_settings_t settings;
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* MACROS
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* GLOBAL FUNCTIONS
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
void driver_backends_register(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
backend_init_t init_backend;
|
||||||
|
backend_t *b;
|
||||||
|
|
||||||
|
i = 0;
|
||||||
|
if (backends[i] != NULL) {
|
||||||
|
/* backends are already registered - leave */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
while ((init_backend = available_backends[i]) != NULL) {
|
||||||
|
|
||||||
|
b = malloc(sizeof(backend_t));
|
||||||
|
LV_ASSERT_NULL(b);
|
||||||
|
|
||||||
|
b->handle = malloc(sizeof(backend_handle_t));
|
||||||
|
|
||||||
|
init_backend = available_backends[i];
|
||||||
|
LV_ASSERT_NULL(init_backend);
|
||||||
|
|
||||||
|
init_backend(b);
|
||||||
|
backends[i] = b;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int driver_backends_init_backend(char *backend_name)
|
||||||
|
{
|
||||||
|
backend_t *b;
|
||||||
|
int i;
|
||||||
|
display_backend_t *dispb;
|
||||||
|
indev_backend_t *indevb;
|
||||||
|
|
||||||
|
if (backends[0] == NULL) {
|
||||||
|
LV_LOG_ERROR("Please call driver_backends_register first");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (backend_name == NULL) {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set default display backend - which is the first defined
|
||||||
|
* item in available_backends array
|
||||||
|
*/
|
||||||
|
LV_ASSERT_NULL(backends[0]);
|
||||||
|
b = backends[0];
|
||||||
|
|
||||||
|
if (b->type != BACKEND_DISPLAY) {
|
||||||
|
LV_LOG_ERROR("The default backend: %s is not a display driver backend", b->name);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
backend_name = backends[0]->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
i = 0;
|
||||||
|
while ((b = backends[i]) != NULL) {
|
||||||
|
|
||||||
|
/* Check if such a backend exists */
|
||||||
|
if (strcmp(b->name, backend_name) == 0) {
|
||||||
|
|
||||||
|
if (b->type == BACKEND_DISPLAY) {
|
||||||
|
/* Initialize the display */
|
||||||
|
|
||||||
|
dispb = b->handle->display;
|
||||||
|
LV_ASSERT_NULL(dispb->init_display);
|
||||||
|
dispb->display = dispb->init_display();
|
||||||
|
|
||||||
|
if (dispb->display == NULL) {
|
||||||
|
LV_LOG_ERROR("Failed to init display with %s backend", b->name);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
sel_display_backend = b;
|
||||||
|
LV_LOG_INFO("Initialized %s display backend", b->name);
|
||||||
|
break;
|
||||||
|
|
||||||
|
} else if (b->type == BACKEND_INDEV) {
|
||||||
|
/* Initialize input device */
|
||||||
|
|
||||||
|
indevb = b->handle->indev;
|
||||||
|
LV_ASSERT_NULL(indevb->init_indev);
|
||||||
|
|
||||||
|
/* The display driver backend - has to be initialized first */
|
||||||
|
if (sel_display_backend == NULL) {
|
||||||
|
LV_LOG_ERROR(
|
||||||
|
"Failed to init indev backend: %s - display needs to be initialized",
|
||||||
|
b->name);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
LV_LOG_INFO("Initialized %s indev backend", b->name);
|
||||||
|
|
||||||
|
dispb = sel_display_backend->handle->display;
|
||||||
|
|
||||||
|
LV_ASSERT_NULL(dispb->display);
|
||||||
|
indevb->init_indev(dispb->display);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int driver_backends_print_supported(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
backend_t *b;
|
||||||
|
|
||||||
|
i = 0;
|
||||||
|
if (backends[i] == NULL) {
|
||||||
|
LV_LOG_ERROR("Please call driver_backends_register first");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
b = backends[i];
|
||||||
|
|
||||||
|
fprintf(stdout, "Default backend: %s\n", b->name);
|
||||||
|
fprintf(stdout, "Supported backends: ");
|
||||||
|
|
||||||
|
while ((b = backends[i++]) != NULL) {
|
||||||
|
fprintf(stdout, "%s ", b->name);
|
||||||
|
}
|
||||||
|
|
||||||
|
fprintf(stdout, "\n");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int driver_backends_is_supported(char *backend_name)
|
||||||
|
{
|
||||||
|
char c;
|
||||||
|
backend_t *b;
|
||||||
|
char *name = backend_name;
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
while ((c = *backend_name) != '\0') {
|
||||||
|
*backend_name = toupper(c);
|
||||||
|
backend_name++;
|
||||||
|
}
|
||||||
|
|
||||||
|
while ((b = backends[i++]) != NULL) {
|
||||||
|
if (strcmp(b->name, name) == 0) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void driver_backends_run_loop(void)
|
||||||
|
{
|
||||||
|
display_backend_t *dispb;
|
||||||
|
|
||||||
|
if (sel_display_backend != NULL && sel_display_backend->handle->display != NULL) {
|
||||||
|
|
||||||
|
dispb = sel_display_backend->handle->display;
|
||||||
|
dispb->run_loop();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
LV_LOG_ERROR("No backend has been selected - initialize the backend first");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* STATIC FUNCTIONS
|
||||||
|
**********************/
|
||||||
|
|
||||||
93
components/domotic_display/test_host/main/driver_backends.h
Normal file
93
components/domotic_display/test_host/main/driver_backends.h
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
/**
|
||||||
|
* @file driver_backends.h
|
||||||
|
*
|
||||||
|
* provides an abstration to support multiple graphical
|
||||||
|
* driver backends at the same time whitout recompiling everything
|
||||||
|
* each time
|
||||||
|
*
|
||||||
|
* E.g: this means LVGL can be compiled with both SDL or X11
|
||||||
|
*
|
||||||
|
* - see backend.h for the details on the interface.
|
||||||
|
* - see the files in display_backends directory for examples
|
||||||
|
* on how to use each driver
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 EDGEMTech Ltd.
|
||||||
|
*
|
||||||
|
* Author: EDGEMTech Ltd, Erik Tagirov (erik.tagirov@edgemtech.ch)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef DRIVER_BACKENDS_H
|
||||||
|
#define DRIVER_BACKENDS_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*********************
|
||||||
|
* INCLUDES
|
||||||
|
*********************/
|
||||||
|
|
||||||
|
/*********************
|
||||||
|
* DEFINES
|
||||||
|
*********************/
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* TYPEDEFS
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* GLOBAL PROTOTYPES
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Register all available backends
|
||||||
|
* This function must be called first before any other
|
||||||
|
* function
|
||||||
|
*/
|
||||||
|
void driver_backends_register(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the specified backend
|
||||||
|
* @description in case of a display driver backend
|
||||||
|
* - create the lv_display, in case of a indev driver backend
|
||||||
|
* create an input device
|
||||||
|
*
|
||||||
|
* @param backend_name the name of the backend to initialize FBDEV,DRM etc
|
||||||
|
* @return 0 on success, -1 on error
|
||||||
|
*/
|
||||||
|
int driver_backends_init_backend(char *backend_name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Checks if a backend exists and is supported
|
||||||
|
* @param backend_name the backend name to check
|
||||||
|
* @return 1 is supported, 0 not supported or invalid name
|
||||||
|
*/
|
||||||
|
int driver_backends_is_supported(char *backend_name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Print supported backends
|
||||||
|
* @description Prints a list of supported backends
|
||||||
|
*
|
||||||
|
* @return -1 if an error occurred, 0 on success
|
||||||
|
*/
|
||||||
|
int driver_backends_print_supported(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enter the run loop
|
||||||
|
* @description enter the run loop of the selected backend
|
||||||
|
*/
|
||||||
|
void driver_backends_run_loop(void);
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* MACROS
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} /*extern "C"*/
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /*DRIVER_BACKENDS_H*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
dependencies:
|
||||||
|
lvgl/lvgl:
|
||||||
|
version: 9.4.0
|
||||||
|
#espressif/esp32_p4_function_ev_board:
|
||||||
|
# version: "4.1.*"
|
||||||
115
components/domotic_display/test_host/main/sdl.c
Normal file
115
components/domotic_display/test_host/main/sdl.c
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
/**
|
||||||
|
* @file sdl.c
|
||||||
|
*
|
||||||
|
* The backend for the SDL simulator
|
||||||
|
*
|
||||||
|
* Based on the original file from the repository
|
||||||
|
*
|
||||||
|
* - Move to a separate file
|
||||||
|
* 2025 EDGEMTech Ltd.
|
||||||
|
*
|
||||||
|
* Author: EDGEMTech Ltd, Erik Tagirov (erik.tagirov@edgemtech.ch)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*********************
|
||||||
|
* INCLUDES
|
||||||
|
*********************/
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#include "lvgl.h"
|
||||||
|
#include "simulator_util.h"
|
||||||
|
#include "simulator_settings.h"
|
||||||
|
#include "backends.h"
|
||||||
|
|
||||||
|
/*********************
|
||||||
|
* DEFINES
|
||||||
|
*********************/
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* TYPEDEFS
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* EXTERNAL VARIABLES
|
||||||
|
**********************/
|
||||||
|
extern simulator_settings_t settings;
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* STATIC PROTOTYPES
|
||||||
|
**********************/
|
||||||
|
static void run_loop_sdl(void);
|
||||||
|
static lv_display_t *init_sdl(void);
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* STATIC VARIABLES
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
static char *backend_name = "SDL";
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* MACROS
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* GLOBAL FUNCTIONS
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register the backend
|
||||||
|
* @param backend the backend descriptor
|
||||||
|
* @description configures the descriptor
|
||||||
|
*/
|
||||||
|
int backend_init_sdl(backend_t *backend)
|
||||||
|
{
|
||||||
|
LV_ASSERT_NULL(backend);
|
||||||
|
|
||||||
|
backend->handle->display = malloc(sizeof(display_backend_t));
|
||||||
|
LV_ASSERT_NULL(backend->handle->display);
|
||||||
|
|
||||||
|
backend->handle->display->init_display = init_sdl;
|
||||||
|
backend->handle->display->run_loop = run_loop_sdl;
|
||||||
|
backend->name = backend_name;
|
||||||
|
backend->type = BACKEND_DISPLAY;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* STATIC FUNCTIONS
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the SDL display driver
|
||||||
|
*
|
||||||
|
* @return the LVGL display
|
||||||
|
*/
|
||||||
|
static lv_display_t *init_sdl(void)
|
||||||
|
{
|
||||||
|
lv_display_t *disp;
|
||||||
|
|
||||||
|
disp = lv_sdl_window_create(settings.window_width, settings.window_height);
|
||||||
|
|
||||||
|
if (disp == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return disp;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The run loop of the SDL driver
|
||||||
|
*/
|
||||||
|
static void run_loop_sdl(void)
|
||||||
|
{
|
||||||
|
uint32_t idle_time;
|
||||||
|
|
||||||
|
/* Handle LVGL tasks */
|
||||||
|
while (true) {
|
||||||
|
/* Returns the time to the next timer execution */
|
||||||
|
idle_time = lv_timer_handler();
|
||||||
|
usleep(idle_time * 1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,53 @@
|
|||||||
|
/**
|
||||||
|
* @file simulator_settings.h
|
||||||
|
*
|
||||||
|
* global simulator settings
|
||||||
|
*
|
||||||
|
* The simulator settings is a global variable defined in
|
||||||
|
* simulator_settings.c
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 EDGEMTech Ltd.
|
||||||
|
*
|
||||||
|
* Author: EDGEMTech Ltd, Erik Tagirov (erik.tagirov@edgemtech.ch)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SIMULATOR_SETTINGS_H
|
||||||
|
#define SIMULATOR_SETTINGS_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*********************
|
||||||
|
* INCLUDES
|
||||||
|
*********************/
|
||||||
|
|
||||||
|
/*********************
|
||||||
|
* DEFINES
|
||||||
|
*********************/
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* TYPEDEFS
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint32_t window_width;
|
||||||
|
uint32_t window_height;
|
||||||
|
bool maximize;
|
||||||
|
bool fullscreen;
|
||||||
|
} simulator_settings_t;
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* GLOBAL PROTOTYPES
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* MACROS
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} /*extern "C"*/
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /*SIMULATOR_SETTINGS_H*/
|
||||||
66
components/domotic_display/test_host/main/simulator_util.c
Normal file
66
components/domotic_display/test_host/main/simulator_util.c
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
/**
|
||||||
|
* @file simulator_util.c
|
||||||
|
*
|
||||||
|
* Utility functions
|
||||||
|
* Copyright (c) 2025 EDGEMTech Ltd.
|
||||||
|
*
|
||||||
|
* Based on the original file from the repo
|
||||||
|
*
|
||||||
|
* Author: EDGEMTech Ltd, Erik Tagirov (erik.tagirov@edgemtech.ch)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*********************
|
||||||
|
* INCLUDES
|
||||||
|
*********************/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
/*********************
|
||||||
|
* DEFINES
|
||||||
|
*********************/
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* TYPEDEFS
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* STATIC PROTOTYPES
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* STATIC VARIABLES
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* MACROS
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* GLOBAL FUNCTIONS
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
const char *getenv_default(const char *name, const char *default_val)
|
||||||
|
{
|
||||||
|
const char* value = getenv(name);
|
||||||
|
return value ? value : default_val;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void die(const char *msg, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
va_start(args, msg);
|
||||||
|
vfprintf(stderr, msg, args);
|
||||||
|
va_end(args);
|
||||||
|
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* STATIC FUNCTIONS
|
||||||
|
**********************/
|
||||||
62
components/domotic_display/test_host/main/simulator_util.h
Normal file
62
components/domotic_display/test_host/main/simulator_util.h
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
/**
|
||||||
|
* @file simulator_util.h
|
||||||
|
*
|
||||||
|
* simulator_util.h - Header file for the utility functions
|
||||||
|
* used by the simulator
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 EDGEMTech Ltd.
|
||||||
|
*
|
||||||
|
* Author: EDGEMTech Ltd, Erik Tagirov (erik.tagirov@edgemtech.ch)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SIMULATOR_UTIL_H
|
||||||
|
#define SIMULATOR_UTIL_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*********************
|
||||||
|
* INCLUDES
|
||||||
|
*********************/
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* GLOBAL PROTOTYPES
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Wrapper around getenv(3), allowing to set a default value
|
||||||
|
* @param name The name of the environment variable
|
||||||
|
* @param dflt The default value to set if the variable is not present.
|
||||||
|
* @return default value or value of environment variable.
|
||||||
|
*/
|
||||||
|
const char *getenv_default(const char *name, const char *default_val);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Centralized exit point, called due to an error
|
||||||
|
* @param msg The message to display on stderr before killing the program
|
||||||
|
* @param ... Values for the format string.
|
||||||
|
*/
|
||||||
|
void die(const char *msg, ...);
|
||||||
|
|
||||||
|
/*********************
|
||||||
|
* DEFINES
|
||||||
|
*********************/
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* TYPEDEFS
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* MACROS
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} /*extern "C"*/
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /*SIMULATOR_UTIL_H*/
|
||||||
137
components/domotic_display/test_host/main/test_ihm.c
Normal file
137
components/domotic_display/test_host/main/test_ihm.c
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
|
||||||
|
#define LV_USE_SDL 1
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "esp_wifi.h"
|
||||||
|
#include "ihm.h"
|
||||||
|
#include "mqtt_client.h"
|
||||||
|
#include "backends.h"
|
||||||
|
#include <unistd.h>
|
||||||
|
#include "driver_backends.h"
|
||||||
|
#include "simulator_util.h"
|
||||||
|
#include "simulator_settings.h"
|
||||||
|
|
||||||
|
esp_mqtt_client_handle_t client;
|
||||||
|
|
||||||
|
/* contains the name of the selected backend if user
|
||||||
|
* has specified one on the command line */
|
||||||
|
static char *selected_backend;
|
||||||
|
|
||||||
|
/* Global simulator settings, defined in lv_linux_backend.c */
|
||||||
|
extern simulator_settings_t settings;
|
||||||
|
|
||||||
|
void die(const char *msg, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
va_start(args, msg);
|
||||||
|
vfprintf(stderr, msg, args);
|
||||||
|
va_end(args);
|
||||||
|
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Print LVGL version
|
||||||
|
*/
|
||||||
|
static void print_lvgl_version(void)
|
||||||
|
{
|
||||||
|
fprintf(stdout, "%d.%d.%d-%s\n",
|
||||||
|
LVGL_VERSION_MAJOR,
|
||||||
|
LVGL_VERSION_MINOR,
|
||||||
|
LVGL_VERSION_PATCH,
|
||||||
|
LVGL_VERSION_INFO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Print usage information
|
||||||
|
*/
|
||||||
|
static void print_usage(void)
|
||||||
|
{
|
||||||
|
fprintf(stdout, "\nlvglsim [-V] [-B] [-b backend_name] [-W window_width] [-H window_height]\n\n");
|
||||||
|
fprintf(stdout, "-V print LVGL version\n");
|
||||||
|
fprintf(stdout, "-B list supported backends\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Configure simulator
|
||||||
|
* @description process arguments recieved by the program to select
|
||||||
|
* appropriate options
|
||||||
|
* @param argc the count of arguments in argv
|
||||||
|
* @param argv The arguments
|
||||||
|
*/
|
||||||
|
static void configure_simulator(int argc, char **argv)
|
||||||
|
{
|
||||||
|
int opt = 0;
|
||||||
|
|
||||||
|
selected_backend = NULL;
|
||||||
|
driver_backends_register();
|
||||||
|
|
||||||
|
const char *env_w = getenv("LV_SIM_WINDOW_WIDTH");
|
||||||
|
const char *env_h = getenv("LV_SIM_WINDOW_HEIGHT");
|
||||||
|
/* Default values */
|
||||||
|
settings.window_width = atoi(env_w ? env_w : "1024");
|
||||||
|
settings.window_height = atoi(env_h ? env_h : "600");
|
||||||
|
|
||||||
|
/* Parse the command-line options. */
|
||||||
|
while ((opt = getopt (argc, argv, "b:fmW:H:BVh")) != -1) {
|
||||||
|
switch (opt) {
|
||||||
|
case 'h':
|
||||||
|
print_usage();
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
break;
|
||||||
|
case 'V':
|
||||||
|
print_lvgl_version();
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
break;
|
||||||
|
case 'B':
|
||||||
|
driver_backends_print_supported();
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
break;
|
||||||
|
case 'b':
|
||||||
|
if (driver_backends_is_supported(optarg) == 0) {
|
||||||
|
die("error no such backend: %s\n", optarg);
|
||||||
|
}
|
||||||
|
selected_backend = strdup(optarg);
|
||||||
|
break;
|
||||||
|
case 'W':
|
||||||
|
settings.window_width = atoi(optarg);
|
||||||
|
break;
|
||||||
|
case 'H':
|
||||||
|
settings.window_height = atoi(optarg);
|
||||||
|
break;
|
||||||
|
case ':':
|
||||||
|
print_usage();
|
||||||
|
die("Option -%c requires an argument.\n", optopt);
|
||||||
|
break;
|
||||||
|
case '?':
|
||||||
|
print_usage();
|
||||||
|
die("Unknown option -%c.\n", optopt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int main(int argc, char const *argv[])
|
||||||
|
{
|
||||||
|
/* code */
|
||||||
|
printf("hello\n");
|
||||||
|
init_display();
|
||||||
|
|
||||||
|
/* Initialize LVGL. */
|
||||||
|
lv_init();
|
||||||
|
configure_simulator(argc, argv);
|
||||||
|
/* Initialize the configured backend */
|
||||||
|
if (driver_backends_init_backend(selected_backend) == -1) {
|
||||||
|
die("Failed to initialize display backend");
|
||||||
|
}
|
||||||
|
lv_sdl_mouse_create();
|
||||||
|
lv_sdl_keyboard_create();
|
||||||
|
lv_sdl_mousewheel_create();
|
||||||
|
lv_sdl_mousewheel_create();
|
||||||
|
draw_ihm();
|
||||||
|
/* Enter the run loop of the selected backend */
|
||||||
|
driver_backends_run_loop();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
29
components/domotic_display/test_host/mock/esp_wifi.h
Normal file
29
components/domotic_display/test_host/mock/esp_wifi.h
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#define BIT0 0x00000001
|
||||||
|
#define WIFI_CONNECTED_BIT BIT0
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
WIFI_EVENT_WIFI_READY = 0, /**< WiFi ready */
|
||||||
|
WIFI_EVENT_SCAN_DONE, /**< finish scanning AP */
|
||||||
|
WIFI_EVENT_STA_START, /**< station start */
|
||||||
|
WIFI_EVENT_STA_STOP, /**< station stop */
|
||||||
|
WIFI_EVENT_STA_CONNECTED, /**< station connected to AP */
|
||||||
|
WIFI_EVENT_STA_DISCONNECTED, /**< station disconnected from AP */
|
||||||
|
WIFI_EVENT_STA_AUTHMODE_CHANGE, /**< the auth mode of AP connected by station changed */
|
||||||
|
WIFI_EVENT_STA_GOT_IP, /**< station got IP from connected AP */
|
||||||
|
WIFI_EVENT_STA_WPS_ER_SUCCESS, /**< station wps succeeds in enrollee mode */
|
||||||
|
WIFI_EVENT_STA_WPS_ER_FAILED, /**< station wps fails in enrollee mode */
|
||||||
|
WIFI_EVENT_STA_WPS_ER_TIMEOUT, /**< station wps timeout in enrollee mode */
|
||||||
|
WIFI_EVENT_STA_WPS_ER_PIN, /**< station wps pin code in enrollee mode */
|
||||||
|
WIFI_EVENT_AP_START, /**< soft-AP start */
|
||||||
|
WIFI_EVENT_AP_STOP, /**< soft-AP stop */
|
||||||
|
WIFI_EVENT_AP_STACONNECTED, /**< a station connected to soft-AP */
|
||||||
|
WIFI_EVENT_AP_STADISCONNECTED, /**< a station disconnected from soft-AP */
|
||||||
|
WIFI_EVENT_AP_PROBEREQRECVED, /**< Receive probe request packet in soft-AP interface */
|
||||||
|
WIFI_EVENT_AP_STA_GOT_IP6, /**< station or ap interface v6IP addr is preferred */
|
||||||
|
WIFI_EVENT_ETH_START, /**< ethernet start */
|
||||||
|
WIFI_EVENT_ETH_STOP, /**< ethernet stop */
|
||||||
|
WIFI_EVENT_ETH_CONNECTED, /**< ethernet phy link up */
|
||||||
|
WIFI_EVENT_ETH_DISCONNECTED, /**< ethernet phy link down */
|
||||||
|
WIFI_EVENT_ETH_GOT_IP, /**< ethernet got IP from connected AP */
|
||||||
|
WIFI_EVENT_MAX
|
||||||
|
} wifi_event_id_t;
|
||||||
1047
components/domotic_display/test_host/sdkconfig
Normal file
1047
components/domotic_display/test_host/sdkconfig
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,9 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
|
|
||||||
|
#define BIT0 0x00000001
|
||||||
|
#define WIFI_CONNECTED_BIT BIT0
|
||||||
|
|
||||||
typedef enum eIHMEvent_t{
|
typedef enum eIHMEvent_t{
|
||||||
IHM_EVT_WIFI_STATUS,
|
IHM_EVT_WIFI_STATUS,
|
||||||
IHM_EVT_TIME_SETTED,
|
IHM_EVT_TIME_SETTED,
|
||||||
@ -19,7 +22,6 @@ typedef struct IHM_EVENT
|
|||||||
bool bNeedToFreeData; // ← Important !
|
bool bNeedToFreeData; // ← Important !
|
||||||
} xIHMEvent_t;
|
} xIHMEvent_t;
|
||||||
|
|
||||||
#define WIFI_CONNECTED_BIT BIT0
|
|
||||||
typedef enum domo_events{
|
typedef enum domo_events{
|
||||||
EVT_WIFI_CONNECTED,
|
EVT_WIFI_CONNECTED,
|
||||||
EVT_TIME_SETTED,
|
EVT_TIME_SETTED,
|
||||||
|
|||||||
@ -1,3 +1,11 @@
|
|||||||
|
IF(ESP_PLATFORM)
|
||||||
idf_component_register(SRCS "meteofrance.c"
|
idf_component_register(SRCS "meteofrance.c"
|
||||||
INCLUDE_DIRS "include"
|
INCLUDE_DIRS "include"
|
||||||
REQUIRES json esp_http_client esp-tls stateManagement)
|
REQUIRES json esp_http_client esp-tls stateManagement eventsManager)
|
||||||
|
else()
|
||||||
|
add_library(meteofrance SHARED
|
||||||
|
meteofrance.c)
|
||||||
|
target_include_directories(meteofrance PUBLIC ./include)
|
||||||
|
target_link_libraries(meteofrance PRIVATE stateManagement FreeRTOS freertos_kernel)
|
||||||
|
|
||||||
|
endif()
|
||||||
@ -11,8 +11,8 @@
|
|||||||
|
|
||||||
#include "meteofrance.h"
|
#include "meteofrance.h"
|
||||||
|
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "FreeRTOS.h"
|
||||||
#include "freertos/task.h"
|
#include "task.h"
|
||||||
#include "esp_system.h"
|
#include "esp_system.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
|
|
||||||
|
|||||||
@ -1,2 +1,9 @@
|
|||||||
|
IF(ESP_PLATFORM)
|
||||||
idf_component_register(SRCS "stateManagement.c"
|
idf_component_register(SRCS "stateManagement.c"
|
||||||
INCLUDE_DIRS "include")
|
INCLUDE_DIRS "include")
|
||||||
|
else()
|
||||||
|
add_library(stateManagement STATIC
|
||||||
|
stateManagement.c
|
||||||
|
)
|
||||||
|
target_include_directories(stateManagement PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||||
|
endif()
|
||||||
@ -1,6 +1,11 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "stateManagement.h"
|
#include "stateManagement.h"
|
||||||
|
|
||||||
|
struct state mainState={
|
||||||
|
.wifi_init=false,
|
||||||
|
.display_init=false
|
||||||
|
};
|
||||||
|
|
||||||
void func(void)
|
void func(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,6 @@ dependencies:
|
|||||||
require: private
|
require: private
|
||||||
version: '>=1.0.0,<2.0.0'
|
version: '>=1.0.0,<2.0.0'
|
||||||
- name: idf
|
- name: idf
|
||||||
registry_url: https://components.espressif.com
|
|
||||||
require: private
|
require: private
|
||||||
version: '>=5.0'
|
version: '>=5.0'
|
||||||
source:
|
source:
|
||||||
@ -18,7 +17,6 @@ dependencies:
|
|||||||
component_hash: 327091394b9ef5c2cd395a960ab70ae64479e0a8831cbd9925e38895fad93719
|
component_hash: 327091394b9ef5c2cd395a960ab70ae64479e0a8831cbd9925e38895fad93719
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: idf
|
- name: idf
|
||||||
registry_url: https://components.espressif.com
|
|
||||||
require: private
|
require: private
|
||||||
version: '>=4.1.0'
|
version: '>=4.1.0'
|
||||||
source:
|
source:
|
||||||
@ -29,7 +27,6 @@ dependencies:
|
|||||||
component_hash: cbb76089dc2c5749f7b470e2e70aedc44c9da519e04eb9a67d4c7ec275229e53
|
component_hash: cbb76089dc2c5749f7b470e2e70aedc44c9da519e04eb9a67d4c7ec275229e53
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: idf
|
- name: idf
|
||||||
registry_url: https://components.espressif.com
|
|
||||||
require: private
|
require: private
|
||||||
version: '>=4.1.0'
|
version: '>=4.1.0'
|
||||||
source:
|
source:
|
||||||
@ -46,7 +43,6 @@ dependencies:
|
|||||||
component_hash: 351350613ceafba240b761b4ea991e0f231ac7a9f59a9ee901f751bddc0bb18f
|
component_hash: 351350613ceafba240b761b4ea991e0f231ac7a9f59a9ee901f751bddc0bb18f
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: idf
|
- name: idf
|
||||||
registry_url: https://components.espressif.com
|
|
||||||
require: private
|
require: private
|
||||||
version: '>=4.1'
|
version: '>=4.1'
|
||||||
source:
|
source:
|
||||||
@ -54,7 +50,7 @@ dependencies:
|
|||||||
type: service
|
type: service
|
||||||
version: 0.5.3
|
version: 0.5.3
|
||||||
espressif/eppp_link:
|
espressif/eppp_link:
|
||||||
component_hash: 3b1c8f79fa1261a87b9fa8ea6012cb8bf058a949d120c8ad59e1eeffdc0c154f
|
component_hash: 41f6519edda527ec6a0553c872ebaf8fc6d3812523c9d4c8d1660ad21c720abe
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: espressif/esp_serial_slave_link
|
- name: espressif/esp_serial_slave_link
|
||||||
registry_url: https://components.espressif.com
|
registry_url: https://components.espressif.com
|
||||||
@ -66,7 +62,7 @@ dependencies:
|
|||||||
source:
|
source:
|
||||||
registry_url: https://components.espressif.com
|
registry_url: https://components.espressif.com
|
||||||
type: service
|
type: service
|
||||||
version: 1.0.0
|
version: 1.1.3
|
||||||
espressif/esp32_p4_function_ev_board:
|
espressif/esp32_p4_function_ev_board:
|
||||||
component_hash: 1e0436b3d220275d6b7930330b1a9b828fedf0dbc81006531e592b059842641e
|
component_hash: 1e0436b3d220275d6b7930330b1a9b828fedf0dbc81006531e592b059842641e
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -107,7 +103,6 @@ dependencies:
|
|||||||
component_hash: 014948481bda426cd46714f297fe1891711246c62bea288863a8cc8cf13ef1f0
|
component_hash: 014948481bda426cd46714f297fe1891711246c62bea288863a8cc8cf13ef1f0
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: idf
|
- name: idf
|
||||||
registry_url: https://components.espressif.com
|
|
||||||
require: private
|
require: private
|
||||||
version: '>=4.0'
|
version: '>=4.0'
|
||||||
source:
|
source:
|
||||||
@ -115,7 +110,7 @@ dependencies:
|
|||||||
type: service
|
type: service
|
||||||
version: 1.2.0
|
version: 1.2.0
|
||||||
espressif/esp_hosted:
|
espressif/esp_hosted:
|
||||||
component_hash: efa17a89f19ced0c814d79ab373d3000a10e5fa410e9a8a0c5b805f1dac9945a
|
component_hash: a19249042b9987097f89e682ec05d7fad1bd2186e7b758363a2ddb5787ef7d98
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: idf
|
- name: idf
|
||||||
require: private
|
require: private
|
||||||
@ -123,9 +118,9 @@ dependencies:
|
|||||||
source:
|
source:
|
||||||
registry_url: https://components.espressif.com
|
registry_url: https://components.espressif.com
|
||||||
type: service
|
type: service
|
||||||
version: 2.1.10
|
version: 2.6.5
|
||||||
espressif/esp_lcd_ek79007:
|
espressif/esp_lcd_ek79007:
|
||||||
component_hash: 07c1afab7e9fd4dd2fd06ff9245e65327c5bbd5485efec199496e19a9304d47b
|
component_hash: 8005700b7f10c7136b6e2a3f19a48f972aa1d13ed107ed298574e8d24d17ea83
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: espressif/cmake_utilities
|
- name: espressif/cmake_utilities
|
||||||
registry_url: https://components.espressif.com
|
registry_url: https://components.espressif.com
|
||||||
@ -139,9 +134,9 @@ dependencies:
|
|||||||
type: service
|
type: service
|
||||||
targets:
|
targets:
|
||||||
- esp32p4
|
- esp32p4
|
||||||
version: 1.0.2
|
version: 1.0.4
|
||||||
espressif/esp_lcd_ili9881c:
|
espressif/esp_lcd_ili9881c:
|
||||||
component_hash: f4f374226b62baf13f735864e8fae58e17c537df34d598e059f6caad4761ef65
|
component_hash: eb9ba0484d1d14171b69e5d192716fb1cdd6ef068aa4014dc3202486e124498e
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: idf
|
- name: idf
|
||||||
require: private
|
require: private
|
||||||
@ -151,12 +146,11 @@ dependencies:
|
|||||||
type: service
|
type: service
|
||||||
targets:
|
targets:
|
||||||
- esp32p4
|
- esp32p4
|
||||||
version: 1.0.1
|
version: 1.0.2
|
||||||
espressif/esp_lcd_touch:
|
espressif/esp_lcd_touch:
|
||||||
component_hash: 779b4ba2464a3ae85681e4b860caa5fdc35801458c23f3039ee761bae7f442a4
|
component_hash: 779b4ba2464a3ae85681e4b860caa5fdc35801458c23f3039ee761bae7f442a4
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: idf
|
- name: idf
|
||||||
registry_url: https://components.espressif.com
|
|
||||||
require: private
|
require: private
|
||||||
version: '>=4.4.2'
|
version: '>=4.4.2'
|
||||||
source:
|
source:
|
||||||
@ -192,7 +186,7 @@ dependencies:
|
|||||||
type: service
|
type: service
|
||||||
version: 2.6.0
|
version: 2.6.0
|
||||||
espressif/esp_serial_slave_link:
|
espressif/esp_serial_slave_link:
|
||||||
component_hash: d8c13c033a7604e9333b5d8ea45e0d6fec908fd552df7db20d33dd8d6916528d
|
component_hash: ac1776806de0a6e371c84e87898bb983e19ce62aa7f1e2e5c4a3b0234a575d2c
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: idf
|
- name: idf
|
||||||
require: private
|
require: private
|
||||||
@ -200,7 +194,7 @@ dependencies:
|
|||||||
source:
|
source:
|
||||||
registry_url: https://components.espressif.com
|
registry_url: https://components.espressif.com
|
||||||
type: service
|
type: service
|
||||||
version: 1.1.0~1
|
version: 1.1.2
|
||||||
espressif/esp_wifi_remote:
|
espressif/esp_wifi_remote:
|
||||||
component_hash: 20393ed850b2cb40cadcf369b4c852ef5af49e2d89e58774d968c57b0c436fd3
|
component_hash: 20393ed850b2cb40cadcf369b4c852ef5af49e2d89e58774d968c57b0c436fd3
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -224,9 +218,9 @@ dependencies:
|
|||||||
idf:
|
idf:
|
||||||
source:
|
source:
|
||||||
type: idf
|
type: idf
|
||||||
version: 5.5.0
|
version: 5.5.1
|
||||||
joltwallet/littlefs:
|
joltwallet/littlefs:
|
||||||
component_hash: 8e12955f47e27e6070b76715a96d6c75fc2b44f069e8c33679332d9bdd3120c4
|
component_hash: 1808d73e99168f6f3c26dd31799a248484762b3a320ec4962dec11a145f4277f
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: idf
|
- name: idf
|
||||||
require: private
|
require: private
|
||||||
@ -234,14 +228,14 @@ dependencies:
|
|||||||
source:
|
source:
|
||||||
registry_url: https://components.espressif.com/
|
registry_url: https://components.espressif.com/
|
||||||
type: service
|
type: service
|
||||||
version: 1.20.1
|
version: 1.20.3
|
||||||
lvgl/lvgl:
|
lvgl/lvgl:
|
||||||
component_hash: 2409fdc84e9766d2a18afd84b051aef3f838348136cdb1c10ac2e8bcdb012bf6
|
component_hash: 17e68bfd21f0edf4c3ee838e2273da840bf3930e5dbc3bfa6c1190c3aed41f9f
|
||||||
dependencies: []
|
dependencies: []
|
||||||
source:
|
source:
|
||||||
registry_url: https://components.espressif.com/
|
registry_url: https://components.espressif.com/
|
||||||
type: service
|
type: service
|
||||||
version: 9.2.0
|
version: 9.4.0
|
||||||
suda-morris/am2302_rmt:
|
suda-morris/am2302_rmt:
|
||||||
component_hash: 890df8ebfec652eb9f8e1d612959f00a951dbe9241335e5e335fc7fb1468ea32
|
component_hash: 890df8ebfec652eb9f8e1d612959f00a951dbe9241335e5e335fc7fb1468ea32
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -264,6 +258,6 @@ direct_dependencies:
|
|||||||
- joltwallet/littlefs
|
- joltwallet/littlefs
|
||||||
- lvgl/lvgl
|
- lvgl/lvgl
|
||||||
- suda-morris/am2302_rmt
|
- suda-morris/am2302_rmt
|
||||||
manifest_hash: e0a1d41681ba77f4193216a341afed81bde27e78352abb31edd321ef98b29b55
|
manifest_hash: a1d40fbf2c7b6d18c1c8ac8ab02b99dfc7ea773070a94959bcd6999824f94553
|
||||||
target: esp32p4
|
target: esp32p4
|
||||||
version: 2.0.0
|
version: 2.0.0
|
||||||
|
|||||||
6
gdbinit
6
gdbinit
@ -1,6 +0,0 @@
|
|||||||
target remote :3333
|
|
||||||
set remote hardware-watchpoint-limit 2
|
|
||||||
mon reset halt
|
|
||||||
maintenance flush register-cache
|
|
||||||
thb app_main
|
|
||||||
c
|
|
||||||
4
kconfigs_projbuild.in
Normal file
4
kconfigs_projbuild.in
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
source "/home/marc/esp/v5.5.1/esp-idf/components/esp_app_format/Kconfig.projbuild"
|
||||||
|
source "/home/marc/esp/v5.5.1/esp-idf/components/esp_rom/Kconfig.projbuild"
|
||||||
|
source "/home/marc/esp/v5.5.1/esp-idf/components/partition_table/Kconfig.projbuild"
|
||||||
|
source "/home/marc/rgb_lcd/components/protocol_examples_common/Kconfig.projbuild"
|
||||||
@ -26,19 +26,19 @@ void splitIt(char *payload, unsigned int length, float *datas)
|
|||||||
char *saveptr1;
|
char *saveptr1;
|
||||||
|
|
||||||
token = strtok_r(payload, sep, &saveptr1);
|
token = strtok_r(payload, sep, &saveptr1);
|
||||||
datas[0] = atoff(token);
|
datas[0] = atof(token);
|
||||||
ESP_LOGE(TAG,"%f",datas[0]);
|
ESP_LOGE(TAG,"%f",datas[0]);
|
||||||
|
|
||||||
token = strtok_r(NULL, sep, &saveptr1);
|
token = strtok_r(NULL, sep, &saveptr1);
|
||||||
datas[1] = atoff(token);
|
datas[1] = atof(token);
|
||||||
ESP_LOGE(TAG,"%f",datas[1]);
|
ESP_LOGE(TAG,"%f",datas[1]);
|
||||||
|
|
||||||
token = strtok_r(NULL, sep, &saveptr1);
|
token = strtok_r(NULL, sep, &saveptr1);
|
||||||
datas[2] = atoff(token);
|
datas[2] = atof(token);
|
||||||
ESP_LOGE(TAG,"%f",datas[2]);
|
ESP_LOGE(TAG,"%f",datas[2]);
|
||||||
|
|
||||||
token = strtok_r(NULL, sep, &saveptr1);
|
token = strtok_r(NULL, sep, &saveptr1);
|
||||||
datas[3] = atoff(token);
|
datas[3] = atof(token);
|
||||||
ESP_LOGE(TAG,"%f",datas[3]);
|
ESP_LOGE(TAG,"%f",datas[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,6 @@ dependencies:
|
|||||||
idf:
|
idf:
|
||||||
version: '5.5.*'
|
version: '5.5.*'
|
||||||
lvgl/lvgl:
|
lvgl/lvgl:
|
||||||
version: 9.2.0
|
version: 9.4.0
|
||||||
#espressif/esp32_p4_function_ev_board:
|
#espressif/esp32_p4_function_ev_board:
|
||||||
# version: "4.1.*"
|
# version: "4.1.*"
|
||||||
51
main/images/mqtt_ko.c
Normal file
51
main/images/mqtt_ko.c
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
|
||||||
|
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||||
|
#include "lvgl.h"
|
||||||
|
#elif defined(LV_BUILD_TEST)
|
||||||
|
#include "../lvgl.h"
|
||||||
|
#else
|
||||||
|
#include "lvgl/lvgl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||||
|
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef LV_ATTRIBUTE_MQTT_KO
|
||||||
|
#define LV_ATTRIBUTE_MQTT_KO
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static const
|
||||||
|
LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_MQTT_KO
|
||||||
|
uint8_t mqtt_ko_map[] = {
|
||||||
|
|
||||||
|
0x00,0x00,0x00,0xe0,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x39,0x39,0x39,0xff,0xaa,0xa9,0xaa,0xff,0xed,0xed,0xed,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf1,0xf1,0xf1,0xff,0x83,0x83,0x83,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xe8,
|
||||||
|
0xb5,0xb3,0xb5,0xfd,0xaa,0xaa,0xaa,0xff,0x8d,0x8d,0x8d,0xff,0x3f,0x3d,0x3f,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x27,0x21,0x27,0xff,0xb6,0xb6,0xb6,0xff,0xfa,0xfa,0xfa,0xff,0xf9,0xf9,0xf9,0xff,0xc3,0xc3,0xc3,0xff,0x4d,0x4d,0x4d,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,
|
||||||
|
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xdd,0xdd,0xdd,0xff,0x9d,0x9c,0x9d,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x6d,0x6d,0x6d,0xff,0xbd,0xbd,0xbd,0xff,0xb5,0xb5,0xb5,0xff,0x5f,0x5f,0x5f,0xff,0x01,0x01,0x01,0xff,0x00,0x00,0x00,0xff,
|
||||||
|
0xe7,0xe7,0xe7,0xff,0xee,0xee,0xee,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xec,0xec,0xec,0xff,0x81,0x7f,0x81,0xfe,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x23,0x22,0x23,0xff,0x16,0x16,0x16,0xff,0x01,0x01,0x01,0xff,0x17,0x17,0x17,0xff,0x6a,0x68,0x6a,0xff,
|
||||||
|
0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x3e,0x3c,0x3e,0xff,0x98,0x97,0x98,0xff,0xd9,0xd8,0xd9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xfc,0xfc,0xff,0xad,0xac,0xad,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x05,0x05,0x05,0xff,0xd2,0xd2,0xd2,0xff,0xf5,0xf4,0xf5,0xff,
|
||||||
|
0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x72,0x71,0x72,0xff,0xe2,0xe2,0xe2,0xff,0xc4,0xc4,0xc4,0xff,0x7f,0x7f,0x7f,0xff,0x09,0x09,0x09,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x3b,0x3b,0x3b,0xff,0xf7,0xf7,0xf7,0xff,0xff,0xff,0xff,0xff,
|
||||||
|
0xe7,0xe7,0xe7,0xff,0xcf,0xce,0xcf,0xfe,0xa9,0xa9,0xa9,0xff,0x4f,0x4f,0x4f,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x10,0x09,0x10,0xff,0x6a,0x6a,0x6a,0xff,0x38,0x38,0x38,0xff,0x00,0x00,0x00,0xff,0x04,0x04,0x04,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0xa7,0xa6,0xa7,0xff,0xff,0xff,0xff,0xff,
|
||||||
|
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf5,0xf5,0xf5,0xff,0x94,0x94,0x94,0xff,0x1e,0x1e,0x1e,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x12,0x12,0x12,0xff,0xc2,0xc2,0xc2,0xff,0x8d,0x8c,0x8d,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0xe4,0xe3,0xe4,0xfe,
|
||||||
|
0xc5,0xc3,0xc5,0xfe,0xd5,0xd5,0xd5,0xff,0xf0,0xef,0xf0,0xff,0xc7,0xc7,0xc7,0xff,0xb6,0xb6,0xb6,0xff,0x5a,0x5a,0x5a,0xff,0x01,0x01,0x01,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0xaf,0xae,0xaf,0xff,0xfd,0xfd,0xfd,0xff,0xed,0xec,0xed,0xff,0x20,0x17,0x20,0xfe,0x00,0x00,0x00,0xff,0x92,0x90,0x92,0xfe,
|
||||||
|
0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x19,0x19,0x19,0xff,0x66,0x65,0x66,0xff,0x30,0x30,0x30,0xff,0x03,0x03,0x03,0xff,0x02,0x02,0x02,0xff,0x05,0x05,0x05,0xff,0x00,0x00,0x00,0xff,0x69,0x67,0x69,0xff,0xfb,0xfb,0xfb,0xff,0xff,0xff,0xff,0xff,0xa5,0xa4,0xa5,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,
|
||||||
|
0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x02,0x02,0x02,0xff,0x04,0x04,0x04,0xff,0x4a,0x4a,0x4a,0xff,0xa3,0xa2,0xa3,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0xcb,0xcb,0xcb,0xff,0xff,0xff,0xff,0xff,0xe7,0xe6,0xe7,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,
|
||||||
|
0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x63,0x63,0x63,0xff,0xe6,0xe6,0xe6,0xff,0xfb,0xfa,0xfb,0xff,0x51,0x50,0x51,0xff,0x00,0x00,0x00,0xff,0x7c,0x7c,0x7c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5d,0x5b,0x5d,0xff,0x00,0x00,0x00,0xff,
|
||||||
|
0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x16,0x09,0x16,0xfe,0xf3,0xf2,0xf3,0xff,0xff,0xff,0xff,0xff,0xb7,0xb6,0xb7,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0xf6,0xf6,0xf6,0xff,0xff,0xff,0xff,0xff,0xa0,0x9f,0xa0,0xff,0x00,0x00,0x00,0xff,
|
||||||
|
0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0xc6,0xc5,0xc6,0xff,0xff,0xff,0xff,0xff,0xda,0xd9,0xda,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0xe1,0xe1,0xe1,0xff,0xff,0xff,0xff,0xff,0xbc,0xbb,0xbc,0xfe,0x00,0x00,0x00,0xff,
|
||||||
|
0x00,0x00,0x00,0xec,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0xaa,0xaa,0xaa,0xff,0xff,0xff,0xff,0xff,0xe7,0xe7,0xe7,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0xcb,0xcb,0xcb,0xff,0xff,0xff,0xff,0xff,0xcb,0xcb,0xcb,0xff,0x00,0x00,0x00,0xe0,
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const lv_image_dsc_t mqtt_ko = {
|
||||||
|
.header.magic = LV_IMAGE_HEADER_MAGIC,
|
||||||
|
.header.cf = LV_COLOR_FORMAT_ARGB8888,
|
||||||
|
.header.flags = 0,
|
||||||
|
.header.w = 15,
|
||||||
|
.header.h = 15,
|
||||||
|
.header.stride = 60,
|
||||||
|
.data_size = sizeof(mqtt_ko_map),
|
||||||
|
.data = mqtt_ko_map,
|
||||||
|
};
|
||||||
|
|
||||||
116
main/images/mqtt_ok.c
Normal file
116
main/images/mqtt_ok.c
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
|
||||||
|
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||||
|
#include "lvgl.h"
|
||||||
|
#elif defined(LV_BUILD_TEST)
|
||||||
|
#include "../lvgl.h"
|
||||||
|
#else
|
||||||
|
#include "lvgl/lvgl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||||
|
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef LV_ATTRIBUTE_MQTT_OK
|
||||||
|
#define LV_ATTRIBUTE_MQTT_OK
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static const
|
||||||
|
LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_MQTT_OK
|
||||||
|
uint8_t mqtt_ok_map[] = {
|
||||||
|
|
||||||
|
0x66,0x00,0x66,0xe0,0xc1,0xb3,0xc1,0xfd,0x99,0x7f,0x99,0xfe,0xe7,0xe3,0xe7,0xfe,
|
||||||
|
0x6a,0x17,0x6a,0xfe,0x68,0x0a,0x68,0xfe,0xd6,0xce,0xd6,0xfe,0xe8,0xe3,0xe8,0xfe,
|
||||||
|
0xa5,0x90,0xa5,0xfe,0xce,0xc3,0xce,0xfe,0xcf,0xc5,0xcf,0xfe,0xf5,0xf3,0xf5,0xfe,
|
||||||
|
0x66,0x00,0x66,0xe1,0xc6,0xbb,0xc6,0xfe,0xff,0xff,0xff,0xff,0x66,0x00,0x66,0xff,
|
||||||
|
0xd3,0xcb,0xd3,0xff,0xb8,0xaa,0xb8,0xff,0xfb,0xfa,0xfb,0xff,0x72,0x38,0x72,0xff,
|
||||||
|
0xc2,0xb6,0xc2,0xff,0xb8,0xa9,0xb8,0xff,0x72,0x39,0x72,0xff,0x74,0x3c,0x74,0xff,
|
||||||
|
0xeb,0xe7,0xeb,0xff,0xfc,0xfb,0xfc,0xff,0xea,0xe7,0xea,0xff,0x9f,0x87,0x9f,0xff,
|
||||||
|
0xf7,0xf5,0xf7,0xff,0x9d,0x85,0x9d,0xff,0xfe,0xfe,0xfe,0xff,0xfc,0xfc,0xfc,0xff,
|
||||||
|
0xf3,0xf1,0xf3,0xff,0xb5,0xa6,0xb5,0xff,0xef,0xed,0xef,0xff,0xe6,0xe2,0xe6,0xff,
|
||||||
|
0xee,0xeb,0xee,0xff,0xf2,0xf0,0xf2,0xff,0xdc,0xd6,0xdc,0xff,0xc5,0xb9,0xc5,0xff,
|
||||||
|
0xfa,0xf8,0xfa,0xff,0x74,0x3d,0x74,0xff,0x9e,0x86,0x9e,0xff,0x86,0x61,0x86,0xff,
|
||||||
|
0xe2,0xdd,0xe2,0xff,0x8e,0x6f,0x8e,0xff,0xa3,0x8d,0xa3,0xff,0x6c,0x21,0x6c,0xff,
|
||||||
|
0xae,0x9c,0xae,0xff,0xb4,0xa4,0xb4,0xff,0xfe,0xfd,0xfe,0xff,0xde,0xd8,0xde,0xff,
|
||||||
|
0x83,0x5b,0x83,0xff,0x7c,0x4f,0x7c,0xff,0xee,0xec,0xee,0xff,0xaa,0x97,0xaa,0xff,
|
||||||
|
0xf0,0xee,0xf0,0xff,0xc9,0xbe,0xc9,0xff,0xa4,0x8f,0xa4,0xff,0xea,0xe6,0xea,0xff,
|
||||||
|
0xc5,0xba,0xc5,0xff,0x90,0x71,0x90,0xff,0xfb,0xfb,0xfb,0xff,0xc9,0xbf,0xc9,0xff,
|
||||||
|
0x68,0x10,0x68,0xff,0x7f,0x53,0x7f,0xff,0xef,0xec,0xef,0xff,0xe8,0xe4,0xe8,0xff,
|
||||||
|
0xcb,0xc1,0xcb,0xff,0xe3,0xde,0xe3,0xff,0xb0,0x9f,0xb0,0xff,0x7d,0x50,0x7d,0xff,
|
||||||
|
0x8a,0x68,0x8a,0xff,0xdf,0xd9,0xdf,0xff,0xe5,0xe1,0xe5,0xff,0xf7,0xf6,0xf7,0xff,
|
||||||
|
0x96,0x7c,0x96,0xff,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
|
||||||
|
|
||||||
|
0x00,0x0f,0x0f,0x0f,0x0f,0x16,0x11,0x22,0x0e,0x0e,0x20,0x1d,0x0f,0x0f,0x00,
|
||||||
|
0x01,0x11,0x2e,0x29,0x0f,0x0f,0x0f,0x2f,0x14,0x12,0x0e,0x1f,0x15,0x0f,0x0f,
|
||||||
|
0x0e,0x0e,0x0e,0x0e,0x2c,0x30,0x0f,0x0f,0x0f,0x2d,0x25,0x0e,0x0e,0x11,0x0f,
|
||||||
|
0x1a,0x38,0x0e,0x0e,0x0e,0x0e,0x36,0x02,0x0f,0x0f,0x17,0x23,0x0e,0x1e,0x1b,
|
||||||
|
0x0f,0x0f,0x17,0x37,0x33,0x0e,0x0e,0x0e,0x3c,0x0f,0x0f,0x13,0x24,0x0e,0x1c,
|
||||||
|
0x0f,0x0f,0x0f,0x0f,0x0f,0x3d,0x18,0x0e,0x0e,0x10,0x0f,0x0f,0x2b,0x12,0x0e,
|
||||||
|
0x18,0x06,0x15,0x35,0x0f,0x0f,0x40,0x10,0x0e,0x0e,0x39,0x0f,0x0f,0x21,0x0e,
|
||||||
|
0x0e,0x0e,0x0e,0x12,0x3f,0x16,0x0f,0x0f,0x10,0x0e,0x0e,0x3a,0x0f,0x0f,0x07,
|
||||||
|
0x09,0x26,0x28,0x0e,0x0e,0x03,0x41,0x0f,0x0f,0x45,0x0e,0x42,0x04,0x0f,0x08,
|
||||||
|
0x0f,0x0f,0x13,0x27,0x32,0x0e,0x43,0x13,0x0f,0x48,0x19,0x0e,0x31,0x0f,0x0f,
|
||||||
|
0x0f,0x0f,0x0f,0x0f,0x2a,0x3e,0x0e,0x44,0x0f,0x0f,0x10,0x0e,0x3b,0x0f,0x0f,
|
||||||
|
0x0f,0x0f,0x0f,0x0f,0x0f,0x14,0x0e,0x19,0x47,0x0f,0x4c,0x0e,0x0e,0x34,0x0f,
|
||||||
|
0x0f,0x0f,0x0f,0x0f,0x0f,0x05,0x0b,0x0e,0x14,0x0f,0x0f,0x4b,0x0e,0x46,0x0f,
|
||||||
|
0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0a,0x0e,0x49,0x0f,0x0f,0x4a,0x0e,0x0d,0x0f,
|
||||||
|
0x00,0x0f,0x0f,0x0f,0x0f,0x0f,0x11,0x0e,0x1a,0x0f,0x0f,0x10,0x0e,0x10,0x0c,
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const lv_image_dsc_t mqtt_ok = {
|
||||||
|
.header.magic = LV_IMAGE_HEADER_MAGIC,
|
||||||
|
.header.cf = LV_COLOR_FORMAT_I8,
|
||||||
|
.header.flags = 0,
|
||||||
|
.header.w = 15,
|
||||||
|
.header.h = 15,
|
||||||
|
.header.stride = 15,
|
||||||
|
.data_size = sizeof(mqtt_ok_map),
|
||||||
|
.data = mqtt_ok_map,
|
||||||
|
};
|
||||||
|
|
||||||
49
main/images/wifi_ko.c
Normal file
49
main/images/wifi_ko.c
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
|
||||||
|
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||||
|
#include "lvgl.h"
|
||||||
|
#elif defined(LV_BUILD_TEST)
|
||||||
|
#include "../lvgl.h"
|
||||||
|
#else
|
||||||
|
#include "lvgl/lvgl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||||
|
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef LV_ATTRIBUTE_WIFI_KO
|
||||||
|
#define LV_ATTRIBUTE_WIFI_KO
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static const
|
||||||
|
LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_WIFI_KO
|
||||||
|
uint8_t wifi_ko_map[] = {
|
||||||
|
|
||||||
|
0xfe,0xfe,0xfe,0xff,0xfc,0xfc,0xfc,0xff,0xff,0xff,0xff,0xff,0xf5,0xf5,0xf5,0xff,0xa5,0xa5,0xa5,0xff,0x4d,0x4d,0x4d,0xff,0x1a,0x1a,0x1a,0xff,0x00,0x00,0x00,0xff,0x79,0x79,0x79,0xff,0xff,0xff,0xff,0xff,0x5a,0x5a,0x5a,0xff,0x30,0x30,0x30,0xff,0xff,0xff,0xff,0xff,0x78,0x78,0x78,0xff,0x10,0x10,0x10,0xff,
|
||||||
|
0xfd,0xfd,0xfd,0xff,0xff,0xff,0xff,0xff,0xa0,0xa0,0xa0,0xff,0x18,0x18,0x18,0xff,0x00,0x00,0x00,0xff,0x06,0x06,0x06,0xff,0x2e,0x2e,0x2e,0xff,0x3d,0x3d,0x3d,0xff,0xa5,0xa5,0xa5,0xff,0xff,0xff,0xff,0xff,0x89,0x89,0x89,0xff,0x00,0x00,0x00,0xff,0x2b,0x2b,0x2b,0xff,0x03,0x03,0x03,0xff,0x3c,0x3c,0x3c,0xff,
|
||||||
|
0xf6,0xf6,0xf6,0xff,0x57,0x57,0x57,0xff,0x00,0x00,0x00,0xff,0x23,0x23,0x23,0xff,0xa5,0xa5,0xa5,0xff,0xfa,0xfa,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xfe,0xfe,0xff,0xff,0xff,0xff,0xff,0x4b,0x4b,0x4b,0xff,0x00,0x00,0x00,0xff,0x1a,0x1a,0x1a,0xff,0xe0,0xe0,0xe0,0xff,
|
||||||
|
0x3a,0x3a,0x3a,0xff,0x00,0x00,0x00,0xff,0x77,0x77,0x77,0xff,0xfe,0xfe,0xfe,0xff,0xff,0xff,0xff,0xff,0xbb,0xbb,0xbb,0xff,0x68,0x68,0x68,0xff,0x36,0x36,0x36,0xff,0x9e,0x9e,0x9e,0xff,0xff,0xff,0xff,0xff,0x80,0x80,0x80,0xff,0x00,0x00,0x00,0xff,0x2d,0x2d,0x2d,0xff,0x03,0x03,0x03,0xff,0x32,0x32,0x32,0xff,
|
||||||
|
0x60,0x60,0x60,0xff,0x8f,0x8f,0x8f,0xff,0xff,0xff,0xff,0xff,0xc4,0xc4,0xc4,0xff,0x23,0x23,0x23,0xff,0x00,0x00,0x00,0xff,0x05,0x05,0x05,0xff,0x00,0x00,0x00,0xff,0x84,0x84,0x84,0xff,0xff,0xff,0xff,0xff,0x6a,0x6a,0x6a,0xff,0x46,0x46,0x46,0xff,0xff,0xff,0xff,0xff,0x88,0x88,0x88,0xff,0x27,0x27,0x27,0xff,
|
||||||
|
0xfc,0xfc,0xfc,0xff,0xff,0xff,0xff,0xff,0xab,0xab,0xab,0xff,0x00,0x00,0x00,0xff,0x10,0x10,0x10,0xff,0x96,0x96,0x96,0xff,0xf7,0xf7,0xf7,0xff,0xff,0xff,0xff,0xff,0xfe,0xfe,0xfe,0xff,0xff,0xff,0xff,0xff,0xfe,0xfe,0xfe,0xff,0xfe,0xfe,0xfe,0xff,0xfe,0xfe,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||||
|
0xf8,0xf8,0xf8,0xff,0xff,0xff,0xff,0xff,0x8d,0x8d,0x8d,0xff,0x29,0x29,0x29,0xff,0xe6,0xe6,0xe6,0xff,0xff,0xff,0xff,0xff,0xba,0xba,0xba,0xff,0x7d,0x7d,0x7d,0xff,0x83,0x83,0x83,0xff,0xc7,0xc7,0xc7,0xff,0xff,0xff,0xff,0xff,0xfd,0xfd,0xfd,0xff,0xfd,0xfd,0xfd,0xff,0xfd,0xfd,0xfd,0xff,0xfe,0xfe,0xfe,0xff,
|
||||||
|
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0xfd,0xfd,0xff,0xff,0xff,0xff,0xff,0xd4,0xd4,0xd4,0xff,0x24,0x24,0x24,0xff,0x00,0x00,0x00,0xff,0x02,0x02,0x02,0xff,0x01,0x01,0x01,0xff,0x00,0x00,0x00,0xff,0x4d,0x4d,0x4d,0xff,0xef,0xef,0xef,0xff,0xff,0xff,0xff,0xff,0xfe,0xfe,0xfe,0xff,0xff,0xff,0xff,0xff,
|
||||||
|
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xfc,0xfc,0xff,0xff,0xff,0xff,0xff,0x3c,0x3c,0x3c,0xff,0x01,0x01,0x01,0xff,0x9a,0x9a,0x9a,0xff,0xf0,0xf0,0xf0,0xff,0xe5,0xe5,0xe5,0xff,0x74,0x74,0x74,0xff,0x00,0x00,0x00,0xff,0x83,0x83,0x83,0xff,0xff,0xff,0xff,0xff,0xfb,0xfb,0xfb,0xff,0xff,0xff,0xff,0xff,
|
||||||
|
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xfe,0xfe,0xff,0xff,0xff,0xff,0xff,0xca,0xca,0xca,0xff,0xd2,0xd2,0xd2,0xff,0xff,0xff,0xff,0xff,0xc2,0xc2,0xc2,0xff,0xd4,0xd4,0xd4,0xff,0xff,0xff,0xff,0xff,0xc3,0xc3,0xc3,0xff,0xe3,0xe3,0xe3,0xff,0xff,0xff,0xff,0xff,0xfe,0xfe,0xfe,0xff,0xff,0xff,0xff,0xff,
|
||||||
|
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xfc,0xfc,0xff,0xff,0xff,0xff,0xff,0x83,0x83,0x83,0xff,0x00,0x00,0x00,0xff,0x02,0x02,0x02,0xff,0xbc,0xbc,0xbc,0xff,0xff,0xff,0xff,0xff,0xfc,0xfc,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||||
|
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf9,0xf9,0xf9,0xff,0xff,0xff,0xff,0xff,0x54,0x54,0x54,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x94,0x94,0x94,0xff,0xff,0xff,0xff,0xff,0xfa,0xfa,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||||
|
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0xfd,0xfd,0xff,0xff,0xff,0xff,0xff,0xca,0xca,0xca,0xff,0x1e,0x1e,0x1e,0xff,0x40,0x40,0x40,0xff,0xee,0xee,0xee,0xff,0xff,0xff,0xff,0xff,0xfe,0xfe,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const lv_image_dsc_t wifi_ko = {
|
||||||
|
.header.magic = LV_IMAGE_HEADER_MAGIC,
|
||||||
|
.header.cf = LV_COLOR_FORMAT_ARGB8888,
|
||||||
|
.header.flags = 0,
|
||||||
|
.header.w = 15,
|
||||||
|
.header.h = 13,
|
||||||
|
.header.stride = 60,
|
||||||
|
.data_size = sizeof(wifi_ko_map),
|
||||||
|
.data = wifi_ko_map,
|
||||||
|
};
|
||||||
|
|
||||||
48
main/images/wifi_ok.c
Normal file
48
main/images/wifi_ok.c
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
|
||||||
|
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||||
|
#include "lvgl.h"
|
||||||
|
#elif defined(LV_BUILD_TEST)
|
||||||
|
#include "../lvgl.h"
|
||||||
|
#else
|
||||||
|
#include "lvgl/lvgl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||||
|
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef LV_ATTRIBUTE_WIFI_OK
|
||||||
|
#define LV_ATTRIBUTE_WIFI_OK
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static const
|
||||||
|
LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_WIFI_OK
|
||||||
|
uint8_t wifi_ok_map[] = {
|
||||||
|
|
||||||
|
0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x6c,0x00,0x00,0x00,0xb9,0x00,0x00,0x00,0xe5,0x00,0x00,0x00,0xf2,0x00,0x00,0x00,0xe6,0x00,0x00,0x00,0xbb,0x00,0x00,0x00,0x6f,0x00,0x00,0x00,0x1a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x86,0x00,0x00,0x00,0xf9,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xe6,0x00,0x00,0x00,0xba,0x00,0x00,0x00,0xa9,0x00,0x00,0x00,0xb9,0x00,0x00,0x00,0xe4,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x8c,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x00,
|
||||||
|
0x00,0x00,0x00,0x29,0x00,0x00,0x00,0xd5,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xa2,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0x9d,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xda,0x00,0x00,0x00,0x2f,
|
||||||
|
0x00,0x00,0x00,0xf9,0x00,0x00,0x00,0xf3,0x00,0x00,0x00,0x3d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0x9b,0x00,0x00,0x00,0xdb,0x00,0x00,0x00,0xed,0x00,0x00,0x00,0xdc,0x00,0x00,0x00,0x9e,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0xee,0x00,0x00,0x00,0xfb,
|
||||||
|
0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa1,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0xbc,0x00,0x00,0x00,0xa1,0x00,0x00,0x00,0xba,0x00,0x00,0x00,0xf9,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xa7,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x57,
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xab,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x7b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xaf,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
|
0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x4a,0x00,0x00,0x00,0x4a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0xd9,0x00,0x00,0x00,0xf4,0x00,0x00,0x00,0xdb,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x05,
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd3,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xc5,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0xc2,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xda,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0xa8,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4d,0x00,0x00,0x00,0xa4,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0xe6,0x00,0x00,0x00,0x8b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0xfb,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x8e,0x00,0x00,0x00,0xf5,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const lv_image_dsc_t wifi_ok = {
|
||||||
|
.header.magic = LV_IMAGE_HEADER_MAGIC,
|
||||||
|
.header.cf = LV_COLOR_FORMAT_ARGB8888,
|
||||||
|
.header.flags = 0,
|
||||||
|
.header.w = 15,
|
||||||
|
.header.h = 12,
|
||||||
|
.header.stride = 60,
|
||||||
|
.data_size = sizeof(wifi_ok_map),
|
||||||
|
.data = wifi_ok_map,
|
||||||
|
};
|
||||||
|
|
||||||
@ -5,8 +5,6 @@ CONFIG_IDF_TARGET="esp32p4"
|
|||||||
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
|
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
|
||||||
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
|
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
|
||||||
CONFIG_PARTITION_TABLE_CUSTOM=y
|
CONFIG_PARTITION_TABLE_CUSTOM=y
|
||||||
CONFIG_EXAMPLE_ENABLE_CAM_SENSOR_PIC_VFLIP=n
|
|
||||||
CONFIG_EXAMPLE_ENABLE_CAM_SENSOR_PIC_HFLIP=n
|
|
||||||
CONFIG_COMPILER_OPTIMIZATION_PERF=y
|
CONFIG_COMPILER_OPTIMIZATION_PERF=y
|
||||||
CONFIG_COMPILER_ORPHAN_SECTIONS_PLACE=y
|
CONFIG_COMPILER_ORPHAN_SECTIONS_PLACE=y
|
||||||
CONFIG_SPIRAM=y
|
CONFIG_SPIRAM=y
|
||||||
@ -22,25 +20,9 @@ CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y
|
|||||||
CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y
|
CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y
|
||||||
CONFIG_FREERTOS_TASK_CREATE_ALLOW_EXT_MEM=n
|
CONFIG_FREERTOS_TASK_CREATE_ALLOW_EXT_MEM=n
|
||||||
CONFIG_VFS_MAX_COUNT=15
|
CONFIG_VFS_MAX_COUNT=15
|
||||||
CONFIG_ESP_BROOKESIA_LOG_STYLE_STD=y
|
|
||||||
CONFIG_ESP_BROOKESIA_MEMORY_USE_CUSTOM=y
|
|
||||||
CONFIG_BSP_LCD_DPI_BUFFER_NUMS=2
|
CONFIG_BSP_LCD_DPI_BUFFER_NUMS=2
|
||||||
CONFIG_BSP_DISPLAY_LVGL_AVOID_TEAR=y
|
CONFIG_BSP_DISPLAY_LVGL_AVOID_TEAR=y
|
||||||
CONFIG_BSP_DISPLAY_LVGL_DIRECT_MODE=y
|
CONFIG_BSP_DISPLAY_LVGL_DIRECT_MODE=y
|
||||||
CONFIG_CAMERA_SC2336=y
|
|
||||||
CONFIG_CAMERA_SC2336_MIPI_RAW10_1280x720_60FPS=y
|
|
||||||
CONFIG_CAMERA_SC2336_CUSTOMIZED_IPA_JSON_CONFIGURATION_FILE=y
|
|
||||||
CONFIG_CAMERA_SC2336_CUSTOMIZED_IPA_JSON_CONFIGURATION_FILE_PATH="components/apps/camera/sc2336_custom.json"
|
|
||||||
CONFIG_ESP_VIDEO_ENABLE_DVP_VIDEO_DEVICE=n
|
|
||||||
CONFIG_ESP_VIDEO_ENABLE_ISP_PIPELINE_CONTROLLER=y
|
|
||||||
CONFIG_LV_COLOR_SCREEN_TRANSP=y
|
|
||||||
CONFIG_LV_MEM_CUSTOM=y
|
|
||||||
CONFIG_LV_MEM_CUSTOM_INCLUDE="esp_heap_caps.h"
|
|
||||||
CONFIG_LV_MEMCPY_MEMSET_STD=y
|
|
||||||
CONFIG_LV_CIRCLE_CACHE_SIZE=10
|
|
||||||
CONFIG_LV_LAYER_SIMPLE_BUF_SIZE=102400
|
|
||||||
CONFIG_LV_IMG_CACHE_DEF_SIZE=20
|
|
||||||
CONFIG_LV_GRAD_CACHE_DEF_SIZE=10240
|
|
||||||
CONFIG_LV_ATTRIBUTE_FAST_MEM_USE_IRAM=y
|
CONFIG_LV_ATTRIBUTE_FAST_MEM_USE_IRAM=y
|
||||||
CONFIG_LV_USE_MONKEY=n
|
CONFIG_LV_USE_MONKEY=n
|
||||||
CONFIG_LV_USE_DEMO_WIDGETS=n
|
CONFIG_LV_USE_DEMO_WIDGETS=n
|
||||||
@ -71,9 +53,6 @@ CONFIG_LV_USE_DRAW_SW_COMPLEX_GRADIENTS=y
|
|||||||
CONFIG_LV_USE_PRIVATE_API=y
|
CONFIG_LV_USE_PRIVATE_API=y
|
||||||
|
|
||||||
CONFIG_SPIRAM_USE_MALLOC=y
|
CONFIG_SPIRAM_USE_MALLOC=y
|
||||||
|
CONFIG_LV_USE_OBSERVER=y
|
||||||
#Specifique P4
|
|
||||||
CONFIG_SLAVE_IDF_TARGET_ESP32C6=y
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -27,5 +27,21 @@ CONFIG_LV_USE_OBSERVER=n
|
|||||||
CONFIG_LV_USE_SYSMON=n
|
CONFIG_LV_USE_SYSMON=n
|
||||||
CONFIG_LV_USE_PERF_MONITOR=n
|
CONFIG_LV_USE_PERF_MONITOR=n
|
||||||
|
|
||||||
|
#Permet d'afficher des dégradés corrects
|
||||||
|
CONFIG_BSP_LCD_COLOR_FORMAT_RGB888=y
|
||||||
|
|
||||||
|
#on active les logs
|
||||||
|
CONFIG_LV_USE_LOG=y
|
||||||
|
CONFIG_LV_LOG_LEVEL_WARN=y
|
||||||
|
CONFIG_LV_LOG_LEVEL=2
|
||||||
|
CONFIG_LV_LOG_PRINTF=y
|
||||||
|
CONFIG_LV_LOG_USE_TIMESTAMP=y
|
||||||
|
CONFIG_LV_LOG_USE_FILE_LINE=y
|
||||||
|
|
||||||
|
#Specifique P4
|
||||||
|
CONFIG_SLAVE_IDF_TARGET_ESP32C6=y
|
||||||
|
|
||||||
|
CONFIG_SPIRAM_USE_MALLOC=y
|
||||||
|
CONFIG_LV_USE_OBSERVER=y
|
||||||
|
|
||||||
# CONFIG_LV_BUILD_EXAMPLES is not set
|
# CONFIG_LV_BUILD_EXAMPLES is not set
|
||||||
|
|||||||
2542
sdkconfig.old
2542
sdkconfig.old
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user