Commit 4826a891 authored by 高士达's avatar 高士达

删除无用的文件

parent 6162322e
{
"files.associations": {
"bsp_uart.h": "c",
"eeprommanage.h": "c"
}
}
\ No newline at end of file
set(CMAKE_ASM_COMPILER "/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc")
set(CMAKE_ASM_COMPILER_ARG1 "")
set(CMAKE_AR "/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-ar")
set(CMAKE_ASM_COMPILER_AR "/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc-ar")
set(CMAKE_RANLIB "/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-ranlib")
set(CMAKE_ASM_COMPILER_RANLIB "/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc-ranlib")
set(CMAKE_LINKER "/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-ld")
set(CMAKE_MT "")
set(CMAKE_ASM_COMPILER_LOADED 1)
set(CMAKE_ASM_COMPILER_ID "GNU")
set(CMAKE_ASM_COMPILER_VERSION "")
set(CMAKE_ASM_COMPILER_ENV_VAR "ASM")
set(CMAKE_ASM_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
set(CMAKE_ASM_LINKER_PREFERENCE 0)
set(CMAKE_C_COMPILER "/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc")
set(CMAKE_C_COMPILER_ARG1 "")
set(CMAKE_C_COMPILER_ID "GNU")
set(CMAKE_C_COMPILER_VERSION "13.2.0")
set(CMAKE_C_COMPILER_VERSION_INTERNAL "")
set(CMAKE_C_COMPILER_WRAPPER "")
set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "17")
set(CMAKE_C_EXTENSIONS_COMPUTED_DEFAULT "ON")
set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert;c_std_17;c_std_23")
set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros")
set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert")
set(CMAKE_C17_COMPILE_FEATURES "c_std_17")
set(CMAKE_C23_COMPILE_FEATURES "c_std_23")
set(CMAKE_C_PLATFORM_ID "")
set(CMAKE_C_SIMULATE_ID "")
set(CMAKE_C_COMPILER_FRONTEND_VARIANT "")
set(CMAKE_C_SIMULATE_VERSION "")
set(CMAKE_AR "/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-ar")
set(CMAKE_C_COMPILER_AR "/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc-ar")
set(CMAKE_RANLIB "/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-ranlib")
set(CMAKE_C_COMPILER_RANLIB "/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc-ranlib")
set(CMAKE_LINKER "/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-ld")
set(CMAKE_MT "")
set(CMAKE_COMPILER_IS_GNUCC 1)
set(CMAKE_C_COMPILER_LOADED 1)
set(CMAKE_C_COMPILER_WORKS TRUE)
set(CMAKE_C_ABI_COMPILED TRUE)
set(CMAKE_C_COMPILER_ENV_VAR "CC")
set(CMAKE_C_COMPILER_ID_RUN 1)
set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
set(CMAKE_C_LINKER_PREFERENCE 10)
# Save compiler ABI information.
set(CMAKE_C_SIZEOF_DATA_PTR "4")
set(CMAKE_C_COMPILER_ABI "ELF")
set(CMAKE_C_BYTE_ORDER "LITTLE_ENDIAN")
set(CMAKE_C_LIBRARY_ARCHITECTURE "")
if(CMAKE_C_SIZEOF_DATA_PTR)
set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
endif()
if(CMAKE_C_COMPILER_ABI)
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
endif()
if(CMAKE_C_LIBRARY_ARCHITECTURE)
set(CMAKE_LIBRARY_ARCHITECTURE "")
endif()
set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
endif()
set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/lib/gcc/xtensa-esp-elf/13.2.0/include;/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/lib/gcc/xtensa-esp-elf/13.2.0/include-fixed;/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/xtensa-esp-elf/sys-include;/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/xtensa-esp-elf/include")
set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "gcc;c;nosys;c;gcc")
set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/lib/gcc/xtensa-esp-elf/13.2.0/esp32;/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/xtensa-esp-elf/lib/esp32;/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/lib/gcc/xtensa-esp-elf/13.2.0;/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/lib/gcc;/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/xtensa-esp-elf/lib")
set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
set(CMAKE_CXX_COMPILER "/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-g++")
set(CMAKE_CXX_COMPILER_ARG1 "")
set(CMAKE_CXX_COMPILER_ID "GNU")
set(CMAKE_CXX_COMPILER_VERSION "13.2.0")
set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "")
set(CMAKE_CXX_COMPILER_WRAPPER "")
set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "17")
set(CMAKE_CXX_EXTENSIONS_COMPUTED_DEFAULT "ON")
set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20;cxx_std_23")
set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters")
set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates")
set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates")
set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17")
set(CMAKE_CXX20_COMPILE_FEATURES "cxx_std_20")
set(CMAKE_CXX23_COMPILE_FEATURES "cxx_std_23")
set(CMAKE_CXX_PLATFORM_ID "")
set(CMAKE_CXX_SIMULATE_ID "")
set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "")
set(CMAKE_CXX_SIMULATE_VERSION "")
set(CMAKE_AR "/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-ar")
set(CMAKE_CXX_COMPILER_AR "/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc-ar")
set(CMAKE_RANLIB "/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-ranlib")
set(CMAKE_CXX_COMPILER_RANLIB "/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc-ranlib")
set(CMAKE_LINKER "/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-ld")
set(CMAKE_MT "")
set(CMAKE_COMPILER_IS_GNUCXX 1)
set(CMAKE_CXX_COMPILER_LOADED 1)
set(CMAKE_CXX_COMPILER_WORKS TRUE)
set(CMAKE_CXX_ABI_COMPILED TRUE)
set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
set(CMAKE_CXX_COMPILER_ID_RUN 1)
set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;mpp;CPP;ixx;cppm)
set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
foreach (lang C OBJC OBJCXX)
if (CMAKE_${lang}_COMPILER_ID_RUN)
foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS)
list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension})
endforeach()
endif()
endforeach()
set(CMAKE_CXX_LINKER_PREFERENCE 30)
set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
# Save compiler ABI information.
set(CMAKE_CXX_SIZEOF_DATA_PTR "4")
set(CMAKE_CXX_COMPILER_ABI "ELF")
set(CMAKE_CXX_BYTE_ORDER "LITTLE_ENDIAN")
set(CMAKE_CXX_LIBRARY_ARCHITECTURE "")
if(CMAKE_CXX_SIZEOF_DATA_PTR)
set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
endif()
if(CMAKE_CXX_COMPILER_ABI)
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
endif()
if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
set(CMAKE_LIBRARY_ARCHITECTURE "")
endif()
set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
endif()
set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/xtensa-esp-elf/include/c++/13.2.0;/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/xtensa-esp-elf/include/c++/13.2.0/xtensa-esp-elf/esp32;/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/xtensa-esp-elf/include/c++/13.2.0/backward;/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/lib/gcc/xtensa-esp-elf/13.2.0/include;/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/lib/gcc/xtensa-esp-elf/13.2.0/include-fixed;/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/xtensa-esp-elf/sys-include;/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/xtensa-esp-elf/include")
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;gcc;c;nosys;c;gcc")
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/lib/gcc/xtensa-esp-elf/13.2.0/esp32;/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/xtensa-esp-elf/lib/esp32;/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/lib/gcc/xtensa-esp-elf/13.2.0;/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/lib/gcc;/home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/xtensa-esp-elf/lib")
set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
set(CMAKE_HOST_SYSTEM "Linux-6.5.0-41-generic")
set(CMAKE_HOST_SYSTEM_NAME "Linux")
set(CMAKE_HOST_SYSTEM_VERSION "6.5.0-41-generic")
set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64")
include("/home/king/esp/esp-idf/tools/cmake/toolchain-esp32.cmake")
set(CMAKE_SYSTEM "Generic")
set(CMAKE_SYSTEM_NAME "Generic")
set(CMAKE_SYSTEM_VERSION "")
set(CMAKE_SYSTEM_PROCESSOR "")
set(CMAKE_CROSSCOMPILING "TRUE")
set(CMAKE_SYSTEM_LOADED 1)
#ifdef __cplusplus
# error "A C++ compiler has been selected for C."
#endif
#if defined(__18CXX)
# define ID_VOID_MAIN
#endif
#if defined(__CLASSIC_C__)
/* cv-qualifiers did not exist in K&R C */
# define const
# define volatile
#endif
#if !defined(__has_include)
/* If the compiler does not have __has_include, pretend the answer is
always no. */
# define __has_include(x) 0
#endif
/* Version number components: V=Version, R=Revision, P=Patch
Version date components: YYYY=Year, MM=Month, DD=Day */
#if defined(__INTEL_COMPILER) || defined(__ICC)
# define COMPILER_ID "Intel"
# if defined(_MSC_VER)
# define SIMULATE_ID "MSVC"
# endif
# if defined(__GNUC__)
# define SIMULATE_ID "GNU"
# endif
/* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later,
except that a few beta releases use the old format with V=2021. */
# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
# if defined(__INTEL_COMPILER_UPDATE)
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
# else
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
# endif
# else
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER)
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE)
/* The third version component from --version is an update index,
but no macro is provided for it. */
# define COMPILER_VERSION_PATCH DEC(0)
# endif
# if defined(__INTEL_COMPILER_BUILD_DATE)
/* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
# endif
# if defined(_MSC_VER)
/* _MSC_VER = VVRR */
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
# endif
# if defined(__GNUC__)
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
# elif defined(__GNUG__)
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
# endif
# if defined(__GNUC_MINOR__)
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
# endif
# if defined(__GNUC_PATCHLEVEL__)
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
# endif
#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER)
# define COMPILER_ID "IntelLLVM"
#if defined(_MSC_VER)
# define SIMULATE_ID "MSVC"
#endif
#if defined(__GNUC__)
# define SIMULATE_ID "GNU"
#endif
/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and
* later. Look for 6 digit vs. 8 digit version number to decide encoding.
* VVVV is no smaller than the current year when a version is released.
*/
#if __INTEL_LLVM_COMPILER < 1000000L
# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100)
# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10)
#else
# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000)
# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100)
# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100)
#endif
#if defined(_MSC_VER)
/* _MSC_VER = VVRR */
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
#endif
#if defined(__GNUC__)
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
#elif defined(__GNUG__)
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
#endif
#if defined(__GNUC_MINOR__)
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
#endif
#if defined(__GNUC_PATCHLEVEL__)
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
#endif
#elif defined(__PATHCC__)
# define COMPILER_ID "PathScale"
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
# if defined(__PATHCC_PATCHLEVEL__)
# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
# endif
#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
# define COMPILER_ID "Embarcadero"
# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
#elif defined(__BORLANDC__)
# define COMPILER_ID "Borland"
/* __BORLANDC__ = 0xVRR */
# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
# define COMPILER_ID "Watcom"
/* __WATCOMC__ = VVRR */
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
# if (__WATCOMC__ % 10) > 0
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
# endif
#elif defined(__WATCOMC__)
# define COMPILER_ID "OpenWatcom"
/* __WATCOMC__ = VVRP + 1100 */
# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
# if (__WATCOMC__ % 10) > 0
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
# endif
#elif defined(__SUNPRO_C)
# define COMPILER_ID "SunPro"
# if __SUNPRO_C >= 0x5100
/* __SUNPRO_C = 0xVRRP */
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12)
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF)
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
# else
/* __SUNPRO_CC = 0xVRP */
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8)
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF)
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
# endif
#elif defined(__HP_cc)
# define COMPILER_ID "HP"
/* __HP_cc = VVRRPP */
# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000)
# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100)
# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100)
#elif defined(__DECC)
# define COMPILER_ID "Compaq"
/* __DECC_VER = VVRRTPPPP */
# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000)
# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100)
# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000)
#elif defined(__IBMC__) && defined(__COMPILER_VER__)
# define COMPILER_ID "zOS"
/* __IBMC__ = VRP */
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
#elif defined(__ibmxl__) && defined(__clang__)
# define COMPILER_ID "XLClang"
# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800
# define COMPILER_ID "XL"
/* __IBMC__ = VRP */
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800
# define COMPILER_ID "VisualAge"
/* __IBMC__ = VRP */
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
#elif defined(__NVCOMPILER)
# define COMPILER_ID "NVHPC"
# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__)
# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__)
# if defined(__NVCOMPILER_PATCHLEVEL__)
# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__)
# endif
#elif defined(__PGI)
# define COMPILER_ID "PGI"
# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
# if defined(__PGIC_PATCHLEVEL__)
# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
# endif
#elif defined(_CRAYC)
# define COMPILER_ID "Cray"
# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
#elif defined(__TI_COMPILER_VERSION__)
# define COMPILER_ID "TI"
/* __TI_COMPILER_VERSION__ = VVVRRRPPP */
# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
#elif defined(__CLANG_FUJITSU)
# define COMPILER_ID "FujitsuClang"
# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
# define COMPILER_VERSION_INTERNAL_STR __clang_version__
#elif defined(__FUJITSU)
# define COMPILER_ID "Fujitsu"
# if defined(__FCC_version__)
# define COMPILER_VERSION __FCC_version__
# elif defined(__FCC_major__)
# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
# endif
# if defined(__fcc_version)
# define COMPILER_VERSION_INTERNAL DEC(__fcc_version)
# elif defined(__FCC_VERSION)
# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION)
# endif
#elif defined(__ghs__)
# define COMPILER_ID "GHS"
/* __GHS_VERSION_NUMBER = VVVVRP */
# ifdef __GHS_VERSION_NUMBER
# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10)
# endif
#elif defined(__TINYC__)
# define COMPILER_ID "TinyCC"
#elif defined(__BCC__)
# define COMPILER_ID "Bruce"
#elif defined(__SCO_VERSION__)
# define COMPILER_ID "SCO"
#elif defined(__ARMCC_VERSION) && !defined(__clang__)
# define COMPILER_ID "ARMCC"
#if __ARMCC_VERSION >= 1000000
/* __ARMCC_VERSION = VRRPPPP */
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
#else
/* __ARMCC_VERSION = VRPPPP */
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
#endif
#elif defined(__clang__) && defined(__apple_build_version__)
# define COMPILER_ID "AppleClang"
# if defined(_MSC_VER)
# define SIMULATE_ID "MSVC"
# endif
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
# if defined(_MSC_VER)
/* _MSC_VER = VVRR */
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
# endif
# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
# define COMPILER_ID "ARMClang"
# define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
# define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
# define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000)
# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
#elif defined(__clang__)
# define COMPILER_ID "Clang"
# if defined(_MSC_VER)
# define SIMULATE_ID "MSVC"
# endif
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
# if defined(_MSC_VER)
/* _MSC_VER = VVRR */
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
# endif
#elif defined(__GNUC__)
# define COMPILER_ID "GNU"
# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
# if defined(__GNUC_MINOR__)
# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
# endif
# if defined(__GNUC_PATCHLEVEL__)
# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
# endif
#elif defined(_MSC_VER)
# define COMPILER_ID "MSVC"
/* _MSC_VER = VVRR */
# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
# if defined(_MSC_FULL_VER)
# if _MSC_VER >= 1400
/* _MSC_FULL_VER = VVRRPPPPP */
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
# else
/* _MSC_FULL_VER = VVRRPPPP */
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
# endif
# endif
# if defined(_MSC_BUILD)
# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
# endif
#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
# define COMPILER_ID "ADSP"
#if defined(__VISUALDSPVERSION__)
/* __VISUALDSPVERSION__ = 0xVVRRPP00 */
# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24)
# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF)
# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF)
#endif
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
# define COMPILER_ID "IAR"
# if defined(__VER__) && defined(__ICCARM__)
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__))
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
# endif
#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC)
# define COMPILER_ID "SDCC"
# if defined(__SDCC_VERSION_MAJOR)
# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR)
# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR)
# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH)
# else
/* SDCC = VRP */
# define COMPILER_VERSION_MAJOR DEC(SDCC/100)
# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10)
# define COMPILER_VERSION_PATCH DEC(SDCC % 10)
# endif
/* These compilers are either not known or too old to define an
identification macro. Try to identify the platform and guess that
it is the native compiler. */
#elif defined(__hpux) || defined(__hpua)
# define COMPILER_ID "HP"
#else /* unknown compiler */
# define COMPILER_ID ""
#endif
/* Construct the string literal in pieces to prevent the source from
getting matched. Store it in a pointer rather than an array
because some compilers will just produce instructions to fill the
array rather than assigning a pointer to a static array. */
char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
#ifdef SIMULATE_ID
char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
#endif
#ifdef __QNXNTO__
char const* qnxnto = "INFO" ":" "qnxnto[]";
#endif
#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
#endif
#define STRINGIFY_HELPER(X) #X
#define STRINGIFY(X) STRINGIFY_HELPER(X)
/* Identify known platforms by name. */
#if defined(__linux) || defined(__linux__) || defined(linux)
# define PLATFORM_ID "Linux"
#elif defined(__MSYS__)
# define PLATFORM_ID "MSYS"
#elif defined(__CYGWIN__)
# define PLATFORM_ID "Cygwin"
#elif defined(__MINGW32__)
# define PLATFORM_ID "MinGW"
#elif defined(__APPLE__)
# define PLATFORM_ID "Darwin"
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
# define PLATFORM_ID "Windows"
#elif defined(__FreeBSD__) || defined(__FreeBSD)
# define PLATFORM_ID "FreeBSD"
#elif defined(__NetBSD__) || defined(__NetBSD)
# define PLATFORM_ID "NetBSD"
#elif defined(__OpenBSD__) || defined(__OPENBSD)
# define PLATFORM_ID "OpenBSD"
#elif defined(__sun) || defined(sun)
# define PLATFORM_ID "SunOS"
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
# define PLATFORM_ID "AIX"
#elif defined(__hpux) || defined(__hpux__)
# define PLATFORM_ID "HP-UX"
#elif defined(__HAIKU__)
# define PLATFORM_ID "Haiku"
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
# define PLATFORM_ID "BeOS"
#elif defined(__QNX__) || defined(__QNXNTO__)
# define PLATFORM_ID "QNX"
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
# define PLATFORM_ID "Tru64"
#elif defined(__riscos) || defined(__riscos__)
# define PLATFORM_ID "RISCos"
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
# define PLATFORM_ID "SINIX"
#elif defined(__UNIX_SV__)
# define PLATFORM_ID "UNIX_SV"
#elif defined(__bsdos__)
# define PLATFORM_ID "BSDOS"
#elif defined(_MPRAS) || defined(MPRAS)
# define PLATFORM_ID "MP-RAS"
#elif defined(__osf) || defined(__osf__)
# define PLATFORM_ID "OSF1"
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
# define PLATFORM_ID "SCO_SV"
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
# define PLATFORM_ID "ULTRIX"
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
# define PLATFORM_ID "Xenix"
#elif defined(__WATCOMC__)
# if defined(__LINUX__)
# define PLATFORM_ID "Linux"
# elif defined(__DOS__)
# define PLATFORM_ID "DOS"
# elif defined(__OS2__)
# define PLATFORM_ID "OS2"
# elif defined(__WINDOWS__)
# define PLATFORM_ID "Windows3x"
# elif defined(__VXWORKS__)
# define PLATFORM_ID "VxWorks"
# else /* unknown platform */
# define PLATFORM_ID
# endif
#elif defined(__INTEGRITY)
# if defined(INT_178B)
# define PLATFORM_ID "Integrity178"
# else /* regular Integrity */
# define PLATFORM_ID "Integrity"
# endif
#else /* unknown platform */
# define PLATFORM_ID
#endif
/* For windows compilers MSVC and Intel we can determine
the architecture of the compiler being used. This is because
the compilers do not have flags that can change the architecture,
but rather depend on which compiler is being used
*/
#if defined(_WIN32) && defined(_MSC_VER)
# if defined(_M_IA64)
# define ARCHITECTURE_ID "IA64"
# elif defined(_M_ARM64EC)
# define ARCHITECTURE_ID "ARM64EC"
# elif defined(_M_X64) || defined(_M_AMD64)
# define ARCHITECTURE_ID "x64"
# elif defined(_M_IX86)
# define ARCHITECTURE_ID "X86"
# elif defined(_M_ARM64)
# define ARCHITECTURE_ID "ARM64"
# elif defined(_M_ARM)
# if _M_ARM == 4
# define ARCHITECTURE_ID "ARMV4I"
# elif _M_ARM == 5
# define ARCHITECTURE_ID "ARMV5I"
# else
# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
# endif
# elif defined(_M_MIPS)
# define ARCHITECTURE_ID "MIPS"
# elif defined(_M_SH)
# define ARCHITECTURE_ID "SHx"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#elif defined(__WATCOMC__)
# if defined(_M_I86)
# define ARCHITECTURE_ID "I86"
# elif defined(_M_IX86)
# define ARCHITECTURE_ID "X86"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
# if defined(__ICCARM__)
# define ARCHITECTURE_ID "ARM"
# elif defined(__ICCRX__)
# define ARCHITECTURE_ID "RX"
# elif defined(__ICCRH850__)
# define ARCHITECTURE_ID "RH850"
# elif defined(__ICCRL78__)
# define ARCHITECTURE_ID "RL78"
# elif defined(__ICCRISCV__)
# define ARCHITECTURE_ID "RISCV"
# elif defined(__ICCAVR__)
# define ARCHITECTURE_ID "AVR"
# elif defined(__ICC430__)
# define ARCHITECTURE_ID "MSP430"
# elif defined(__ICCV850__)
# define ARCHITECTURE_ID "V850"
# elif defined(__ICC8051__)
# define ARCHITECTURE_ID "8051"
# elif defined(__ICCSTM8__)
# define ARCHITECTURE_ID "STM8"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#elif defined(__ghs__)
# if defined(__PPC64__)
# define ARCHITECTURE_ID "PPC64"
# elif defined(__ppc__)
# define ARCHITECTURE_ID "PPC"
# elif defined(__ARM__)
# define ARCHITECTURE_ID "ARM"
# elif defined(__x86_64__)
# define ARCHITECTURE_ID "x64"
# elif defined(__i386__)
# define ARCHITECTURE_ID "X86"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#elif defined(__TI_COMPILER_VERSION__)
# if defined(__TI_ARM__)
# define ARCHITECTURE_ID "ARM"
# elif defined(__MSP430__)
# define ARCHITECTURE_ID "MSP430"
# elif defined(__TMS320C28XX__)
# define ARCHITECTURE_ID "TMS320C28x"
# elif defined(__TMS320C6X__) || defined(_TMS320C6X)
# define ARCHITECTURE_ID "TMS320C6x"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#else
# define ARCHITECTURE_ID
#endif
/* Convert integer to decimal digit literals. */
#define DEC(n) \
('0' + (((n) / 10000000)%10)), \
('0' + (((n) / 1000000)%10)), \
('0' + (((n) / 100000)%10)), \
('0' + (((n) / 10000)%10)), \
('0' + (((n) / 1000)%10)), \
('0' + (((n) / 100)%10)), \
('0' + (((n) / 10)%10)), \
('0' + ((n) % 10))
/* Convert integer to hex digit literals. */
#define HEX(n) \
('0' + ((n)>>28 & 0xF)), \
('0' + ((n)>>24 & 0xF)), \
('0' + ((n)>>20 & 0xF)), \
('0' + ((n)>>16 & 0xF)), \
('0' + ((n)>>12 & 0xF)), \
('0' + ((n)>>8 & 0xF)), \
('0' + ((n)>>4 & 0xF)), \
('0' + ((n) & 0xF))
/* Construct a string literal encoding the version number. */
#ifdef COMPILER_VERSION
char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]";
/* Construct a string literal encoding the version number components. */
#elif defined(COMPILER_VERSION_MAJOR)
char const info_version[] = {
'I', 'N', 'F', 'O', ':',
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
COMPILER_VERSION_MAJOR,
# ifdef COMPILER_VERSION_MINOR
'.', COMPILER_VERSION_MINOR,
# ifdef COMPILER_VERSION_PATCH
'.', COMPILER_VERSION_PATCH,
# ifdef COMPILER_VERSION_TWEAK
'.', COMPILER_VERSION_TWEAK,
# endif
# endif
# endif
']','\0'};
#endif
/* Construct a string literal encoding the internal version number. */
#ifdef COMPILER_VERSION_INTERNAL
char const info_version_internal[] = {
'I', 'N', 'F', 'O', ':',
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
'i','n','t','e','r','n','a','l','[',
COMPILER_VERSION_INTERNAL,']','\0'};
#elif defined(COMPILER_VERSION_INTERNAL_STR)
char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]";
#endif
/* Construct a string literal encoding the version number components. */
#ifdef SIMULATE_VERSION_MAJOR
char const info_simulate_version[] = {
'I', 'N', 'F', 'O', ':',
's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
SIMULATE_VERSION_MAJOR,
# ifdef SIMULATE_VERSION_MINOR
'.', SIMULATE_VERSION_MINOR,
# ifdef SIMULATE_VERSION_PATCH
'.', SIMULATE_VERSION_PATCH,
# ifdef SIMULATE_VERSION_TWEAK
'.', SIMULATE_VERSION_TWEAK,
# endif
# endif
# endif
']','\0'};
#endif
/* Construct the string literal in pieces to prevent the source from
getting matched. Store it in a pointer rather than an array
because some compilers will just produce instructions to fill the
array rather than assigning a pointer to a static array. */
char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
#if !defined(__STDC__) && !defined(__clang__)
# if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__)
# define C_VERSION "90"
# else
# define C_VERSION
# endif
#elif __STDC_VERSION__ > 201710L
# define C_VERSION "23"
#elif __STDC_VERSION__ >= 201710L
# define C_VERSION "17"
#elif __STDC_VERSION__ >= 201000L
# define C_VERSION "11"
#elif __STDC_VERSION__ >= 199901L
# define C_VERSION "99"
#else
# define C_VERSION "90"
#endif
const char* info_language_standard_default =
"INFO" ":" "standard_default[" C_VERSION "]";
const char* info_language_extensions_default = "INFO" ":" "extensions_default["
/* !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode. */
#if (defined(__clang__) || defined(__GNUC__) || \
defined(__TI_COMPILER_VERSION__)) && \
!defined(__STRICT_ANSI__) && !defined(_MSC_VER)
"ON"
#else
"OFF"
#endif
"]";
/*--------------------------------------------------------------------------*/
#ifdef ID_VOID_MAIN
void main() {}
#else
# if defined(__CLASSIC_C__)
int main(argc, argv) int argc; char *argv[];
# else
int main(int argc, char* argv[])
# endif
{
int require = 0;
require += info_compiler[argc];
require += info_platform[argc];
require += info_arch[argc];
#ifdef COMPILER_VERSION_MAJOR
require += info_version[argc];
#endif
#ifdef COMPILER_VERSION_INTERNAL
require += info_version_internal[argc];
#endif
#ifdef SIMULATE_ID
require += info_simulate[argc];
#endif
#ifdef SIMULATE_VERSION_MAJOR
require += info_simulate_version[argc];
#endif
#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
require += info_cray[argc];
#endif
require += info_language_standard_default[argc];
require += info_language_extensions_default[argc];
(void)argv;
return require;
}
#endif
/* This source file must have a .cpp extension so that all C++ compilers
recognize the extension without flags. Borland does not know .cxx for
example. */
#ifndef __cplusplus
# error "A C compiler has been selected for C++."
#endif
#if !defined(__has_include)
/* If the compiler does not have __has_include, pretend the answer is
always no. */
# define __has_include(x) 0
#endif
/* Version number components: V=Version, R=Revision, P=Patch
Version date components: YYYY=Year, MM=Month, DD=Day */
#if defined(__COMO__)
# define COMPILER_ID "Comeau"
/* __COMO_VERSION__ = VRR */
# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100)
# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100)
#elif defined(__INTEL_COMPILER) || defined(__ICC)
# define COMPILER_ID "Intel"
# if defined(_MSC_VER)
# define SIMULATE_ID "MSVC"
# endif
# if defined(__GNUC__)
# define SIMULATE_ID "GNU"
# endif
/* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later,
except that a few beta releases use the old format with V=2021. */
# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
# if defined(__INTEL_COMPILER_UPDATE)
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
# else
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
# endif
# else
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER)
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE)
/* The third version component from --version is an update index,
but no macro is provided for it. */
# define COMPILER_VERSION_PATCH DEC(0)
# endif
# if defined(__INTEL_COMPILER_BUILD_DATE)
/* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
# endif
# if defined(_MSC_VER)
/* _MSC_VER = VVRR */
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
# endif
# if defined(__GNUC__)
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
# elif defined(__GNUG__)
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
# endif
# if defined(__GNUC_MINOR__)
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
# endif
# if defined(__GNUC_PATCHLEVEL__)
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
# endif
#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER)
# define COMPILER_ID "IntelLLVM"
#if defined(_MSC_VER)
# define SIMULATE_ID "MSVC"
#endif
#if defined(__GNUC__)
# define SIMULATE_ID "GNU"
#endif
/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and
* later. Look for 6 digit vs. 8 digit version number to decide encoding.
* VVVV is no smaller than the current year when a version is released.
*/
#if __INTEL_LLVM_COMPILER < 1000000L
# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100)
# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10)
#else
# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000)
# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100)
# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100)
#endif
#if defined(_MSC_VER)
/* _MSC_VER = VVRR */
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
#endif
#if defined(__GNUC__)
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
#elif defined(__GNUG__)
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
#endif
#if defined(__GNUC_MINOR__)
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
#endif
#if defined(__GNUC_PATCHLEVEL__)
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
#endif
#elif defined(__PATHCC__)
# define COMPILER_ID "PathScale"
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
# if defined(__PATHCC_PATCHLEVEL__)
# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
# endif
#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
# define COMPILER_ID "Embarcadero"
# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
#elif defined(__BORLANDC__)
# define COMPILER_ID "Borland"
/* __BORLANDC__ = 0xVRR */
# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
# define COMPILER_ID "Watcom"
/* __WATCOMC__ = VVRR */
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
# if (__WATCOMC__ % 10) > 0
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
# endif
#elif defined(__WATCOMC__)
# define COMPILER_ID "OpenWatcom"
/* __WATCOMC__ = VVRP + 1100 */
# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
# if (__WATCOMC__ % 10) > 0
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
# endif
#elif defined(__SUNPRO_CC)
# define COMPILER_ID "SunPro"
# if __SUNPRO_CC >= 0x5100
/* __SUNPRO_CC = 0xVRRP */
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12)
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF)
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
# else
/* __SUNPRO_CC = 0xVRP */
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8)
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF)
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
# endif
#elif defined(__HP_aCC)
# define COMPILER_ID "HP"
/* __HP_aCC = VVRRPP */
# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000)
# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100)
# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100)
#elif defined(__DECCXX)
# define COMPILER_ID "Compaq"
/* __DECCXX_VER = VVRRTPPPP */
# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000)
# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100)
# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000)
#elif defined(__IBMCPP__) && defined(__COMPILER_VER__)
# define COMPILER_ID "zOS"
/* __IBMCPP__ = VRP */
# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
#elif defined(__ibmxl__) && defined(__clang__)
# define COMPILER_ID "XLClang"
# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800
# define COMPILER_ID "XL"
/* __IBMCPP__ = VRP */
# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800
# define COMPILER_ID "VisualAge"
/* __IBMCPP__ = VRP */
# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
#elif defined(__NVCOMPILER)
# define COMPILER_ID "NVHPC"
# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__)
# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__)
# if defined(__NVCOMPILER_PATCHLEVEL__)
# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__)
# endif
#elif defined(__PGI)
# define COMPILER_ID "PGI"
# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
# if defined(__PGIC_PATCHLEVEL__)
# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
# endif
#elif defined(_CRAYC)
# define COMPILER_ID "Cray"
# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
#elif defined(__TI_COMPILER_VERSION__)
# define COMPILER_ID "TI"
/* __TI_COMPILER_VERSION__ = VVVRRRPPP */
# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
#elif defined(__CLANG_FUJITSU)
# define COMPILER_ID "FujitsuClang"
# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
# define COMPILER_VERSION_INTERNAL_STR __clang_version__
#elif defined(__FUJITSU)
# define COMPILER_ID "Fujitsu"
# if defined(__FCC_version__)
# define COMPILER_VERSION __FCC_version__
# elif defined(__FCC_major__)
# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
# endif
# if defined(__fcc_version)
# define COMPILER_VERSION_INTERNAL DEC(__fcc_version)
# elif defined(__FCC_VERSION)
# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION)
# endif
#elif defined(__ghs__)
# define COMPILER_ID "GHS"
/* __GHS_VERSION_NUMBER = VVVVRP */
# ifdef __GHS_VERSION_NUMBER
# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10)
# endif
#elif defined(__SCO_VERSION__)
# define COMPILER_ID "SCO"
#elif defined(__ARMCC_VERSION) && !defined(__clang__)
# define COMPILER_ID "ARMCC"
#if __ARMCC_VERSION >= 1000000
/* __ARMCC_VERSION = VRRPPPP */
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
#else
/* __ARMCC_VERSION = VRPPPP */
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
#endif
#elif defined(__clang__) && defined(__apple_build_version__)
# define COMPILER_ID "AppleClang"
# if defined(_MSC_VER)
# define SIMULATE_ID "MSVC"
# endif
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
# if defined(_MSC_VER)
/* _MSC_VER = VVRR */
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
# endif
# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
# define COMPILER_ID "ARMClang"
# define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
# define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
# define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000)
# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
#elif defined(__clang__)
# define COMPILER_ID "Clang"
# if defined(_MSC_VER)
# define SIMULATE_ID "MSVC"
# endif
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
# if defined(_MSC_VER)
/* _MSC_VER = VVRR */
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
# endif
#elif defined(__GNUC__) || defined(__GNUG__)
# define COMPILER_ID "GNU"
# if defined(__GNUC__)
# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
# else
# define COMPILER_VERSION_MAJOR DEC(__GNUG__)
# endif
# if defined(__GNUC_MINOR__)
# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
# endif
# if defined(__GNUC_PATCHLEVEL__)
# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
# endif
#elif defined(_MSC_VER)
# define COMPILER_ID "MSVC"
/* _MSC_VER = VVRR */
# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
# if defined(_MSC_FULL_VER)
# if _MSC_VER >= 1400
/* _MSC_FULL_VER = VVRRPPPPP */
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
# else
/* _MSC_FULL_VER = VVRRPPPP */
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
# endif
# endif
# if defined(_MSC_BUILD)
# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
# endif
#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
# define COMPILER_ID "ADSP"
#if defined(__VISUALDSPVERSION__)
/* __VISUALDSPVERSION__ = 0xVVRRPP00 */
# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24)
# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF)
# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF)
#endif
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
# define COMPILER_ID "IAR"
# if defined(__VER__) && defined(__ICCARM__)
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__))
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
# endif
/* These compilers are either not known or too old to define an
identification macro. Try to identify the platform and guess that
it is the native compiler. */
#elif defined(__hpux) || defined(__hpua)
# define COMPILER_ID "HP"
#else /* unknown compiler */
# define COMPILER_ID ""
#endif
/* Construct the string literal in pieces to prevent the source from
getting matched. Store it in a pointer rather than an array
because some compilers will just produce instructions to fill the
array rather than assigning a pointer to a static array. */
char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
#ifdef SIMULATE_ID
char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
#endif
#ifdef __QNXNTO__
char const* qnxnto = "INFO" ":" "qnxnto[]";
#endif
#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
#endif
#define STRINGIFY_HELPER(X) #X
#define STRINGIFY(X) STRINGIFY_HELPER(X)
/* Identify known platforms by name. */
#if defined(__linux) || defined(__linux__) || defined(linux)
# define PLATFORM_ID "Linux"
#elif defined(__MSYS__)
# define PLATFORM_ID "MSYS"
#elif defined(__CYGWIN__)
# define PLATFORM_ID "Cygwin"
#elif defined(__MINGW32__)
# define PLATFORM_ID "MinGW"
#elif defined(__APPLE__)
# define PLATFORM_ID "Darwin"
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
# define PLATFORM_ID "Windows"
#elif defined(__FreeBSD__) || defined(__FreeBSD)
# define PLATFORM_ID "FreeBSD"
#elif defined(__NetBSD__) || defined(__NetBSD)
# define PLATFORM_ID "NetBSD"
#elif defined(__OpenBSD__) || defined(__OPENBSD)
# define PLATFORM_ID "OpenBSD"
#elif defined(__sun) || defined(sun)
# define PLATFORM_ID "SunOS"
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
# define PLATFORM_ID "AIX"
#elif defined(__hpux) || defined(__hpux__)
# define PLATFORM_ID "HP-UX"
#elif defined(__HAIKU__)
# define PLATFORM_ID "Haiku"
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
# define PLATFORM_ID "BeOS"
#elif defined(__QNX__) || defined(__QNXNTO__)
# define PLATFORM_ID "QNX"
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
# define PLATFORM_ID "Tru64"
#elif defined(__riscos) || defined(__riscos__)
# define PLATFORM_ID "RISCos"
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
# define PLATFORM_ID "SINIX"
#elif defined(__UNIX_SV__)
# define PLATFORM_ID "UNIX_SV"
#elif defined(__bsdos__)
# define PLATFORM_ID "BSDOS"
#elif defined(_MPRAS) || defined(MPRAS)
# define PLATFORM_ID "MP-RAS"
#elif defined(__osf) || defined(__osf__)
# define PLATFORM_ID "OSF1"
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
# define PLATFORM_ID "SCO_SV"
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
# define PLATFORM_ID "ULTRIX"
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
# define PLATFORM_ID "Xenix"
#elif defined(__WATCOMC__)
# if defined(__LINUX__)
# define PLATFORM_ID "Linux"
# elif defined(__DOS__)
# define PLATFORM_ID "DOS"
# elif defined(__OS2__)
# define PLATFORM_ID "OS2"
# elif defined(__WINDOWS__)
# define PLATFORM_ID "Windows3x"
# elif defined(__VXWORKS__)
# define PLATFORM_ID "VxWorks"
# else /* unknown platform */
# define PLATFORM_ID
# endif
#elif defined(__INTEGRITY)
# if defined(INT_178B)
# define PLATFORM_ID "Integrity178"
# else /* regular Integrity */
# define PLATFORM_ID "Integrity"
# endif
#else /* unknown platform */
# define PLATFORM_ID
#endif
/* For windows compilers MSVC and Intel we can determine
the architecture of the compiler being used. This is because
the compilers do not have flags that can change the architecture,
but rather depend on which compiler is being used
*/
#if defined(_WIN32) && defined(_MSC_VER)
# if defined(_M_IA64)
# define ARCHITECTURE_ID "IA64"
# elif defined(_M_ARM64EC)
# define ARCHITECTURE_ID "ARM64EC"
# elif defined(_M_X64) || defined(_M_AMD64)
# define ARCHITECTURE_ID "x64"
# elif defined(_M_IX86)
# define ARCHITECTURE_ID "X86"
# elif defined(_M_ARM64)
# define ARCHITECTURE_ID "ARM64"
# elif defined(_M_ARM)
# if _M_ARM == 4
# define ARCHITECTURE_ID "ARMV4I"
# elif _M_ARM == 5
# define ARCHITECTURE_ID "ARMV5I"
# else
# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
# endif
# elif defined(_M_MIPS)
# define ARCHITECTURE_ID "MIPS"
# elif defined(_M_SH)
# define ARCHITECTURE_ID "SHx"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#elif defined(__WATCOMC__)
# if defined(_M_I86)
# define ARCHITECTURE_ID "I86"
# elif defined(_M_IX86)
# define ARCHITECTURE_ID "X86"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
# if defined(__ICCARM__)
# define ARCHITECTURE_ID "ARM"
# elif defined(__ICCRX__)
# define ARCHITECTURE_ID "RX"
# elif defined(__ICCRH850__)
# define ARCHITECTURE_ID "RH850"
# elif defined(__ICCRL78__)
# define ARCHITECTURE_ID "RL78"
# elif defined(__ICCRISCV__)
# define ARCHITECTURE_ID "RISCV"
# elif defined(__ICCAVR__)
# define ARCHITECTURE_ID "AVR"
# elif defined(__ICC430__)
# define ARCHITECTURE_ID "MSP430"
# elif defined(__ICCV850__)
# define ARCHITECTURE_ID "V850"
# elif defined(__ICC8051__)
# define ARCHITECTURE_ID "8051"
# elif defined(__ICCSTM8__)
# define ARCHITECTURE_ID "STM8"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#elif defined(__ghs__)
# if defined(__PPC64__)
# define ARCHITECTURE_ID "PPC64"
# elif defined(__ppc__)
# define ARCHITECTURE_ID "PPC"
# elif defined(__ARM__)
# define ARCHITECTURE_ID "ARM"
# elif defined(__x86_64__)
# define ARCHITECTURE_ID "x64"
# elif defined(__i386__)
# define ARCHITECTURE_ID "X86"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#elif defined(__TI_COMPILER_VERSION__)
# if defined(__TI_ARM__)
# define ARCHITECTURE_ID "ARM"
# elif defined(__MSP430__)
# define ARCHITECTURE_ID "MSP430"
# elif defined(__TMS320C28XX__)
# define ARCHITECTURE_ID "TMS320C28x"
# elif defined(__TMS320C6X__) || defined(_TMS320C6X)
# define ARCHITECTURE_ID "TMS320C6x"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#else
# define ARCHITECTURE_ID
#endif
/* Convert integer to decimal digit literals. */
#define DEC(n) \
('0' + (((n) / 10000000)%10)), \
('0' + (((n) / 1000000)%10)), \
('0' + (((n) / 100000)%10)), \
('0' + (((n) / 10000)%10)), \
('0' + (((n) / 1000)%10)), \
('0' + (((n) / 100)%10)), \
('0' + (((n) / 10)%10)), \
('0' + ((n) % 10))
/* Convert integer to hex digit literals. */
#define HEX(n) \
('0' + ((n)>>28 & 0xF)), \
('0' + ((n)>>24 & 0xF)), \
('0' + ((n)>>20 & 0xF)), \
('0' + ((n)>>16 & 0xF)), \
('0' + ((n)>>12 & 0xF)), \
('0' + ((n)>>8 & 0xF)), \
('0' + ((n)>>4 & 0xF)), \
('0' + ((n) & 0xF))
/* Construct a string literal encoding the version number. */
#ifdef COMPILER_VERSION
char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]";
/* Construct a string literal encoding the version number components. */
#elif defined(COMPILER_VERSION_MAJOR)
char const info_version[] = {
'I', 'N', 'F', 'O', ':',
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
COMPILER_VERSION_MAJOR,
# ifdef COMPILER_VERSION_MINOR
'.', COMPILER_VERSION_MINOR,
# ifdef COMPILER_VERSION_PATCH
'.', COMPILER_VERSION_PATCH,
# ifdef COMPILER_VERSION_TWEAK
'.', COMPILER_VERSION_TWEAK,
# endif
# endif
# endif
']','\0'};
#endif
/* Construct a string literal encoding the internal version number. */
#ifdef COMPILER_VERSION_INTERNAL
char const info_version_internal[] = {
'I', 'N', 'F', 'O', ':',
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
'i','n','t','e','r','n','a','l','[',
COMPILER_VERSION_INTERNAL,']','\0'};
#elif defined(COMPILER_VERSION_INTERNAL_STR)
char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]";
#endif
/* Construct a string literal encoding the version number components. */
#ifdef SIMULATE_VERSION_MAJOR
char const info_simulate_version[] = {
'I', 'N', 'F', 'O', ':',
's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
SIMULATE_VERSION_MAJOR,
# ifdef SIMULATE_VERSION_MINOR
'.', SIMULATE_VERSION_MINOR,
# ifdef SIMULATE_VERSION_PATCH
'.', SIMULATE_VERSION_PATCH,
# ifdef SIMULATE_VERSION_TWEAK
'.', SIMULATE_VERSION_TWEAK,
# endif
# endif
# endif
']','\0'};
#endif
/* Construct the string literal in pieces to prevent the source from
getting matched. Store it in a pointer rather than an array
because some compilers will just produce instructions to fill the
array rather than assigning a pointer to a static array. */
char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L
# if defined(__INTEL_CXX11_MODE__)
# if defined(__cpp_aggregate_nsdmi)
# define CXX_STD 201402L
# else
# define CXX_STD 201103L
# endif
# else
# define CXX_STD 199711L
# endif
#elif defined(_MSC_VER) && defined(_MSVC_LANG)
# define CXX_STD _MSVC_LANG
#else
# define CXX_STD __cplusplus
#endif
const char* info_language_standard_default = "INFO" ":" "standard_default["
#if CXX_STD > 202002L
"23"
#elif CXX_STD > 201703L
"20"
#elif CXX_STD >= 201703L
"17"
#elif CXX_STD >= 201402L
"14"
#elif CXX_STD >= 201103L
"11"
#else
"98"
#endif
"]";
const char* info_language_extensions_default = "INFO" ":" "extensions_default["
/* !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode. */
#if (defined(__clang__) || defined(__GNUC__) || \
defined(__TI_COMPILER_VERSION__)) && \
!defined(__STRICT_ANSI__) && !defined(_MSC_VER)
"ON"
#else
"OFF"
#endif
"]";
/*--------------------------------------------------------------------------*/
int main(int argc, char* argv[])
{
int require = 0;
require += info_compiler[argc];
require += info_platform[argc];
#ifdef COMPILER_VERSION_MAJOR
require += info_version[argc];
#endif
#ifdef COMPILER_VERSION_INTERNAL
require += info_version_internal[argc];
#endif
#ifdef SIMULATE_ID
require += info_simulate[argc];
#endif
#ifdef SIMULATE_VERSION_MAJOR
require += info_simulate_version[argc];
#endif
#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
require += info_cray[argc];
#endif
require += info_language_standard_default[argc];
require += info_language_extensions_default[argc];
(void)argv;
return require;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
#
# Internal file for GetGitRevisionDescription.cmake
#
# Requires CMake 2.6 or newer (uses the 'function' command)
#
# Original Author:
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
#
# Copyright Iowa State University 2009-2010.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
set(HEAD_HASH)
file(READ "/mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/build/CMakeFiles/git-data/HEAD" HEAD_CONTENTS LIMIT 1024)
string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS)
set(GIT_DIR "/home/king/esp/esp-idf/.git")
# handle git-worktree
if(EXISTS "${GIT_DIR}/commondir")
file(READ "${GIT_DIR}/commondir" GIT_DIR_NEW LIMIT 1024)
string(STRIP "${GIT_DIR_NEW}" GIT_DIR_NEW)
if(NOT IS_ABSOLUTE "${GIT_DIR_NEW}")
get_filename_component(GIT_DIR_NEW ${GIT_DIR}/${GIT_DIR_NEW} ABSOLUTE)
endif()
if(EXISTS "${GIT_DIR_NEW}")
set(GIT_DIR "${GIT_DIR_NEW}")
endif()
endif()
if(HEAD_CONTENTS MATCHES "ref")
# named branch
string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
if(EXISTS "${GIT_DIR}/${HEAD_REF}")
configure_file("${GIT_DIR}/${HEAD_REF}" "/mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/build/CMakeFiles/git-data/head-ref" COPYONLY)
elseif(EXISTS "${GIT_DIR}/logs/${HEAD_REF}")
configure_file("${GIT_DIR}/logs/${HEAD_REF}" "/mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/build/CMakeFiles/git-data/head-ref" COPYONLY)
set(HEAD_HASH "${HEAD_REF}")
endif()
else()
# detached HEAD
configure_file("${GIT_DIR}/HEAD" "/mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/build/CMakeFiles/git-data/head-ref" COPYONLY)
endif()
if(NOT HEAD_HASH)
file(READ "/mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/build/CMakeFiles/git-data/head-ref" HEAD_HASH LIMIT 1024)
string(STRIP "${HEAD_HASH}" HEAD_HASH)
endif()
69359f4dfb75e4b9c3bf93a03f4f05f750a14a72
components:
- name: "app_trace"
path: "/home/king/esp/esp-idf/components/app_trace"
- name: "app_update"
path: "/home/king/esp/esp-idf/components/app_update"
- name: "bootloader"
path: "/home/king/esp/esp-idf/components/bootloader"
- name: "bootloader_support"
path: "/home/king/esp/esp-idf/components/bootloader_support"
- name: "bt"
path: "/home/king/esp/esp-idf/components/bt"
- name: "cmock"
path: "/home/king/esp/esp-idf/components/cmock"
- name: "console"
path: "/home/king/esp/esp-idf/components/console"
- name: "cxx"
path: "/home/king/esp/esp-idf/components/cxx"
- name: "driver"
path: "/home/king/esp/esp-idf/components/driver"
- name: "efuse"
path: "/home/king/esp/esp-idf/components/efuse"
- name: "esp-tls"
path: "/home/king/esp/esp-idf/components/esp-tls"
- name: "esp_adc"
path: "/home/king/esp/esp-idf/components/esp_adc"
- name: "esp_app_format"
path: "/home/king/esp/esp-idf/components/esp_app_format"
- name: "esp_bootloader_format"
path: "/home/king/esp/esp-idf/components/esp_bootloader_format"
- name: "esp_coex"
path: "/home/king/esp/esp-idf/components/esp_coex"
- name: "esp_common"
path: "/home/king/esp/esp-idf/components/esp_common"
- name: "esp_eth"
path: "/home/king/esp/esp-idf/components/esp_eth"
- name: "esp_event"
path: "/home/king/esp/esp-idf/components/esp_event"
- name: "esp_gdbstub"
path: "/home/king/esp/esp-idf/components/esp_gdbstub"
- name: "esp_hid"
path: "/home/king/esp/esp-idf/components/esp_hid"
- name: "esp_http_client"
path: "/home/king/esp/esp-idf/components/esp_http_client"
- name: "esp_http_server"
path: "/home/king/esp/esp-idf/components/esp_http_server"
- name: "esp_https_ota"
path: "/home/king/esp/esp-idf/components/esp_https_ota"
- name: "esp_https_server"
path: "/home/king/esp/esp-idf/components/esp_https_server"
- name: "esp_hw_support"
path: "/home/king/esp/esp-idf/components/esp_hw_support"
- name: "esp_lcd"
path: "/home/king/esp/esp-idf/components/esp_lcd"
- name: "esp_local_ctrl"
path: "/home/king/esp/esp-idf/components/esp_local_ctrl"
- name: "esp_mm"
path: "/home/king/esp/esp-idf/components/esp_mm"
- name: "esp_netif"
path: "/home/king/esp/esp-idf/components/esp_netif"
- name: "esp_netif_stack"
path: "/home/king/esp/esp-idf/components/esp_netif_stack"
- name: "esp_partition"
path: "/home/king/esp/esp-idf/components/esp_partition"
- name: "esp_phy"
path: "/home/king/esp/esp-idf/components/esp_phy"
- name: "esp_pm"
path: "/home/king/esp/esp-idf/components/esp_pm"
- name: "esp_psram"
path: "/home/king/esp/esp-idf/components/esp_psram"
- name: "esp_ringbuf"
path: "/home/king/esp/esp-idf/components/esp_ringbuf"
- name: "esp_rom"
path: "/home/king/esp/esp-idf/components/esp_rom"
- name: "esp_system"
path: "/home/king/esp/esp-idf/components/esp_system"
- name: "esp_timer"
path: "/home/king/esp/esp-idf/components/esp_timer"
- name: "esp_wifi"
path: "/home/king/esp/esp-idf/components/esp_wifi"
- name: "espcoredump"
path: "/home/king/esp/esp-idf/components/espcoredump"
- name: "esptool_py"
path: "/home/king/esp/esp-idf/components/esptool_py"
- name: "fatfs"
path: "/home/king/esp/esp-idf/components/fatfs"
- name: "freertos"
path: "/home/king/esp/esp-idf/components/freertos"
- name: "hal"
path: "/home/king/esp/esp-idf/components/hal"
- name: "heap"
path: "/home/king/esp/esp-idf/components/heap"
- name: "http_parser"
path: "/home/king/esp/esp-idf/components/http_parser"
- name: "idf_test"
path: "/home/king/esp/esp-idf/components/idf_test"
- name: "ieee802154"
path: "/home/king/esp/esp-idf/components/ieee802154"
- name: "json"
path: "/home/king/esp/esp-idf/components/json"
- name: "linux"
path: "/home/king/esp/esp-idf/components/linux"
- name: "log"
path: "/home/king/esp/esp-idf/components/log"
- name: "lwip"
path: "/home/king/esp/esp-idf/components/lwip"
- name: "mbedtls"
path: "/home/king/esp/esp-idf/components/mbedtls"
- name: "mqtt"
path: "/home/king/esp/esp-idf/components/mqtt"
- name: "newlib"
path: "/home/king/esp/esp-idf/components/newlib"
- name: "nvs_flash"
path: "/home/king/esp/esp-idf/components/nvs_flash"
- name: "nvs_sec_provider"
path: "/home/king/esp/esp-idf/components/nvs_sec_provider"
- name: "openthread"
path: "/home/king/esp/esp-idf/components/openthread"
- name: "partition_table"
path: "/home/king/esp/esp-idf/components/partition_table"
- name: "perfmon"
path: "/home/king/esp/esp-idf/components/perfmon"
- name: "protobuf-c"
path: "/home/king/esp/esp-idf/components/protobuf-c"
- name: "protocomm"
path: "/home/king/esp/esp-idf/components/protocomm"
- name: "pthread"
path: "/home/king/esp/esp-idf/components/pthread"
- name: "riscv"
path: "/home/king/esp/esp-idf/components/riscv"
- name: "sdmmc"
path: "/home/king/esp/esp-idf/components/sdmmc"
- name: "soc"
path: "/home/king/esp/esp-idf/components/soc"
- name: "spi_flash"
path: "/home/king/esp/esp-idf/components/spi_flash"
- name: "spiffs"
path: "/home/king/esp/esp-idf/components/spiffs"
- name: "tcp_transport"
path: "/home/king/esp/esp-idf/components/tcp_transport"
- name: "touch_element"
path: "/home/king/esp/esp-idf/components/touch_element"
- name: "ulp"
path: "/home/king/esp/esp-idf/components/ulp"
- name: "unity"
path: "/home/king/esp/esp-idf/components/unity"
- name: "usb"
path: "/home/king/esp/esp-idf/components/usb"
- name: "vfs"
path: "/home/king/esp/esp-idf/components/vfs"
- name: "wear_levelling"
path: "/home/king/esp/esp-idf/components/wear_levelling"
- name: "wifi_provisioning"
path: "/home/king/esp/esp-idf/components/wifi_provisioning"
- name: "wpa_supplicant"
path: "/home/king/esp/esp-idf/components/wpa_supplicant"
- name: "xtensa"
path: "/home/king/esp/esp-idf/components/xtensa"
- name: "main"
path: "/mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/main"
- name: "esp_jpeg"
path: "/mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/components/esp_jpeg"
- name: "esp_lvgl_port"
path: "/mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/components/esp_lvgl_port"
- name: "esp_mmap_assets"
path: "/mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/components/esp_mmap_assets"
- name: "esp_wrover_kit"
path: "/mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/components/esp_wrover_kit"
- name: "espressif__cmake_utilities"
path: "/mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/components/espressif__cmake_utilities"
- name: "espressif__esp-dsp"
path: "/mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/components/espressif__esp-dsp"
- name: "espressif__freetype"
path: "/mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/components/espressif__freetype"
- name: "espressif__jsmn"
path: "/mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/components/espressif__jsmn"
- name: "espressif__nghttp"
path: "/mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/components/espressif__nghttp"
- name: "lvgl__lvgl"
path: "/mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/components/lvgl__lvgl"
CMake Error at CMakeLists.txt:5 (include):
include could not find requested file:
/CMakeLists.txt
CMake Error at CMakeLists.txt:5 (include):
include could not find requested file:
/CMakeLists.txt
-- IDF_TARGET is not set, guessed 'esp32' from sdkconfig '/mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/sdkconfig'
-- Found Git: /usr/bin/git (found version "2.34.1")
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- git rev-parse returned 'fatal: not a git repository (or any parent up to mount point /mnt)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).'
-- Could not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
Manifest files have changed, solving dependencies.
Using component placed at /mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/components/esp_lvgl_port for dependency espressif/esp_lvgl_port(^2)(introduced by component esp_wrover_kit)
Using component placed at /mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/components/esp_mmap_assets for dependency espressif/esp_mmap_assets(==1.0.0), specified in /mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/main/idf_component.yml
Using component placed at /mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/components/espressif__freetype for dependency espressif/freetype(2.*), specified in /mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/main/idf_component.yml
Using component placed at /mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/components/lvgl__lvgl for dependency lvgl/lvgl(~8.4.0), specified in /mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/main/idf_component.yml
Using component placed at /mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/components/espressif__cmake_utilities for dependency espressif/cmake_utilities(0.*)(introduced by component esp_mmap_assets), specified in /mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/main/idf_component.yml
-- IDF_TARGET is not set, guessed 'esp32' from sdkconfig '/mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/sdkconfig'
-- Found Git: /usr/bin/git (found version "2.34.1")
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/king/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- git rev-parse returned 'fatal: not a git repository (or any parent up to mount point /mnt)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).'
-- Could not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
Manifest files have changed, solving dependencies.
Using component placed at /mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/components/esp_lvgl_port for dependency espressif/esp_lvgl_port(^2)(introduced by component esp_wrover_kit)
Using component placed at /mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/components/esp_mmap_assets for dependency espressif/esp_mmap_assets(==1.0.0), specified in /mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/main/idf_component.yml
Using component placed at /mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/components/espressif__freetype for dependency espressif/freetype(2.*), specified in /mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/main/idf_component.yml
Using component placed at /mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/components/lvgl__lvgl for dependency lvgl/lvgl(~8.4.0), specified in /mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/main/idf_component.yml
Using component placed at /mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/components/espressif__cmake_utilities for dependency espressif/cmake_utilities(0.*)(introduced by component esp_mmap_assets), specified in /mnt/hgfs/Shared/yedea-c011-M/yedea-c011-l/main/idf_component.yml
......@@ -2,7 +2,7 @@ dependencies:
esp_mmap_assets:
component_hash: null
source:
path: /home/king/espadf/esp-adf/yedea-c011-l/yedea-c011-l/components/esp_mmap_assets
path: /home/king/espadf/esp-adf/yadea_m_esp32/yadea_m_esp32/components/esp_mmap_assets
type: local
version: 1.0.0
espressif/cmake_utilities:
......@@ -14,37 +14,37 @@ dependencies:
espressif/esp_lvgl_port:
component_hash: null
source:
path: /home/king/espadf/esp-adf/yedea-c011-l/yedea-c011-l/components/esp_lvgl_port
path: /home/king/espadf/esp-adf/yadea_m_esp32/yadea_m_esp32/components/esp_lvgl_port
type: local
version: 2.0.0
espressif__cmake_utilities:
component_hash: null
source:
path: /home/king/espadf/esp-adf/yedea-c011-l/yedea-c011-l/components/espressif__cmake_utilities
path: /home/king/espadf/esp-adf/yadea_m_esp32/yadea_m_esp32/components/espressif__cmake_utilities
type: local
version: 0.5.3
espressif__esp-dsp:
component_hash: null
source:
path: /home/king/espadf/esp-adf/yedea-c011-l/yedea-c011-l/components/espressif__esp-dsp
path: /home/king/espadf/esp-adf/yadea_m_esp32/yadea_m_esp32/components/espressif__esp-dsp
type: local
version: 1.4.12
espressif__freetype:
component_hash: null
source:
path: /home/king/espadf/esp-adf/yedea-c011-l/yedea-c011-l/components/espressif__freetype
path: /home/king/espadf/esp-adf/yadea_m_esp32/yadea_m_esp32/components/espressif__freetype
type: local
version: 2.13.0~1
espressif__jsmn:
component_hash: null
source:
path: /home/king/espadf/esp-adf/yedea-c011-l/yedea-c011-l/components/espressif__jsmn
path: /home/king/espadf/esp-adf/yadea_m_esp32/yadea_m_esp32/components/espressif__jsmn
type: local
version: 1.1.0
espressif__nghttp:
component_hash: null
source:
path: /home/king/espadf/esp-adf/yedea-c011-l/yedea-c011-l/components/espressif__nghttp
path: /home/king/espadf/esp-adf/yadea_m_esp32/yadea_m_esp32/components/espressif__nghttp
type: local
version: 1.58.0
idf:
......@@ -55,9 +55,9 @@ dependencies:
lvgl__lvgl:
component_hash: null
source:
path: /home/king/espadf/esp-adf/yedea-c011-l/yedea-c011-l/components/lvgl__lvgl
path: /home/king/espadf/esp-adf/yadea_m_esp32/yadea_m_esp32/components/lvgl__lvgl
type: local
version: 8.4.0
manifest_hash: 22154e8d69f26a3e2219fff04f8819e87272dee142f8827c4b8896d389107185
manifest_hash: 79ed4aa64de969391cf4e7470af9f75f1e6acda729fb4421a91e5189b99ebf82
target: esp32
version: 1.0.0
......@@ -22,9 +22,9 @@ set_source_files_properties(
spiffs_create_partition_image(storage ../spiffs FLASH_IN_PROJECT)
target_link_libraries(${COMPONENT_LIB} INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/libtyw_eeprom.a"
"${CMAKE_CURRENT_LIST_DIR}/libtyw_Mileage.a"
"${CMAKE_CURRENT_LIST_DIR}/libtyw_tell.a")
"${CMAKE_CURRENT_LIST_DIR}"
"${CMAKE_CURRENT_LIST_DIR}"
"${CMAKE_CURRENT_LIST_DIR}")
# spiffs_create_partition_assets(my_spiffs_partition my_folder FLASH_IN_PROJECT)
# idf_component_get_property(lvgl_lib lvgl__lvgl COMPONENT_LIB)
......
#include "Common_Interface.h"
#include "app_dataProcess.h"
#include "System_Monitor.h"
......
#include <dirent.h>
#include <stdbool.h>
#include <stdint.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "esp_err.h"
#include "esp_partition.h"
#include "spi_flash_mmap.h"
#include "bsp/esp-bsp.h"
#include "bsp/display.h"
#include "lv_demos.h"
#include "lv_examples.h"
#include "esp_jpeg_dec.h"
#include "lvgl.h"
#include "nvs_flash.h"
#include "nvs.h"
#include "esp_spiffs.h"
#include "assets_generate.h"
#include "esp_log.h"
#include <string.h>
#include <inttypes.h>
#include "lv_esp_jpg.h"
#include "Gui_Display_priv.h"
#include "esp_mmap_assets.h"
#include "a2dp_sink_and_hfp.h"
#include "Lvgl_User.h"
#include <stdbool.h>
#include "Telltales_Lib.h"
#include "Telltales_user.h"
#include "MCU_Core_Protocol.h"
static const char *TAG = "Gui_Display";
static mmap_assets_handle_t asset_handle;
extern void Lvgl_On_Timer(lv_timer_t *timer);
#define TYPE_PNG "png.png"
#define TYPE_JPG "jpg.jpg"
#define TYPE_TTF "Yedea_Font.ttf"
// uint8_t *img_data[TOTAL_MMAP_FILES];
// void image_mmap_init(const esp_partition_t *partition)
// {
// const void *root;
// int free_pages = spi_flash_mmap_get_free_pages(ESP_PARTITION_MMAP_DATA);
// uint32_t storage_size = free_pages * 64 * 1024; // Byte
// ESP_LOGI(TAG, "The storage free size is %ld KB", storage_size / 1024);
// ESP_LOGI(TAG, "The partition size is %ld KB", partition->size / 1024);
// if (storage_size < partition->size)
// {
// ESP_LOGE(TAG, "The storage free size of this board is less than %s partition required size", partition->label);
// }
// void *mmap_handle = (esp_partition_mmap_handle_t *)malloc(sizeof(esp_partition_mmap_handle_t));
// ESP_ERROR_CHECK(esp_partition_mmap(partition, 0, partition->size, ESP_PARTITION_MMAP_DATA, &root, mmap_handle));
// for (int i = 0; i < TOTAL_MMAP_FILES; i++)
// {
// img_data[i] = (void *)(root + 4 + mmap_table[i].offset);
// // ESP_LOGI(TAG, "[%d], offset:[%07d], filesize:[%d], filename:%s, %p",
// // i,
// // mmap_table[i].offset,
// // mmap_table[i].file_size,
// // mmap_table[i].filename,
// // img_data[i]);
// }
// ESP_LOGI(TAG, "file_num: %" PRIu32, *(uint32_t *)root);
// assert(TOTAL_MMAP_FILES == *(uint32_t *)root);
// }
// void mmap_assert_Init(void)
// {
// const char *partition_label = "assert";
// const esp_partition_t *img_partition = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_ANY, partition_label);
// if (img_partition)
// {
// image_mmap_init(img_partition);
// }
// else
// {
// ESP_LOGE(TAG, "Can not find %s in partition table", partition_label);
// }
// }
void printf_stack()
{
// MALLOC_CAP_INTERNAL 内部ram
// MALLOC_CAP_SPIRAM 外部psram
static char buffer[128];
sprintf(buffer, " Biggest / Free / Min/ Total\n"
"\t SRAM : [%8d / %8d / %8d / %8d]",
heap_caps_get_largest_free_block(MALLOC_CAP_SPIRAM),
heap_caps_get_free_size(MALLOC_CAP_SPIRAM),
heap_caps_get_minimum_free_size(MALLOC_CAP_SPIRAM),
heap_caps_get_total_size(MALLOC_CAP_SPIRAM));
ESP_LOGI("MEM", "%s", buffer);
}
static lv_ft_info_t info18 = {
.weight = 18,
.style = FT_FONT_STYLE_NORMAL,
.name = "Yedea_Font.ttf",
.mem = NULL,
};
static lv_ft_info_t info24 = {
.weight = 24,
.style = FT_FONT_STYLE_NORMAL,
.name = "Yedea_Font.ttf",
.mem = NULL,
};
static lv_ft_info_t info45 = {
.weight = 45,
.style = FT_FONT_STYLE_NORMAL,
.name = "Yedea_Font.ttf",
.mem = NULL,
};
static lv_ft_info_t info16 = {
.weight = 16,
.style = FT_FONT_STYLE_NORMAL,
.name = "Yedea_Font.ttf",
.mem = NULL,
};
static lv_ft_info_t info20 = {
.weight = 20,
.style = FT_FONT_STYLE_NORMAL,
.name = "Yedea_Font.ttf",
.mem = NULL,
};
/**
* @brief 初始化freetype
*/
bool create_example_freetype(void)
{
bool bRet = false;
info24.mem = mmap_assets_get_mem(asset_handle, MMAP_YEDEA_FONT_TTF);
info24.mem_size = mmap_assets_get_size(asset_handle, MMAP_YEDEA_FONT_TTF);
info18.mem = mmap_assets_get_mem(asset_handle, MMAP_YEDEA_FONT_TTF);
info18.mem_size = mmap_assets_get_size(asset_handle, MMAP_YEDEA_FONT_TTF);
info45.mem = mmap_assets_get_mem(asset_handle, MMAP_YEDEA_FONT_TTF);
info45.mem_size = mmap_assets_get_size(asset_handle, MMAP_YEDEA_FONT_TTF);
info16.mem = mmap_assets_get_mem(asset_handle, MMAP_YEDEA_FONT_TTF);
info16.mem_size = mmap_assets_get_size(asset_handle, MMAP_YEDEA_FONT_TTF);
info20.mem = mmap_assets_get_mem(asset_handle, MMAP_YEDEA_FONT_TTF);
info20.mem_size = mmap_assets_get_size(asset_handle, MMAP_YEDEA_FONT_TTF);
bRet = lv_ft_font_init(&info24);
ESP_ERROR_CHECK(((true == bRet) ? ESP_OK : ESP_FAIL));
bRet = lv_ft_font_init(&info18);
ESP_ERROR_CHECK(((true == bRet) ? ESP_OK : ESP_FAIL));
bRet = lv_ft_font_init(&info45);
ESP_ERROR_CHECK(((true == bRet) ? ESP_OK : ESP_FAIL));
bRet = lv_ft_font_init(&info16);
ESP_ERROR_CHECK(((true == bRet) ? ESP_OK : ESP_FAIL));
bRet = lv_ft_font_init(&info20);
ESP_ERROR_CHECK(((true == bRet) ? ESP_OK : ESP_FAIL));
return true;
}
/**
* @brief 此函数用于创建设置图像
* @param obj 传入对象指针
* @param Data 传入图片数据指针 如仅创建对象传入NULL
* @param Img_Index 传入图片索引 MMAP_FILES
* @param x_coord 传入图片x坐标
* @param y_coord 传入图片y坐标
* @param HideFlag 设置图片属性是否隐藏
* @code Create_set_image(&UI_Lamp_01, &Lamp_01_Handle, MMAP_RAIN_JPG, 0, 0, 0);
*/
void Create_set_image(bool not_cache, lv_obj_t **obj, lv_img_dsc_t *Data, uint32_t Img_Index, uint32_t x_coord, uint32_t y_coord, uint8_t HideFlag)
{
if (Data == NULL)
{
ESP_LOGW(TAG, "Create_set_image Input *Data NULL !!!!");
return;
}
if (Img_Index >= TOTAL_MMAP_FILES)
{
ESP_LOGW(TAG, "Create_set_image Input Img_Index Over Max !!!!");
return;
}
if (*obj == NULL)
{
*obj = lv_img_create(blackground_bg);
}
if ((Data != NULL) && (Img_Index < TOTAL_MMAP_FILES))
{
Data->header.reserved = not_cache;
Data->header.w = mmap_assets_get_width(asset_handle, Img_Index);
Data->header.h = mmap_assets_get_height(asset_handle, Img_Index);
Data->header.always_zero = 0;
Data->data_size = mmap_assets_get_size(asset_handle, Img_Index);
Data->data = mmap_assets_get_mem(asset_handle, Img_Index);
if (strstr(mmap_assets_get_name(asset_handle, Img_Index), ".png"))
{
Data->header.cf = LV_IMG_CF_RAW_ALPHA;
printf("png \n");
}
else
{
printf("jpg \n");
Data->header.cf = LV_IMG_CF_RAW;
}
lv_img_set_src(*obj, Data);
}
lv_obj_set_width(*obj, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(*obj, LV_SIZE_CONTENT); /// 1
lv_obj_set_pos(*obj, x_coord, y_coord);
if (HideFlag)
{
lv_obj_add_flag(*obj, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(*obj, LV_OBJ_FLAG_SCROLLABLE);
}
}
void Create_Spiffs_image(lv_obj_t **obj, char *image, uint32_t x_coord, uint32_t y_coord, uint8_t HideFlag)
{
if (image == NULL)
{
ESP_LOGW(TAG, "Create_set_image Input *Data NULL !!!!");
return;
}
if (*obj == NULL)
{
*obj = lv_img_create(blackground_bg);
}
lv_img_set_src(*obj, image);
lv_obj_set_pos(*obj, x_coord, y_coord);
if (HideFlag)
{
lv_obj_add_flag(*obj, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(*obj, LV_OBJ_FLAG_SCROLLABLE);
}
}
/**
* @brief 此函数用于更新控件图像信息
* @param obj 传入控件指针
* @param Data 图像数据
* @param Img_Index 图片索引
*/
void Set_Image_Decode(lv_obj_t *obj, lv_img_dsc_t *Data, uint32_t Img_Index)
{
Data->header.reserved = 0;
Data->header.w = mmap_assets_get_width(asset_handle, Img_Index);
Data->header.h = mmap_assets_get_height(asset_handle, Img_Index);
Data->header.always_zero = 0;
Data->data_size = mmap_assets_get_size(asset_handle, Img_Index);
Data->data = mmap_assets_get_mem(asset_handle, Img_Index);
// printf("width %d\n",mmap_assets_get_width(asset_handle, Img_Index));
// printf("height %d\n",mmap_assets_get_height(asset_handle, Img_Index));
// printf("Img_Index %d\n",Img_Index);
if (strstr(mmap_assets_get_name(asset_handle, Img_Index), ".png"))
{
Data->header.cf = LV_IMG_CF_RAW_ALPHA;
}
else
{
Data->header.cf = LV_IMG_CF_RAW;
}
lv_img_set_src(obj, Data);
}
/**
* @brief 此函数用于设置utf-8格式文本显示
* @param obj 传入文本对象
* @param Data 传入文本数据
* @param Show_Hide_Flag 显隐标志 0 隐藏 1 显示
*/
void Gui_Set_Utf_8_Text_Disp(lv_obj_t *obj, uint8_t *Data, bool Show_Hide_Flag)
{
// ESP_LOGE("Gui_Set_Utf_8_Text_Disp","Start");
// for (int i = 0; i < sizeof(Data); i++)
// {
// ESP_LOGE("ui_Set_Utf_8_Text_Disp ","Data[%x]",Data[i]);
// }
if ((Show_Hide_Flag) && (Data != NULL))
{
set_widget_show_or_hide(obj, 1);
lv_label_set_text(obj, Data);
}
else
{
set_widget_show_or_hide(obj, 0);
}
free(Data);
Data = NULL;
}
/**
* @brief 此函数用于设置字符串格式文本显示
* @param obj 传入文本对象
* @param Data 传入文本数据
* @param Show_Hide_Flag 显隐标志 0 隐藏 1 显示
*/
void Gui_Set_Char_Text_Disp(lv_obj_t *obj, char *Data, bool Show_Hide_Flag)
{
if (Show_Hide_Flag)
{
set_widget_show_or_hide(obj, 1);
lv_label_set_text(obj, Data);
}
else
{
set_widget_show_or_hide(obj, 0);
}
}
static lv_obj_t *label_vector_font30 = NULL;
// const _St_Size18_Text Text_Size18[1] =
// {
// {
// "倒车中\n松开按键退出",
// 0,
// 103,
// 320,
// },
// };
const _St_Size18_Text Phone_Status[2] =
{
{"通话中", 0, 0},
{"来电", 102, 210},
};
/**
* @brief 此函数用于设置字符串格式文本显示
* @param obj 传入文本对象
* @param Data 传入文本数据
* @param Show_Hide_Flag 显隐标志 0 隐藏 1 显示
*/
lv_timer_t *LvglTimer = NULL;
lv_obj_t *imgtest;
lv_obj_t *img;
/**
* @brief 此函数用于初始化对象
* 需注意,图像需要在顶层时,需要放到最下面初始化!!!!!
*/
void Lvgl_Contrl_Init(void)
{
blackground_bg = lv_obj_create(lv_scr_act());
// lv_obj_remove_style_all(blackground_bg);
lv_obj_set_size(blackground_bg, LV_HOR_RES, LV_VER_RES);
lv_obj_set_align(blackground_bg, LV_ALIGN_CENTER);
lv_obj_set_style_bg_color(blackground_bg, lv_color_hex(0), 0);
lv_obj_set_style_pad_all(blackground_bg, 0, 0);
lv_obj_set_style_border_width(blackground_bg, 0, 0); // set biankuang kuandu
lv_obj_set_style_radius(blackground_bg, LV_STATE_DEFAULT, 0); // 设置对象obj的圆角半径为0个像素
lv_obj_clear_flag(blackground_bg, LV_OBJ_FLAG_SCROLLABLE);
PowerOnAnim = lv_img_create(blackground_bg);
lv_obj_set_pos(PowerOnAnim, 0, 59);
/* Set src of image with file name */
// lv_img_set_src(img, "S:/spiffs/emoji_u1f60f.png");
/* Align object */
// lv_obj_align(img, LV_ALIGN_CENTER, 0, 0);
// Create_Spiffs_image(&Music_Icon_B,"S:/spiffs/music_p_01.jpg", 60, 67, 1);
Music_Icon_B = lv_img_create(blackground_bg);
lv_img_set_src(Music_Icon_B, "S:/spiffs/music_p_01.jpg");
lv_obj_set_pos(Music_Icon_B, 60, 67);
lv_obj_add_flag(Music_Icon_B, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Music_Icon_B, LV_OBJ_FLAG_SCROLLABLE);
Music_Icon_S = lv_img_create(blackground_bg);
lv_img_set_src(Music_Icon_S, "S:/spiffs/music_p_02.jpg");
lv_obj_set_pos(Music_Icon_S, 88, 97);
lv_obj_add_flag(Music_Icon_S, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Music_Icon_S, LV_OBJ_FLAG_SCROLLABLE);
Music_Left = lv_img_create(blackground_bg);
lv_img_set_src(Music_Left, "S:/spiffs/music_p_04.jpg");
lv_obj_set_pos(Music_Left, 43, 285);
lv_obj_add_flag(Music_Left, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Music_Left, LV_OBJ_FLAG_SCROLLABLE);
Music_Right = lv_img_create(blackground_bg);
lv_img_set_src(Music_Right, "S:/spiffs/music_p_05.jpg");
lv_obj_set_pos(Music_Right, 111, 281);
lv_obj_add_flag(Music_Right, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Music_Right, LV_OBJ_FLAG_SCROLLABLE);
Music_Start = lv_img_create(blackground_bg);
lv_img_set_src(Music_Start, "S:/spiffs/music_p_06.jpg");
lv_obj_set_pos(Music_Start, 176, 281);
lv_obj_add_flag(Music_Start, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Music_Start, LV_OBJ_FLAG_SCROLLABLE);
// Create_set_image(0, &Music_Icon_B, &Music_Icon_B_Hdl, MMAP_MUSIC_P_01_JPG, 60, 67, 1);
// Create_set_image(0, &Music_Icon_S, &Music_Icon_S_Hdl, MMAP_MUSIC_P_02_JPG, 88, 97, 1);
// Create_set_image(0, &Music_Left, &Music_Left_Hdl, MMAP_MUSIC_P_04_JPG, 43, 285, 1);
// Create_set_image(0, &Music_Right, &Music_Right_Hdl, MMAP_MUSIC_P_05_JPG, 111, 281, 1);
// Create_set_image(0, &Music_Start, &Music_Start_Hdl, MMAP_MUSIC_P_06_JPG, 176, 285, 1);
Music_Text = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(Music_Text, info18.font, 0); /* 设置字体 */
lv_obj_set_style_text_align(Music_Text, LV_TEXT_ALIGN_CENTER, 0); /* 设置文本水平居中 */
lv_obj_set_pos(Music_Text, 28, 212);
lv_obj_set_size(Music_Text, 196, 28);
lv_obj_set_style_text_color(Music_Text, lv_color_make(0xff, 0xff, 0xff), 0);
lv_label_set_long_mode(Music_Text, LV_LABEL_LONG_SCROLL); /* 设置长文本模式 */
lv_obj_add_flag(Music_Text, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Music_Text, LV_OBJ_FLAG_SCROLLABLE);
Music_Composer = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(Music_Composer, info18.font, 0); /* 设置字体 */
lv_obj_set_style_text_align(Music_Composer, LV_TEXT_ALIGN_CENTER, 0); /* 设置文本水平居中 */
lv_obj_set_pos(Music_Composer, 91, 235);
lv_obj_set_size(Music_Composer, 59, 18);
lv_obj_set_style_text_color(Music_Composer, lv_color_make(0xff, 0xff, 0xff), 0);
lv_label_set_long_mode(Music_Composer, LV_LABEL_LONG_SCROLL); /* 设置长文本模式 */
lv_obj_add_flag(Music_Composer, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Music_Composer, LV_OBJ_FLAG_SCROLLABLE);
Music_InValid = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(Music_InValid, info20.font, 0); /* 设置字体 */
lv_obj_set_style_text_align(Music_InValid, LV_TEXT_ALIGN_CENTER, 0); /* 设置文本水平居中 */
lv_label_set_text(Music_InValid, "来听首歌吧");
lv_obj_set_pos(Music_InValid, 70, 212);
lv_obj_set_size(Music_InValid, 100, 30);
lv_obj_set_style_text_color(Music_InValid, lv_color_make(0xff, 0xff, 0xff), 0);
lv_label_set_long_mode(Music_InValid, LV_LABEL_LONG_SCROLL); /* 设置长文本模式 */
lv_obj_add_flag(Music_InValid, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Music_InValid, LV_OBJ_FLAG_SCROLLABLE);
// Create_set_image(0, &Iphone_Icon, &Iphone_Icon_Hdl, MMAP_PHONE_P_01_JPG, 90, 92, 1);
Iphone_Icon = lv_img_create(blackground_bg);
lv_img_set_src(Iphone_Icon, "S:/spiffs/phone_p_01.jpg");
lv_obj_set_pos(Iphone_Icon, 90, 92);
lv_obj_add_flag(Iphone_Icon, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Iphone_Icon, LV_OBJ_FLAG_SCROLLABLE);
Iphone_Status = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(Iphone_Status, info18.font, 0); /* 设置字体 */
// lv_obj_align(Iphone_Status, LV_ALIGN_CENTER, 0, 0);
lv_obj_set_pos(Iphone_Status, Phone_Status[1].StartX, Phone_Status[1].StartY);
lv_obj_set_size(Iphone_Status, 60, 25);
lv_obj_set_style_text_color(Iphone_Status, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(Iphone_Status, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Iphone_Status, LV_OBJ_FLAG_SCROLLABLE);
Iphone_Timer = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(Iphone_Timer, info24.font, 0); /* 设置字体 */
lv_obj_set_pos(Iphone_Timer, 93, 290);
lv_obj_set_size(Iphone_Timer, 100, 24);
lv_obj_set_style_text_color(Iphone_Timer, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(Iphone_Timer, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Iphone_Timer, LV_OBJ_FLAG_SCROLLABLE);
Iphone_Reminder = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(Iphone_Reminder, info18.font, 0); /* 设置字体 */
lv_obj_set_pos(Iphone_Reminder, 57, 293);
lv_obj_set_size(Iphone_Reminder, 126, 18);
lv_label_set_text(Iphone_Reminder, "请使用手机接听");
lv_obj_set_style_text_color(Iphone_Reminder, lv_color_make(0xff, 0x00, 0x00), 0);
lv_obj_add_flag(Iphone_Reminder, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Iphone_Reminder, LV_OBJ_FLAG_SCROLLABLE);
Iphone_Num = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(Iphone_Num, info18.font, 0); /* 设置字体 */
lv_obj_set_style_text_align(Iphone_Num, LV_TEXT_ALIGN_CENTER, 0); /* 设置文本水平居中 */
lv_obj_set_style_text_letter_space(Iphone_Num, 2, 0); /* 设置字间距 */
lv_obj_set_pos(Iphone_Num, 48, 182);
lv_obj_set_size(Iphone_Num, 144, 18);
lv_obj_set_style_text_color(Iphone_Num, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_align(Iphone_Num, LV_ALIGN_CENTER, 0, 0);
lv_obj_add_flag(Iphone_Num, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Iphone_Num, LV_OBJ_FLAG_SCROLLABLE);
// Create_set_image(1, &anim, &animhdl, MMAP_TO_001_JPG, 0, 59, 1);
// Create_set_image(0, &Build, &Build_Hdl, MMAP_BUI_ECO_JPG, 76, 253, 1);
// Create_set_image(0, &Power_Bg, &Power_Bg_Hdl, MMAP_CLU_CITY_JPG, 17, 68, 1);
// Create_set_image(0, &Main_Road, &Main_Road_Hdl, MMAP_ROAD_CITY_JPG, 0, 239, 1);
Build = lv_img_create(blackground_bg);
lv_img_set_src(Build, "S:/spiffs/bui_eco.jpg");
lv_obj_set_pos(Build, 76, 253);
lv_obj_add_flag(Build, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Build, LV_OBJ_FLAG_SCROLLABLE);
Power_Bg = lv_img_create(blackground_bg);
lv_img_set_src(Power_Bg, "S:/spiffs/clu_city.jpg");
lv_obj_set_pos(Power_Bg, 17, 68);
lv_obj_add_flag(Power_Bg, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Power_Bg, LV_OBJ_FLAG_SCROLLABLE);
Main_Road = lv_img_create(blackground_bg);
lv_img_set_src(Main_Road, "S:/spiffs/road_city.jpg");
lv_obj_set_pos(Main_Road, 0, 239);
lv_obj_add_flag(Main_Road, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Main_Road, LV_OBJ_FLAG_SCROLLABLE);
Power_NumOne = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(Power_NumOne, info45.font, 0); /* 设置字体 */
lv_obj_set_pos(Power_NumOne, 58, 167);
lv_obj_set_size(Power_NumOne, 101, 45);
lv_obj_set_style_text_color(Power_NumOne, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(Power_NumOne, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Power_NumOne, LV_OBJ_FLAG_SCROLLABLE);
Power_NumTen = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(Power_NumTen, info45.font, 0); /* 设置字体 */
lv_obj_set_pos(Power_NumTen, 58, 167);
lv_obj_set_size(Power_NumTen, 101, 45);
lv_obj_set_style_text_color(Power_NumTen, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(Power_NumTen, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Power_NumTen, LV_OBJ_FLAG_SCROLLABLE);
Power_NumDot = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(Power_NumTen, info45.font, 0); /* 设置字体 */
lv_obj_set_pos(Power_NumDot, 58, 167);
lv_obj_set_size(Power_NumDot, 101, 45);
lv_obj_set_style_text_color(Power_NumDot, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(Power_NumDot, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Power_NumDot, LV_OBJ_FLAG_SCROLLABLE);
Power_NumHundred = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(Power_NumHundred, info45.font, 0); /* 设置字体 */
lv_obj_set_pos(Power_NumHundred, 58, 167);
lv_obj_set_size(Power_NumHundred, 101, 45);
lv_obj_set_style_text_color(Power_NumHundred, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(Power_NumHundred, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Power_NumHundred, LV_OBJ_FLAG_SCROLLABLE);
// Create_set_image(0, &Tbox, &Tbox_Hdl, MMAP_STA_ICON_04_JPG, 198, 12, 1);
// Create_set_image(0, &Gps, &Gps_Hdl, MMAP_STA_ICON_02_JPG, 158, 12, 1);
// Create_set_image(0, &Iphone, &Iphone_Hdl, MMAP_STA_ICON_01_JPG, 122, 10, 1);
// Create_set_image(0, &Temp, &Temp_Hdl, MMAP_STA_ICON_06_JPG, 7, 7, 1);
Tbox = lv_img_create(blackground_bg);
lv_img_set_src(Tbox, "S:/spiffs/sta_icon_04.jpg");
lv_obj_set_pos(Tbox, 198, 12);
lv_obj_add_flag(Tbox, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Tbox, LV_OBJ_FLAG_SCROLLABLE);
Gps = lv_img_create(blackground_bg);
lv_img_set_src(Gps, "S:/spiffs/sta_icon_02.jpg");
lv_obj_set_pos(Gps, 158, 12);
lv_obj_add_flag(Gps, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Gps, LV_OBJ_FLAG_SCROLLABLE);
Iphone = lv_img_create(blackground_bg);
lv_img_set_src(Iphone, "S:/spiffs/sta_icon_01.jpg");
lv_obj_set_pos(Iphone, 122, 10);
lv_obj_add_flag(Iphone, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Iphone, LV_OBJ_FLAG_SCROLLABLE);
Temp = lv_img_create(blackground_bg);
lv_img_set_src(Temp, "S:/spiffs/sta_icon_07.jpg");
lv_obj_set_pos(Temp, 7, 7);
lv_obj_add_flag(Temp, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Temp, LV_OBJ_FLAG_SCROLLABLE);
TempNum = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(TempNum, info16.font, 0); /* 设置字体 */
lv_obj_set_pos(TempNum, 53, 19);
lv_obj_set_size(TempNum, 42, 22);
lv_obj_set_style_text_color(TempNum, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(TempNum, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(TempNum, LV_OBJ_FLAG_SCROLLABLE);
Nav_Icon = lv_img_create(blackground_bg);
lv_obj_set_pos(Nav_Icon, 60, 62);
lv_obj_add_flag(Nav_Icon, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Nav_Icon, LV_OBJ_FLAG_SCROLLABLE);
NavText = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(NavText, info18.font, 0); /* 设置字体 */
lv_label_set_long_mode(NavText, LV_LABEL_LONG_SCROLL); /* 设置长文本模式 */
lv_obj_set_scroll_dir(NavText, LV_DIR_HOR);
lv_obj_set_pos(NavText, 23, 258); /* 设置坐标 */
lv_obj_set_size(NavText, 195, 25); /* 设置控件大小 */
lv_obj_set_style_text_color(NavText, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(NavText, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(NavText, LV_OBJ_FLAG_SCROLLABLE);
NavTimeText = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(NavTimeText, info18.font, 0); /* 设置字体 */
lv_label_set_long_mode(NavTimeText, LV_LABEL_LONG_SCROLL); /* 设置长文本模式 */
lv_obj_set_scroll_dir(NavTimeText, LV_DIR_HOR);
lv_obj_set_pos(NavTimeText, 100, 299); /* 设置坐标 */
lv_obj_set_size(NavTimeText, 140, 28); /* 设置控件大小 */
lv_obj_set_style_text_color(NavTimeText, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(NavTimeText, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(NavTimeText, LV_OBJ_FLAG_SCROLLABLE);
NavDistance = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(NavDistance, info18.font, 0); /* 设置字体 */
lv_label_set_long_mode(NavDistance, LV_LABEL_LONG_SCROLL); /* 设置长文本模式 */
lv_obj_set_scroll_dir(NavDistance, LV_DIR_HOR);
lv_obj_set_pos(NavDistance, 15, 297); /* 设置坐标 */
lv_obj_set_size(NavDistance, 80, 28); /* 设置控件大小 */
lv_obj_set_style_text_color(NavDistance, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(NavDistance, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(NavDistance, LV_OBJ_FLAG_SCROLLABLE);
PowerIcon = lv_img_create(blackground_bg);
// lv_img_set_src(PowerIcon, "S:/spiffs/sta_icon_07.jpg");
// lv_obj_set_pos(PowerIcon, 7, 7);
lv_obj_add_flag(PowerIcon, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(PowerIcon, LV_OBJ_FLAG_SCROLLABLE);
PowerSeg = lv_img_create(blackground_bg);
// lv_img_set_src(PowerIcon, "S:/spiffs/sta_icon_07.jpg");
lv_obj_set_pos(PowerSeg, 108, 348);
lv_obj_add_flag(PowerSeg, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(PowerSeg, LV_OBJ_FLAG_SCROLLABLE);
PowerBackGround = lv_img_create(blackground_bg);
lv_img_set_src(PowerBackGround, "S:/spiffs/pwr_bot.jpg");
lv_obj_set_pos(PowerBackGround, 64, 353);
lv_obj_add_flag(PowerBackGround, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(PowerBackGround, LV_OBJ_FLAG_SCROLLABLE);
PowerBackLine = lv_img_create(blackground_bg);
lv_img_set_src(PowerBackLine, "S:/spiffs/pwr_line.jpg");
lv_obj_set_pos(PowerBackLine, 112, 348);
lv_obj_add_flag(PowerBackLine, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(PowerBackLine, LV_OBJ_FLAG_SCROLLABLE);
Ui_NatInfoOne = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(Ui_NatInfoOne, info45.font, 0); /* 设置字体 */
// lv_obj_set_pos(Ui_NatInfoOne, 100, 198);
lv_obj_set_size(Ui_NatInfoOne, 32, 35);
lv_obj_set_style_text_color(Ui_NatInfoOne, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(Ui_NatInfoOne, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Ui_NatInfoOne, LV_OBJ_FLAG_SCROLLABLE);
Ui_NatInfoTen = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(Ui_NatInfoTen, info45.font, 0); /* 设置字体 */
// lv_obj_set_pos(Ui_NatInfoTen, 100, 198);
lv_obj_set_size(Ui_NatInfoTen, 32, 35);
lv_obj_set_style_text_color(Ui_NatInfoTen, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(Ui_NatInfoTen, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Ui_NatInfoTen, LV_OBJ_FLAG_SCROLLABLE);
Ui_NatInfoHundredsPlace = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(Ui_NatInfoHundredsPlace, info45.font, 0); /* 设置字体 */
// lv_obj_set_pos(Ui_NatInfoHundredsPlace, 100, 198);
lv_obj_set_size(Ui_NatInfoHundredsPlace, 32, 35);
lv_obj_set_style_text_color(Ui_NatInfoHundredsPlace, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(Ui_NatInfoHundredsPlace, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Ui_NatInfoHundredsPlace, LV_OBJ_FLAG_SCROLLABLE);
Ui_NatInfoUnit = lv_img_create(blackground_bg);
lv_img_set_src(Ui_NatInfoUnit, "S:/spiffs/num45_12.jpg");
// lv_obj_set_pos(Ui_NatInfoUnit, 14, 343);
lv_obj_add_flag(Ui_NatInfoUnit, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Ui_NatInfoUnit, LV_OBJ_FLAG_SCROLLABLE);
// Create_set_image(0, &Alarm_BG, &Alarm_BG_Hdl, MMAP_POP_JPG, 15, 280, 1);
// Create_set_image(0, &AralmIcon, &AralmIcon_Hdl, MMAP_POP_P_01_JPG, 29, 300, 1);
AralmText = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(AralmText, info45.font, 0); /* 设置字体 */
lv_obj_set_pos(AralmText, 103, 100); /* 设置坐标 */
lv_obj_set_size(AralmText, 108, 100); /* 设置控件大小 */
lv_obj_set_style_text_color(AralmText, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(AralmText, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(AralmText, LV_OBJ_FLAG_SCROLLABLE);
DownText = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(DownText, info18.font, 0); /* 设置字体 */
// lv_obj_set_pos(AralmText, 103, 100); /* 设置坐标 */
lv_obj_set_size(DownText, 162, 30); /* 设置控件大小 */
lv_obj_set_style_text_color(DownText, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(DownText, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(DownText, LV_OBJ_FLAG_SCROLLABLE);
DownIcon = lv_img_create(blackground_bg);
lv_img_set_src(DownIcon, "S:/spiffs/bot_p_01.jpg");
lv_obj_set_pos(DownIcon, 14, 343);
lv_obj_add_flag(DownIcon, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(DownIcon, LV_OBJ_FLAG_SCROLLABLE);
Ui_Soc_BackGround = lv_img_create(blackground_bg);
lv_img_set_src(Ui_Soc_BackGround, "S:/spiffs/bui_eco.jpg");
lv_obj_set_pos(Ui_Soc_BackGround, 0, 224);
lv_obj_add_flag(Ui_Soc_BackGround, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Ui_Soc_BackGround, LV_OBJ_FLAG_SCROLLABLE);
Ui_Soc_Road = lv_img_create(blackground_bg);
lv_img_set_src(Ui_Soc_Road, "S:/spiffs/road_eco.jpg");
lv_obj_set_pos(Ui_Soc_Road, 0, 241);
lv_obj_add_flag(Ui_Soc_Road, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Ui_Soc_Road, LV_OBJ_FLAG_SCROLLABLE);
Ui_Soc_Round = lv_arc_create(blackground_bg);
// lv_obj_center(Ui_Soc_Round);
lv_arc_set_range(Ui_Soc_Round, 0, 100); // 设置圆弧的范围
lv_arc_set_bg_start_angle(Ui_Soc_Round, 0);
lv_arc_set_bg_end_angle(Ui_Soc_Round, 360);
lv_arc_set_rotation(Ui_Soc_Round, 90);
lv_obj_set_size(Ui_Soc_Round, 180, 180);
lv_obj_set_style_arc_color(Ui_Soc_Round, lv_color_make(0x17, 0xEF, 0xA1), LV_PART_MAIN);
lv_obj_set_style_arc_opa(Ui_Soc_Round, LV_OPA_10, LV_PART_MAIN);
lv_obj_set_style_arc_color(Ui_Soc_Round, lv_color_make(0x17, 0xEF, 0xA1), LV_PART_INDICATOR);
lv_obj_set_style_arc_width(Ui_Soc_Round, 18, LV_PART_MAIN);
lv_obj_set_style_arc_width(Ui_Soc_Round, 18, LV_PART_INDICATOR);
lv_obj_remove_style(Ui_Soc_Round, NULL, LV_PART_KNOB);
lv_obj_set_pos(Ui_Soc_Round, 30, 66);
lv_obj_add_flag(Ui_Soc_Round, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Ui_Soc_Round, LV_OBJ_FLAG_SCROLLABLE);
Ui_Soc_Icon = lv_img_create(blackground_bg);
lv_img_set_src(Ui_Soc_Icon, "S:/spiffs/icon_03.jpg");
lv_obj_set_pos(Ui_Soc_Icon, 113, 99);
lv_obj_add_flag(Ui_Soc_Icon, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Ui_Soc_Icon, LV_OBJ_FLAG_SCROLLABLE);
Ui_Soc_One = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(Ui_Soc_One, info45.font, 0); /* 设置字体 */
lv_obj_set_pos(Ui_Soc_One, 26, 100); /* 设置坐标 */
lv_obj_set_size(Ui_Soc_One, 126, 50); /* 设置控件大小 */
lv_obj_set_style_text_color(Ui_Soc_One, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(Ui_Soc_One, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Ui_Soc_One, LV_OBJ_FLAG_SCROLLABLE);
Ui_Soc_Ten = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(Ui_Soc_Ten, info45.font, 0); /* 设置字体 */
lv_obj_set_pos(Ui_Soc_Ten, 26, 100); /* 设置坐标 */
lv_obj_set_size(Ui_Soc_Ten, 126, 50); /* 设置控件大小 */
lv_obj_set_style_text_color(Ui_Soc_Ten, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(Ui_Soc_Ten, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Ui_Soc_Ten, LV_OBJ_FLAG_SCROLLABLE);
Ui_Soc_Hundred = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(Ui_Soc_Hundred, info45.font, 0); /* 设置字体 */
lv_obj_set_pos(Ui_Soc_Hundred, 26, 100); /* 设置坐标 */
lv_obj_set_size(Ui_Soc_Hundred, 126, 50); /* 设置控件大小 */
lv_obj_set_style_text_color(Ui_Soc_Hundred, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(Ui_Soc_Hundred, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
Ui_Soc_Text = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(Ui_Soc_Text, info18.font, 0); /* 设置字体 */
lv_obj_set_pos(Ui_Soc_Text, 83, 293); /* 设置坐标 */
lv_obj_set_size(Ui_Soc_Text, 80, 24); /* 设置控件大小 */
lv_obj_set_style_text_color(Ui_Soc_Text, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(Ui_Soc_Text, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
Ui_Soc_TimeText = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(Ui_Soc_TimeText, info18.font, 0); /* 设置字体 */
lv_label_set_text(Ui_Soc_TimeText, "预计\n充电时间");
lv_obj_set_pos(Ui_Soc_TimeText, 14, 337); /* 设置坐标 */
lv_obj_set_size(Ui_Soc_TimeText, 72, 44); /* 设置控件大小 */
lv_obj_set_style_text_color(Ui_Soc_TimeText, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(Ui_Soc_TimeText, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
Ui_Soc_Time = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(Ui_Soc_Time, info18.font, 0); /* 设置字体 */
lv_obj_set_pos(Ui_Soc_Time, 108, 361); /* 设置坐标 */
lv_obj_set_size(Ui_Soc_Time, 150, 22); /* 设置控件大小 */
lv_obj_set_style_text_color(Ui_Soc_Time, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(Ui_Soc_Time, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
Ui_Soc_Symbol = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(Ui_Soc_Symbol, info45.font, 0); /* 设置字体 */
lv_obj_set_pos(Ui_Soc_Symbol, 114, 185);
// lv_label_set_text(Ui_Soc_Symbol, "%");
lv_obj_set_size(Ui_Soc_Symbol, 50, 50);
lv_obj_set_style_text_color(Ui_Soc_Symbol, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(Ui_Soc_Symbol, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Ui_Soc_Symbol, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_clear_flag(Ui_Soc_Symbol, LV_OBJ_FLAG_SCROLLABLE);
Ui_WeatherText = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(Ui_WeatherText, info18.font, 0); /* 设置字体 */
lv_obj_set_style_text_align(Ui_WeatherText, LV_TEXT_ALIGN_CENTER, 0); /* 设置文本水平居中 */
// lv_label_set_text(Ui_WeatherText, "预计\n充电时间");
lv_obj_set_pos(Ui_WeatherText, 0, 260); /* 设置坐标 */
lv_obj_set_size(Ui_WeatherText, 240, 44); /* 设置控件大小 */
lv_obj_set_style_text_color(Ui_WeatherText, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(Ui_WeatherText, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
Ui_WeatherIcon = lv_img_create(blackground_bg);
lv_img_set_src(Ui_WeatherIcon, "S:/spiffs/road_eco.jpg");
lv_obj_set_pos(Ui_WeatherIcon, 57, 84);
lv_obj_add_flag(Ui_WeatherIcon, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Ui_WeatherIcon, LV_OBJ_FLAG_SCROLLABLE);
Ui_WeatherRemind = lv_label_create(blackground_bg);
lv_obj_set_style_text_font(Ui_WeatherRemind, info18.font, 0); /* 设置字体 */
lv_obj_set_style_text_align(Ui_WeatherRemind, LV_TEXT_ALIGN_CENTER, 0); /* 设置文本水平居中 */
lv_label_set_text(Ui_WeatherRemind, "异常天气, 请注意安全");
lv_obj_set_pos(Ui_WeatherRemind, 30, 290); /* 设置坐标 */
lv_obj_set_size(Ui_WeatherRemind, 200, 44); /* 设置控件大小 */
lv_obj_set_style_text_color(Ui_WeatherRemind, lv_color_make(0xff, 0xff, 0xff), 0);
lv_obj_add_flag(Ui_WeatherRemind, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
Ui_Gear = lv_img_create(blackground_bg);
// lv_img_set_src(Ui_Gear, "S:/spiffs/dt.jpg");
// lv_obj_set_pos(Ui_Gear, 0, 0);
lv_obj_add_flag(Ui_Gear, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Ui_Gear, LV_OBJ_FLAG_SCROLLABLE);
Ui_FullAlarm = lv_img_create(blackground_bg);
lv_img_set_src(Ui_FullAlarm, "S:/spiffs/dt.jpg");
lv_obj_set_pos(Ui_FullAlarm, 0, 0);
lv_obj_add_flag(Ui_FullAlarm, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(Ui_FullAlarm, LV_OBJ_FLAG_SCROLLABLE);
ESP_LOGI(TAG, "Lvgl_Contrl_Init END.....");
}
void mmap_Init(void)
{
/* partitions.csv
* --------------------------------------------------------
* | Name | Type | SubType | Offset | Size | Flags |
* --------------------------------------------------------
* | assets | data | spiffs | | 6000K | |
* --------------------------------------------------------
*/
const mmap_assets_config_t config = {
.partition_label = "assets",
.max_files = TOTAL_MMAP_FILES,
.checksum = MMAP_CHECKSUM,
};
mmap_assets_new(&config, &asset_handle);
/* Index from the enum MMAP_FILES(generated by esp_mmap_assets)
* Used to reference specific files in the mmap table.
*/
// for (int i = 0; i < TOTAL_MMAP_FILES; i++) {
// const char* name = mmap_assets_get_name(asset_handle, i);
// const uint8_t* mem = mmap_assets_get_mem(asset_handle, i);
// int size = mmap_assets_get_size(asset_handle, i);
// int width = mmap_assets_get_width(asset_handle, i);
// int height = mmap_assets_get_height(asset_handle, i);
// ESP_LOGI(TAG, "Name:[%s], Memory:[%p], Size:[%d bytes], Width:[%d], Height:[%d]", name, mem, size, width, height);
// }
// mmap_assets_del(asset_handle);
}
int piccount = 0;
void app_Read_Spiffs(void)
{
struct dirent *p_dirent = NULL;
DIR *p_dir_stream = opendir("/spiffs");
/* Scan files in storage */
while (true)
{
p_dirent = readdir(p_dir_stream);
if (NULL != p_dirent)
{
// ESP_LOGI(TAG, "d_name:%s", p_dirent->d_name);
piccount++;
}
else
{
closedir(p_dir_stream);
break;
}
}
ESP_LOGI("test ", "count %d", piccount);
}
static lv_group_t *g_btn_op_group = NULL;
static void btn_event_cb(lv_event_t *event)
{
lv_obj_t *img = (lv_obj_t *)event->user_data;
const char *file_name = lv_list_get_btn_text(lv_obj_get_parent(event->target), event->target);
char *file_name_with_path = (char *)heap_caps_malloc(256, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
if (NULL != file_name_with_path)
{
/* Get full file name with mount point and folder path */
strcpy(file_name_with_path, "S:/spiffs/");
strcat(file_name_with_path, file_name);
ESP_LOGI(TAG, "test \n");
/* Set src of image with file name */
lv_img_set_src(img, "S:/spiffs/emoji_u1f60f.png");
/* Align object */
lv_obj_align(img, LV_ALIGN_CENTER, 80, 0);
/* Only for debug */
ESP_LOGI(TAG, "Display image file : %s", file_name_with_path);
/* Don't forget to free allocated memory */
free(file_name_with_path);
}
}
static void image_display(void)
{
lv_indev_t *indev = lv_indev_get_next(NULL);
if ((lv_indev_get_type(indev) == LV_INDEV_TYPE_KEYPAD) ||
lv_indev_get_type(indev) == LV_INDEV_TYPE_ENCODER)
{
ESP_LOGI(TAG, "Input device type is keypad");
g_btn_op_group = lv_group_create();
lv_indev_set_group(indev, g_btn_op_group);
}
lv_obj_t *list = lv_list_create(lv_scr_act());
lv_obj_set_size(list, 170, 220);
lv_obj_set_style_border_width(list, 0, LV_STATE_DEFAULT);
lv_obj_align(list, LV_ALIGN_LEFT_MID, -15, 0);
lv_obj_t *img = lv_img_create(lv_scr_act());
/* Set src of image with file name */
lv_img_set_src(img, "S:/spiffs/emoji_u1f60f.png");
/* Align object */
lv_obj_align(img, LV_ALIGN_CENTER, 0, 0);
/* Get file name in storage */
struct dirent *p_dirent = NULL;
DIR *p_dir_stream = opendir("/spiffs");
/* Scan files in storage */
// while (true) {
// p_dirent = readdir(p_dir_stream);
// if (NULL != p_dirent) {
// lv_obj_t *btn = lv_list_add_btn(list, LV_SYMBOL_IMAGE, p_dirent->d_name);
// lv_group_add_obj(g_btn_op_group, btn);
// lv_obj_add_event_cb(btn, btn_event_cb, LV_EVENT_CLICKED, (void *) img);
// } else {
// closedir(p_dir_stream);
// break;
// }
// }
}
void Gui_Display_Init(void)
{
// mmap_assert_Init();
bsp_spiffs_mount();
// app_Read_Spiffs();
// bsp_display_start();
bsp_display_cfg_t cfg = {
.lvgl_port_cfg = ESP_LVGL_PORT_INIT_CONFIG(),
.buffer_size = BSP_LCD_V_RES * BSP_LCD_H_RES,
.double_buffer = 1,
.flags = {
.buff_dma = 0,
.buff_spiram = 1,
}};
bsp_display_start_with_config(&cfg);
// image_display();
lv_esp_jpg_init();
mmap_Init();
if (lvgl_port_lock(-1))
{
create_example_freetype();
Lvgl_Contrl_Init();
LvglTimer = lv_timer_create(Lvgl_On_Timer, 50, NULL);
lvgl_port_unlock();
}
// if(mmap_assets_get_name(asset_handle,MMAP_NUM16_07_JPG) == PNG)
// {
// printf("PNG ! \n");
// }
// else if (mmap_assets_get_name(asset_handle,MMAP_NUM16_07_JPG) == TYPE_JPG)
// {
// printf("JPG ! \n");
// }
// else if (mmap_assets_get_name(asset_handle,MMAP_NUM16_07_JPG) == TYPE_TTF)
// {
// printf("TTF ! \n");
// }
printf_stack();
ESP_LOGE(TAG, "Init Kl30");
}
// 将数据转换为十六进制字符串并过滤掉无效值
char *ConvertToHexString(uint8_t *data, int length)
{
static char hexString[BTMUSICBUFFMAX + 1]; // 每个字节转换为一个字符
int index = 0;
for (int i = 0; i < length; i++)
{
if (data[i] != 0xFF)
{
hexString[index] = data[i]; // 将有效字节直接复制到字符串中
index++;
}
}
hexString[index] = '\0'; // 添加字符串结尾
return hexString;
}
void Gui_BT_Music_Display(bool show_hide)
{
if (show_hide)
{
if (Get_Bt_Music_Status() == status_max)
{
lv_img_set_src(Music_Left, "S:/spiffs/music_p_07.jpg");
lv_img_set_src(Music_Right, "S:/spiffs/music_p_08.jpg");
lv_img_set_src(Music_Start, "S:/spiffs/music_p_09.jpg");
set_widget_show_or_hide(Music_Left, 1);
set_widget_show_or_hide(Music_Right, 1);
set_widget_show_or_hide(Music_Start, 1);
set_widget_show_or_hide(Music_InValid, 1);
set_widget_show_or_hide(Music_Icon_B, 1);
set_widget_show_or_hide(Music_Icon_S, 1);
}
else
{
lv_img_set_src(Music_Left, "S:/spiffs/music_p_04.jpg");
lv_img_set_src(Music_Right, "S:/spiffs/music_p_05.jpg");
lv_img_set_src(Music_Start, "S:/spiffs/music_p_06.jpg");
set_widget_show_or_hide(Music_Icon_B, 1);
set_widget_show_or_hide(Music_Icon_S, 1);
set_widget_show_or_hide(Music_Left, 1);
set_widget_show_or_hide(Music_Right, 1);
set_widget_show_or_hide(Music_Start, 1);
uint8_t *Text = Get_BT_Music_Lyrics();
char *Lyric = ConvertToHexString(Text, BTMUSICBUFFMAX);
lv_label_set_text(Music_Text, Lyric);
set_widget_show_or_hide(Music_Text, 1);
uint8_t *Temp = Get_BT_Music_Actor();
char *composer = ConvertToHexString(Temp, BTMUSICBUFFMAX);
lv_label_set_text(Music_Composer, Lyric);
set_widget_show_or_hide(Music_Composer, 1);
set_widget_show_or_hide(Music_InValid, 0);
}
}
else
{
set_widget_show_or_hide(Music_Icon_B, 0);
set_widget_show_or_hide(Music_Icon_S, 0);
set_widget_show_or_hide(Music_Left, 0);
set_widget_show_or_hide(Music_Right, 0);
set_widget_show_or_hide(Music_Start, 0);
set_widget_show_or_hide(Music_Composer, 0);
set_widget_show_or_hide(Music_Text, 0);
set_widget_show_or_hide(Music_InValid, 0);
}
}
char *seconds_to_mmss(int total_seconds)
{
static char buffer[6];
int minutes = total_seconds / 60;
int seconds = total_seconds % 60;
// Format the time as mm:ss
snprintf(buffer, sizeof(buffer), "%01d:%02d", minutes, seconds);
return buffer;
}
void Gui_BT_Phone_Display(bool show_hide)
{
// 获取电话号码数据
uint8_t *phoneNum = Get_Bt_Phone_Num();
// 转换为十六进制字符串并过滤掉无效值
char *hexString = ConvertToHexString(phoneNum, BTIPHONENUMBERMAX);
if (show_hide)
{
switch (Get_Bt_Phone_Status())
{
case Call_Incoming:
lv_label_set_text(Iphone_Status, "来电");
lv_obj_set_pos(Iphone_Status, 102, 210);
set_widget_show_or_hide(Iphone_Status, 1);
lv_label_set_text(Iphone_Num, hexString);
set_widget_show_or_hide(Iphone_Num, 1);
set_widget_show_or_hide(Iphone_Reminder, 1);
set_widget_show_or_hide(Iphone_Icon, 1);
break;
case Call_In_Progress:
lv_label_set_text(Iphone_Status, "通话中");
set_widget_show_or_hide(Iphone_Status, 1);
lv_obj_set_pos(Iphone_Status, 93, 210);
lv_label_set_text(Iphone_Num, hexString);
lv_label_set_text(Iphone_Timer, seconds_to_mmss(Get_Iphone_Timer()));
set_widget_show_or_hide(Iphone_Num, 1);
set_widget_show_or_hide(Iphone_Icon, 1);
set_widget_show_or_hide(Iphone_Timer, 1);
set_widget_show_or_hide(Iphone_Reminder, 0);
break;
default:
set_widget_show_or_hide(Iphone_Num, 0);
set_widget_show_or_hide(Iphone_Icon, 0);
set_widget_show_or_hide(Iphone_Status, 0);
set_widget_show_or_hide(Iphone_Reminder, 0);
set_widget_show_or_hide(Iphone_Timer, 0);
break;
}
}
else
{
set_widget_show_or_hide(Iphone_Num, 0);
set_widget_show_or_hide(Iphone_Icon, 0);
set_widget_show_or_hide(Iphone_Status, 0);
set_widget_show_or_hide(Iphone_Reminder, 0);
set_widget_show_or_hide(Iphone_Timer, 0);
}
}
void Gui_Alarm_Display(int index)
{
set_widget_show_or_hide(Alarm_BG, 1);
set_widget_show_or_hide(AralmIcon, 1);
set_widget_show_or_hide(AralmText, 1);
// lv_label_set_text(AralmText, Alarm_Dis[index].Text);
// Set_Image_Decode(AralmIcon, &AralmIcon_Hdl, Alarm_Dis[index].Index);
}
void Gui_Main_Display(uint16_t Power)
{
uint16_t test = 123;
uint8_t Power_Num_digits = calculate_digits(Power);
uint8_t Power_Num_digits_array[3] = {0, 0, 0};
take_out_number(Power_Num_digits_array, Power, Power_Num_digits);
set_widget_show_or_hide(Power_Bg, 1);
set_widget_show_or_hide(Main_Road, 1);
set_widget_show_or_hide(Build, 1);
if (Power == 39)
{
set_widget_show_or_hide(Ui_FullAlarm, 1);
}
else
{
set_widget_show_or_hide(Ui_FullAlarm, 0);
}
if (Power <= 10)
{
set_widget_show_or_hide(Ui_Gear, 1);
lv_img_set_src(Ui_Gear, "S:/spiffs/gear_01.png");
lv_obj_set_pos(Ui_Gear, 63, 83);
}
else if (Power <= 20)
{
lv_obj_set_pos(Ui_Gear, 74, 83);
set_widget_show_or_hide(Ui_Gear, 1);
lv_img_set_src(Ui_Gear, "S:/spiffs/gear_02.png");
}
// switch (Power_Num_digits)
// {
// case 1:
// case 2:
// lv_label_set_text(Power_NumOne, Common_number[Power_Num_digits_array[0]]);
// lv_obj_set_pos(Power_NumOne, 126, 167);
// set_widget_show_or_hide(Power_NumOne, 1);
// lv_label_set_text(Power_NumDot, Common_number[10]);
// lv_obj_set_pos(Power_NumDot, 116, 194);
// set_widget_show_or_hide(Power_NumDot, 1);
// lv_label_set_text(Power_NumTen, Common_number[Power_Num_digits_array[1]]);
// lv_obj_set_pos(Power_NumTen, 85, 167);
// set_widget_show_or_hide(Power_NumTen, 1);
// set_widget_show_or_hide(Ui_NatInfoHundredsPlace, 0);
// break;
// case 3:
// lv_label_set_text(Power_NumOne, Common_number[Power_Num_digits_array[0]]);
// lv_obj_set_pos(Power_NumOne, 141, 167);
// set_widget_show_or_hide(Power_NumOne, 1);
// lv_label_set_text(Power_NumDot, Common_number[10]);
// lv_obj_set_pos(Power_NumDot, 131, 194);
// set_widget_show_or_hide(Power_NumDot, 1);
// lv_label_set_text(Power_NumTen, Common_number[Power_Num_digits_array[1]]);
// lv_obj_set_pos(Power_NumTen, 99, 167);
// set_widget_show_or_hide(Power_NumTen, 1);
// lv_label_set_text(Ui_NatInfoHundredsPlace, Common_number[Power_Num_digits_array[2]]);
// lv_obj_set_pos(Ui_NatInfoHundredsPlace, 70, 167);
// set_widget_show_or_hide(Ui_NatInfoHundredsPlace, 1);
// default:
// break;
// }
// lv_img_set_src(Power_Bg, PowerImage[Power / 10]);
}
int temp = 20;
void Gui_Top_Display(uint8_t index)
{
if (index <= 34)
{
lv_img_set_src(Temp, TopWeather[index]);
set_widget_show_or_hide(Temp, 1);
}
else
{
set_widget_show_or_hide(Temp, 0);
}
set_widget_show_or_hide(Tbox, 1);
set_widget_show_or_hide(Gps, 1);
set_widget_show_or_hide(Iphone, 1);
if (temp < 40)
{
temp--;
}
if (temp == -30)
{
temp = 39;
}
char buffer[20];
sprintf(buffer, "%d", temp);
lv_label_set_text(TempNum, buffer);
set_widget_show_or_hide(TempNum, 1);
}
void hex_to_string(unsigned char *hex_data, size_t len, char *out_str)
{
static const char *const lut = "0123456789abcdef";
for (size_t i = 0; i < len; ++i)
{
unsigned char c = hex_data[i];
*out_str++ = lut[c >> 4];
*out_str++ = lut[c & 15];
}
*out_str = '\0'; // Null terminate the string
}
int testconut = 0;
uint32_t Get_Nav_Icon_Image_Indx(void)
{
uint32_t Icon = 0X112233;
if (Get_Nav_Turn_Data() != 0x88)
{
switch (Get_Nav_Turn_Data())
{
case 0:
Icon = 2;
break;
case 1:
Icon = 3;
break;
case 2:
Icon = 9;
break;
case 3:
Icon = 4;
break;
case 4:
Icon = 5;
break;
case 5:
Icon = 6;
break;
case 6:
Icon = 7;
break;
case 7:
Icon = 8;
break;
case 8:
Icon = 61;
break;
case 9:
Icon = 60;
break;
case 0XA:
Icon = 51;
break;
case 0xB:
Icon = 52;
break;
default:
Icon = 2;
break;
}
}
else if (Get_Nav_Circumferential_Data() != 0x88)
{
switch (Get_Nav_Circumferential_Data())
{
case 0:
Icon = 11;
break;
case 1:
Icon = 12;
break;
case 2:
Icon = 54;
break;
case 3:
Icon = 55;
break;
case 4:
Icon = 56;
break;
case 5:
Icon = 57;
break;
case 6:
Icon = 58;
break;
case 7:
Icon = 59;
break;
case 8:
Icon = 62;
break;
case 9:
Icon = 63;
break;
case 0XA:
Icon = 64;
break;
case 0xB:
Icon = 65;
break;
default:
Icon = 11;
break;
}
}
else if (Get_Nav_Path_Region_Data() != 0X88)
{
switch (Get_Nav_Path_Region_Data())
{
case 0:
Icon = 17;
break;
case 1:
Icon = 18;
break;
case 2:
Icon = 19;
break;
case 3:
Icon = 20;
break;
case 4:
Icon = 21;
break;
case 5:
Icon = 2;
break;
case 6:
Icon = 23;
break;
case 7:
Icon = 24;
break;
case 8:
Icon = 30;
break;
case 9:
Icon = 31;
break;
case 0XA:
Icon = 66;
break;
case 0xB:
Icon = 67;
break;
case 0xC:
Icon = 68;
break;
case 0xD:
Icon = 69;
break;
case 0xE:
Icon = 25;
break;
case 0xF:
Icon = 26;
break;
case 0x10:
Icon = 27;
break;
case 0x11:
Icon = 72;
break;
case 0x12:
Icon = 73;
break;
case 0x13:
Icon = 74;
break;
case 0x14:
Icon = 75;
break;
case 0x15:
Icon = 76;
break;
case 0x16:
Icon = 53;
break;
case 0x17:
Icon = 16;
break;
case 0x18:
Icon = 13;
break;
case 0x19:
Icon = 14;
break;
case 0x1a:
Icon = 10;
break;
case 0x1b:
Icon = 15;
break;
case 0x1c:
Icon = 28;
break;
case 0x1d:
Icon = 29;
break;
case 0x1e:
Icon = 70;
break;
case 0x1f:
Icon = 71;
break;
default:
Icon = 17;
break;
}
}
return Icon;
}
void Gui_Navigation_Display(bool show_hide)
{
uint16_t DistanceInto = Get_Nav_Turn_Distance();
uint8_t DistanceInto_Num_digits = calculate_digits(DistanceInto);
uint8_t DistanceInto_Num_digits_array[3] = {0, 0, 0};
take_out_number(DistanceInto_Num_digits_array, DistanceInto, DistanceInto_Num_digits);
uint8_t Hour = Get_Nav_Time_Hour();
uint8_t Minute = Get_Nav_Time_Minute();
uint16_t Distance = Get_Nav_Remain_Distance();
uint8_t *Navdata = Get_Nav_name_Data();
if (show_hide)
{
if ((Hour != 0x88) || (Minute != 0x88))
{
char TimeData[25];
sprintf(TimeData, "%01d小时%02d分钟", Hour, Minute);
lv_label_set_text(NavTimeText, TimeData);
set_widget_show_or_hide(NavTimeText, 1);
}
else
{
set_widget_show_or_hide(NavTimeText, 0);
}
if (Distance != 0X1234)
{
char DistanceData[20];
sprintf(DistanceData, "%01dKm", Distance);
lv_label_set_text(NavDistance, DistanceData);
set_widget_show_or_hide(NavDistance, 1);
}
else
{
set_widget_show_or_hide(NavDistance, 0);
}
if (Navdata != NULL)
{
Gui_Set_Utf_8_Text_Disp(NavText, Navdata, 1);
}
else
{
Gui_Set_Utf_8_Text_Disp(NavText, Navdata, 0);
}
// if(index == 1)
// {
if (Get_TelltalesLedSts(LED_TPower))
{
lv_obj_set_pos(PowerIcon, 19, 348);
lv_img_set_src(PowerIcon, "S:/spiffs/tpwr_p_01.jpg");
set_widget_show_or_hide(PowerIcon, 1);
if (testconut != 0)
{
char Pwr[50];
sprintf(Pwr, "S:/spiffs/pw_t_%02d.jpg", testconut % 10);
lv_obj_set_pos(PowerSeg, 64, 353);
lv_img_set_src(PowerSeg, Pwr);
set_widget_show_or_hide(PowerSeg, 1);
set_widget_show_or_hide(PowerBackGround, 0);
}
else
{
set_widget_show_or_hide(PowerBackGround, 1);
set_widget_show_or_hide(PowerSeg, 0);
}
}
else
{
set_widget_show_or_hide(PowerBackLine, 1);
set_widget_show_or_hide(PowerBackGround, 1);
if (Get_Power_Percent() != 0)
{
char Pwr[50];
sprintf(Pwr, "S:/spiffs/pw_n_%03d.jpg", Get_Power_Percent());
lv_obj_set_pos(PowerSeg, 108, 348);
lv_img_set_src(PowerSeg, Pwr);
set_widget_show_or_hide(PowerSeg, 1);
}
else
{
set_widget_show_or_hide(PowerSeg, 0);
}
}
// }
// else if (index == 2)
// {
// lv_obj_set_pos(PowerIcon, 17, 347);
// lv_img_set_src(PowerIcon, "S:/spiffs/icon_02.jpg");
// set_widget_show_or_hide(PowerIcon, 1);
// }
// else
// {
// lv_obj_set_pos(PowerIcon, 19, 348);
// lv_img_set_src(PowerIcon, "S:/spiffs/tpwr_p_01.jpg");
// set_widget_show_or_hide(PowerIcon, 1);
// }
// esp_log_buffer_hex("test", DistanceInto_Num_digits_array, sizeof(DistanceInto_Num_digits_array));
if (DistanceInto != 0X1234)
{
switch (DistanceInto_Num_digits)
{
case 1:
lv_label_set_text(Ui_NatInfoOne, Common_number[DistanceInto_Num_digits_array[0]]);
lv_obj_set_pos(Ui_NatInfoOne, 100, 196);
set_widget_show_or_hide(Ui_NatInfoOne, 1);
set_widget_show_or_hide(Ui_NatInfoTen, 0);
set_widget_show_or_hide(Ui_NatInfoHundredsPlace, 0);
lv_obj_set_pos(Ui_NatInfoUnit, 131, 236);
set_widget_show_or_hide(Ui_NatInfoUnit, 1);
break;
case 2:
lv_label_set_text(Ui_NatInfoOne, Common_number[DistanceInto_Num_digits_array[0]]);
set_widget_show_or_hide(Ui_NatInfoOne, 1);
lv_obj_set_pos(Ui_NatInfoOne, 115, 196);
lv_label_set_text(Ui_NatInfoTen, Common_number[DistanceInto_Num_digits_array[1]]);
set_widget_show_or_hide(Ui_NatInfoTen, 1);
lv_obj_set_pos(Ui_NatInfoTen, 86, 196);
set_widget_show_or_hide(Ui_NatInfoHundredsPlace, 0);
lv_obj_set_pos(Ui_NatInfoUnit, 146, 236);
set_widget_show_or_hide(Ui_NatInfoUnit, 1);
break;
case 3:
lv_label_set_text(Ui_NatInfoOne, Common_number[DistanceInto_Num_digits_array[0]]);
set_widget_show_or_hide(Ui_NatInfoOne, 1);
lv_obj_set_pos(Ui_NatInfoOne, 129, 196);
lv_label_set_text(Ui_NatInfoTen, Common_number[DistanceInto_Num_digits_array[1]]);
set_widget_show_or_hide(Ui_NatInfoTen, 1);
lv_obj_set_pos(Ui_NatInfoTen, 100, 196);
lv_label_set_text(Ui_NatInfoHundredsPlace, Common_number[DistanceInto_Num_digits_array[2]]);
set_widget_show_or_hide(Ui_NatInfoHundredsPlace, 1);
lv_obj_set_pos(Ui_NatInfoHundredsPlace, 71, 196);
lv_obj_set_pos(Ui_NatInfoUnit, 160, 236);
set_widget_show_or_hide(Ui_NatInfoUnit, 1);
break;
default:
break;
}
}
else
{
set_widget_show_or_hide(Ui_NatInfoOne, 0);
set_widget_show_or_hide(Ui_NatInfoTen, 0);
set_widget_show_or_hide(Ui_NatInfoHundredsPlace, 0);
set_widget_show_or_hide(Ui_NatInfoUnit, 0);
}
if (Get_Nav_Icon_Image_Indx() != 0X112233)
{
char NavIcon[25];
sprintf(NavIcon, "S:/spiffs/navi_%02d.jpg", Get_Nav_Icon_Image_Indx());
lv_img_set_src(Nav_Icon, NavIcon);
set_widget_show_or_hide(Nav_Icon, 1);
}
else
{
set_widget_show_or_hide(Nav_Icon, 0);
}
}
else
{
set_widget_show_or_hide(Ui_NatInfoOne, 0);
set_widget_show_or_hide(Ui_NatInfoTen, 0);
set_widget_show_or_hide(Ui_NatInfoHundredsPlace, 0);
set_widget_show_or_hide(Ui_NatInfoUnit, 0);
set_widget_show_or_hide(Nav_Icon, 0);
set_widget_show_or_hide(PowerSeg, 0);
set_widget_show_or_hide(PowerBackLine, 0);
set_widget_show_or_hide(PowerBackGround, 0);
set_widget_show_or_hide(NavTimeText, 0);
set_widget_show_or_hide(NavDistance, 0);
Gui_Set_Utf_8_Text_Disp(NavText, NULL, 0);
}
}
lv_obj_t *img1;
// int indexanim = MMAP_TO_001_JPG;
int count = 0;
int alarmtest = 10;
void create_powerOn_Screen(uint32_t index)
{
uint32_t timestamp = esp_log_timestamp();
uint32_t tm_wait = 0;
// ESP_LOGW(TAG, "timestamp:%d", timestamp);
bsp_display_lock(0);
// ESP_LOGE(TAG, "i: %s", mmap_assets_get_name(asset_handle, index));
PowerOnAnim_Hdl.header.w = mmap_assets_get_width(asset_handle, index);
PowerOnAnim_Hdl.header.h = mmap_assets_get_height(asset_handle, index);
PowerOnAnim_Hdl.header.always_zero = 0;
PowerOnAnim_Hdl.data_size = mmap_assets_get_size(asset_handle, index);
PowerOnAnim_Hdl.data = mmap_assets_get_mem(asset_handle, index);
if (strstr(mmap_assets_get_name(asset_handle, index), ".png"))
{
PowerOnAnim_Hdl.header.cf = LV_IMG_CF_RAW_ALPHA;
}
else
{
PowerOnAnim_Hdl.header.cf = LV_IMG_CF_RAW;
}
lv_img_set_src(PowerOnAnim, &PowerOnAnim_Hdl);
// timestamp = esp_log_timestamp();
lv_refr_now(NULL);
bsp_display_unlock();
ESP_LOGW(TAG, "tm_wait:%d", esp_log_timestamp() - timestamp);
// if (tm_wait < 30)
// {
// ESP_LOGW(TAG, "wait:%d, timestamp:%d", tm_wait, timestamp);
// // vTaskDelay(pdMS_TO_TICKS((30 - tm_wait)));
// }
}
void Gui_Down_Disp(uint32_t index, bool show_hide)
{
if (show_hide)
{
lv_label_set_text(DownText, Down_Text[index].Text);
// lv_label_set_text(DownText, "短按查看长按关闭");
lv_obj_set_pos(DownText, Down_Text[index].StartX, Down_Text[index].StartY);
set_widget_show_or_hide(DownText, 1);
set_widget_show_or_hide(DownIcon, 1);
}
else
{
set_widget_show_or_hide(DownIcon, 0);
set_widget_show_or_hide(DownText, 0);
}
}
void Gui_Charge_Disp(uint8_t Soc)
{
set_widget_show_or_hide(Ui_Soc_BackGround, 1);
set_widget_show_or_hide(Ui_Soc_Road, 1);
uint8_t Soc_Num_digits = calculate_digits(Soc);
uint8_t Soc_Num_digits_array[3] = {0, 0, 0};
take_out_number(Soc_Num_digits_array, Soc, Soc_Num_digits);
lv_label_set_text(Ui_Soc_Text, "充电中...");
set_widget_show_or_hide(Ui_Soc_Text, 1);
set_widget_show_or_hide(Ui_Soc_TimeText, 1);
char Data[11];
sprintf(Data, "%02d小时%02d分钟", 3, 12);
lv_label_set_text(Ui_Soc_Time, Data);
set_widget_show_or_hide(Ui_Soc_Time, 1);
switch (Soc_Num_digits)
{
uint8_t Symbol[1] = {37};
set_widget_show_or_hide(Ui_Soc_Symbol, 1);
lv_label_set_text(Ui_Soc_Symbol, Symbol);
case 1:
lv_label_set_text(Ui_Soc_One, Common_number[Soc_Num_digits_array[0]]);
lv_obj_set_pos(Ui_Soc_One, 106, 140);
set_widget_show_or_hide(Ui_Soc_One, 1);
set_widget_show_or_hide(Ui_Soc_Ten, 0);
set_widget_show_or_hide(Ui_Soc_Hundred, 0);
break;
case 2:
lv_label_set_text(Ui_Soc_One, Common_number[Soc_Num_digits_array[0]]);
lv_obj_set_pos(Ui_Soc_One, 121, 140);
set_widget_show_or_hide(Ui_Soc_One, 1);
lv_label_set_text(Ui_Soc_Ten, Common_number[Soc_Num_digits_array[1]]);
lv_obj_set_pos(Ui_Soc_Ten, 91, 140);
set_widget_show_or_hide(Ui_Soc_Ten, 1);
set_widget_show_or_hide(Ui_Soc_Hundred, 0);
break;
case 3:
lv_label_set_text(Ui_Soc_One, Common_number[Soc_Num_digits_array[0]]);
lv_obj_set_pos(Ui_Soc_One, 135, 140);
set_widget_show_or_hide(Ui_Soc_One, 1);
lv_label_set_text(Ui_Soc_Ten, Common_number[Soc_Num_digits_array[1]]);
lv_obj_set_pos(Ui_Soc_Ten, 106, 140);
set_widget_show_or_hide(Ui_Soc_Ten, 1);
lv_label_set_text(Ui_Soc_Hundred, Common_number[Soc_Num_digits_array[2]]);
lv_obj_set_pos(Ui_Soc_Hundred, 76, 140);
set_widget_show_or_hide(Ui_Soc_Hundred, 1);
break;
default:
break;
}
if (Soc <= 10)
{
set_widget_show_or_hide(Ui_Soc_Round, 1);
lv_arc_set_value(Ui_Soc_Round, Soc);
lv_obj_set_style_arc_color(Ui_Soc_Round, lv_color_make(0xff, 0x00, 0x10), LV_PART_INDICATOR);
lv_obj_set_style_arc_color(Ui_Soc_Round, lv_color_make(0xff, 0x00, 0x10), LV_PART_MAIN);
lv_img_set_src(Ui_Soc_Icon, "S:/spiffs/icon_05.jpg");
set_widget_show_or_hide(Ui_Soc_Icon, 1);
}
else if (Soc <= 20)
{
set_widget_show_or_hide(Ui_Soc_Round, 1);
lv_arc_set_value(Ui_Soc_Round, Soc);
lv_obj_set_style_arc_color(Ui_Soc_Round, lv_color_make(0xff, 0xE7, 0x00), LV_PART_INDICATOR);
lv_obj_set_style_arc_color(Ui_Soc_Round, lv_color_make(0xff, 0xE7, 0x00), LV_PART_MAIN);
lv_img_set_src(Ui_Soc_Icon, "S:/spiffs/icon_04.jpg");
set_widget_show_or_hide(Ui_Soc_Icon, 1);
}
else
{
lv_img_set_src(Ui_Soc_Icon, "S:/spiffs/icon_03.jpg");
set_widget_show_or_hide(Ui_Soc_Icon, 1);
set_widget_show_or_hide(Ui_Soc_Round, 1);
lv_arc_set_value(Ui_Soc_Round, Soc);
lv_obj_set_style_arc_color(Ui_Soc_Round, lv_color_make(0x10, 0xEF, 0xA5), LV_PART_INDICATOR);
lv_obj_set_style_arc_color(Ui_Soc_Round, lv_color_make(0x10, 0xEF, 0xA5), LV_PART_MAIN);
}
}
int gsdtest = 0;
int gsdtest1 = 0;
void Gui_Weather_Disp(bool show_hide)
{
if (gsdtest < 4)
{
gsdtest++;
}
else
{
gsdtest = 0;
}
if (gsdtest1 < 20)
{
gsdtest1++;
}
else
{
gsdtest1 = 0;
}
switch (gsdtest)
{
case Level_White:
lv_obj_set_style_text_color(Ui_WeatherText, lv_color_make(0xff, 0xff, 0xff), 0);
break;
case Level_Blue:
lv_obj_set_style_text_color(Ui_WeatherText, lv_color_make(0x35, 0x5F, 0xff), 0);
break;
case Level_Yellow:
lv_obj_set_style_text_color(Ui_WeatherText, lv_color_make(0xff, 0xfD, 0x54), 0);
break;
case Level_Orange:
lv_obj_set_style_text_color(Ui_WeatherText, lv_color_make(0xf4, 0x99, 0x02), 0);
break;
case Level_Red:
lv_obj_set_style_text_color(Ui_WeatherText, lv_color_make(0xdc, 0x2e, 0x29), 0);
break;
default:
lv_obj_set_style_text_color(Ui_WeatherText, lv_color_make(0xff, 0xff, 0xff), 0);
break;
}
Gui_Set_Char_Text_Disp(Ui_WeatherText, WeatherText[gsdtest1][gsdtest], 1);
lv_img_set_src(Ui_WeatherIcon, WeatherIcon[gsdtest1][gsdtest]);
set_widget_show_or_hide(Ui_WeatherIcon, 1);
set_widget_show_or_hide(Ui_WeatherRemind, 1);
}
void Lvgl_On_Timer(lv_timer_t *timer)
{
// ESP_LOGW("GUI", "TIMER %d", esp_log_timestamp());
// if(count < 5)
// {
// count++;
// }
// else
// {
// count = 0;
// }
// switch (count)
// {
// case 1:
// lv_img_set_src(img, "S:/spiffs/navi_01.jpg");
// break;
// case 2:
// lv_img_set_src(img, "S:/spiffs/navi_02.jpg");
// break;
// case 3:
// lv_img_set_src(img, "S:/spiffs/navi_03.jpg");
// break;
// case 4:
// lv_img_set_src(img, "S:/spiffs/navi_04.jpg");
// break;
// case 5:
// lv_img_set_src(img, "S:/spiffs/navi_05.jpg");
// break;
// default:
// break;
// }
// // lv_img_set_src(imgtest, "S:/spiffs/emoji_u1f914.png");
// if (Get_Bt_Phone_Status() != Call_idel)
// {
// Gui_BT_Phone_Display(true);
// Gui_Down_Disp(1, true);
// Gui_BT_Music_Display(false);
// }
// else
// {
// Gui_Down_Disp(2, true);
// Gui_BT_Music_Display(true);
// Gui_BT_Phone_Display(false);
// }
// // if(indexanim <] MMAP_TO_061_JPG)
// // {
// // indexanim++;
// // }
// // else
// // {
// // indexanim = MMAP_TO_001_JPG;
// // }
// // Set_Image_Decode(anim, &animhdl,indexanim);
// // set_widget_show_or_hide(anim,1);
// create_powerOn_Screen(alarmtest);
// // set_widget_show_or_hide(img2, 1);
// // img1 = lv_img_create(lv_scr_act());
// // lv_img_set_src(img1, "/spiffs/music_p_02.jpg");
// // lv_obj_align(img1, LV_ALIGN_CENTER, 0, 0);
// printf_stack();
// static char buffer[128];
// sprintf(buffer, " Biggest / Free / Min/ Total\n"
// "\t SRAM : [%8d / %8d / %8d / %8d]",
// heap_caps_get_largest_free_block(MALLOC_CAP_INTERNAL),
// heap_caps_get_free_size(MALLOC_CAP_INTERNAL),
// heap_caps_get_minimum_free_size(MALLOC_CAP_INTERNAL),
// heap_caps_get_total_size(MALLOC_CAP_INTERNAL));
// ESP_LOGI("MEM", "%s", buffer);
// Gui_Alarm_Display(alarmtest / 20);
// // Create_set_image(1, &anim, &animhdl, indexanim, 0, 0, 0);
// // printf("test on timer\n");
// Gui_Charge_Disp(alarmtest);s
// Gui_Weather_Disp(1);
// Gui_Main_Display(alarmtest);
if (Get_Bt_Phone_Status() != Call_idel)
{
Gui_BT_Phone_Display(true);
Gui_Down_Disp(1, true);
Gui_Navigation_Display(false);
Gui_BT_Music_Display(false);
}
else
{
if (Get_Current_Item() == MENU_ITEM_NAV)
{
Gui_BT_Music_Display(true);
Gui_Down_Disp(2, false);
Gui_Navigation_Display(true);
}
// else if (Get_Current_Item() == MENU_ITEM_CHARGE)
// {
// Gui_Charge_Disp(alarmtest);
// }
else
{
Gui_Navigation_Display(false);
Gui_Down_Disp(2, true);
Gui_BT_Music_Display(true);
}
Gui_BT_Phone_Display(false);
}
// Gui_Down_Disp(1, true);
// Gui_BT_Phone_Display(true);
// Gui_Down_Disp(2, true);
// Gui_BT_Music_Display(false);
// Gui_Top_Display(alarmtest);
}
#ifndef _GUI_DISPLAY_H_
#define _GUI_DISPLAY_H_
extern void Gui_Display_Init(void);
extern void Lvgl_Contrl_Init(void);
#endif
#ifndef _GUI_DISPLAY_PRIV_H_
#define _GUI_DISPLAY_PRIV_H_
#include "lvgl.h"
#define SHOW 1
#define HIDE 0
#include "app_dataProcess.h"
typedef struct
{
char *text; /* 显示字符串 */
int StartX; /* 起始X坐标 */
int StartY; /* 起始Y坐标 */
} _St_Size18_Text;
// typedef struct
// {
// char *Text;
// int Index;
// int StartX;
// int StartY;
// } _Alarm_Dis;
// const _Alarm_Dis Alarm_Dis[8] =
// {
// {
// "倒车中\n松开按键退出",
// MMAP_POP_P_01_JPG,
// 29,
// 30,
// },
// {
// "助力推行\n0速可换挡",
// MMAP_POP_P_02_JPG,
// 29,
// 30,
// },
// {
// "ABS工作中\n注意安全",
// MMAP_POP_P_03_JPG,
// 29,
// 30,
// },
// {
// "TCS工作中\n注意安全",
// MMAP_POP_P_04_JPG,
// 29,
// 30,
// },
// {
// "边撑未收起",
// MMAP_POP_P_05_JPG,
// 29,
// 30,
// },
// {
// "捏下刹车\n接触P档",
// MMAP_POP_P_06_JPG,
// 29,
// 30,
// },
// {
// "跛行模式中\n请注意安全",
// MMAP_POP_P_07_JPG,
// 29,
// 30,
// },
// {
// "充电中\n不可骑行",
// MMAP_POP_P_08_JPG,
// 29,
// 30,
// },
// };
static const *Common_number[] =
{
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
".",
"-",
};
lv_obj_t *PowerOnAnim;
lv_img_dsc_t PowerOnAnim_Hdl;
lv_obj_t *blackground_bg;
lv_obj_t *AralmText;
lv_obj_t *AralmIcon;
lv_obj_t *Alarm_BG;
lv_obj_t *Music_Icon_B;
lv_obj_t *Music_Icon_S;
lv_obj_t *Music_Left;
lv_obj_t *Music_Right;
lv_obj_t *Music_Start;
lv_obj_t *Music_BG;
lv_obj_t *Music_Text;
lv_obj_t *Music_Composer;
lv_obj_t *Music_InValid;
lv_obj_t *Iphone_Icon;
lv_obj_t *Iphone_Status;
lv_obj_t *Iphone_Reminder;
lv_obj_t *Iphone_Num;
lv_obj_t *Iphone_Timer;
lv_obj_t *anim;
lv_obj_t *Nav_Icon;
lv_obj_t *Ui_NatInfoOne;
lv_obj_t *Ui_NatInfoTen;
lv_obj_t *Ui_NatInfoHundredsPlace;
lv_obj_t *Ui_NatInfoUnit;
lv_obj_t *NavText;
lv_obj_t *NavTimeText;
lv_obj_t *NavDistance;
lv_obj_t *DownText;
lv_obj_t *DownIcon;
lv_obj_t *PowerIcon;
lv_obj_t *PowerSeg;
lv_obj_t *PowerBackGround;
lv_obj_t *PowerBackLine;
lv_obj_t *Ui_Soc_Round;
lv_obj_t *Ui_Soc_BackGround;
lv_obj_t *Ui_Soc_Road;
lv_obj_t *Ui_Soc_One;
lv_obj_t *Ui_Soc_Ten;
lv_obj_t *Ui_Soc_Hundred;
lv_obj_t *Ui_Soc_Icon;
lv_obj_t *Ui_Soc_Symbol;
lv_obj_t *Ui_Soc_Text;
lv_obj_t *Ui_Soc_TimeText;
lv_obj_t *Ui_Soc_Time;
lv_obj_t *Ui_WeatherText;
lv_obj_t *Ui_WeatherRemind;
lv_obj_t *Ui_WeatherIcon;
lv_obj_t *Ui_FullAlarm;
lv_obj_t *Ui_Gear;
lv_obj_t *img2;
lv_obj_t *Power_Bg;
lv_obj_t *Main_Road;
lv_obj_t *Power_NumOne;
lv_obj_t *Power_NumTen;
lv_obj_t *Power_NumDot;
lv_obj_t *Power_NumHundred;
lv_obj_t *Build;
lv_obj_t *Tbox;
lv_obj_t *Gps;
lv_obj_t *Iphone;
lv_obj_t *Temp;
lv_obj_t *TempNum;
lv_img_dsc_t animhdl;
lv_img_dsc_t Music_Icon_B_Hdl;
lv_img_dsc_t Music_Icon_S_Hdl;
lv_img_dsc_t Music_Left_Hdl;
lv_img_dsc_t Music_Right_Hdl;
lv_img_dsc_t Music_Start_Hdl;
lv_img_dsc_t Music_BG_Hdl;
lv_img_dsc_t Iphone_Icon_Hdl;
lv_img_dsc_t Iphone_Status_Hdl;
lv_img_dsc_t Alarm_BG_Hdl;
lv_img_dsc_t AralmIcon_Hdl;
lv_img_dsc_t Power_Bg_Hdl;
lv_img_dsc_t Main_Road_Hdl;
lv_img_dsc_t Build_Hdl;
lv_img_dsc_t Tbox_Hdl;
lv_img_dsc_t Gps_Hdl;
lv_img_dsc_t Iphone_Hdl;
lv_img_dsc_t Temp_Hdl;
const char *WeatherText[Type_Max][Level_Max] =
{
{
"蓝色暴雪预警",
"橙色暴雪预警",
"红色暴雪预警",
"黄色暴雪预警",
"白色暴雪预警",
},
{
"蓝色暴雨预警",
"橙色暴雨预警",
"红色暴雨预警",
"黄色暴雨预警",
"白色暴雨预警",
},
{
"蓝色冰雹预警",
"橙色冰雹预警",
"红色冰雹预警",
"黄色冰雹预警",
"白色冰雹预警",
},
{
"蓝色冰冻预警",
"橙色冰冻预警",
"红色冰冻预警",
"黄色冰冻预警",
"白色冰冻预警",
},
{
"蓝色持续低温预警",
"橙色持续低温预警",
"红色持续低温预警",
"黄色持续低温预警",
"白色持续低温预警",
},
{
"蓝色大风预警",
"橙色大风预警",
"红色大风预警",
"黄色大风预警",
"白色大风预警",
},
{
"蓝色大雾预警",
"橙色大雾预警",
"红色大雾预警",
"黄色大雾预警",
"白色大雾预警",
},
{
"蓝色道路结冰预警",
"橙色道路结冰预警",
"红色道路结冰预警",
"黄色道路结冰预警",
"白色道路结冰预警",
},
{
"蓝色电线积冰预警",
"橙色电线积冰预警",
"红色电线积冰预警",
"黄色电线积冰预警",
"白色电线积冰预警",
},
{
"蓝色干旱预警",
"橙色干旱预警",
"红色干旱预警",
"黄色干旱预警",
"白色干旱预警",
},
{
"蓝色干热风预警",
"橙色干热风预警",
"红色干热风预警",
"黄色干热风预警",
"白色干热风预警",
},
{
"蓝色高温预警",
"橙色高温预警",
"红色高温预警",
"黄色高温预警",
"白色高温预警",
},
{
"蓝色寒潮预警",
"橙色寒潮预警",
"红色寒潮预警",
"黄色寒潮预警",
"白色寒潮预警",
},
{
"蓝色雷暴大风预警",
"橙色雷暴大风预警",
"红色雷暴大风预警",
"黄色雷暴大风预警",
"白色雷暴大风预警",
},
{
"蓝色雷电预警",
"橙色雷电预警",
"红色雷电预警",
"黄色雷电预警",
"白色雷电预警",
},
{
"蓝色雷雨大风预警",
"橙色雷雨大风预警",
"红色雷雨大风预警",
"黄色雷雨大风预警",
"白色雷雨大风预警",
},
{
"蓝色霾预警",
"橙色霾预警",
"红色霾预警",
"黄色霾预警",
"白色霾预警",
},
{
"蓝色森林火险预警",
"橙色森林火险预警",
"红色森林火险预警",
"黄色森林火险预警",
"白色森林火险预警",
},
{
"蓝色沙尘暴预警",
"橙色沙尘暴预警",
"红色沙尘暴预警",
"黄色沙尘暴预警",
"白色沙尘暴预警",
},
{
"蓝色霜冻预警",
"橙色霜冻预警",
"红色霜冻预警",
"黄色霜冻预警",
"白色霜冻预警",
},
{
"蓝色台风预警",
"橙色台风预警",
"红色台风预警",
"白色台风预警",
"黄色台风预警",
},
};
const char *TopWeather[] =
{
"S:/spiffs/sta_icon_06.jpg",
"S:/spiffs/sta_icon_07.jpg",
"S:/spiffs/sta_icon_08.jpg",
"S:/spiffs/sta_icon_09.jpg",
"S:/spiffs/sta_icon_10.jpg",
"S:/spiffs/sta_icon_11.jpg",
"S:/spiffs/sta_icon_12.jpg",
"S:/spiffs/sta_icon_13.jpg",
"S:/spiffs/sta_icon_14.jpg",
"S:/spiffs/sta_icon_15.jpg",
"S:/spiffs/sta_icon_16.jpg",
"S:/spiffs/sta_icon_17.jpg",
"S:/spiffs/sta_icon_18.jpg",
"S:/spiffs/sta_icon_19.jpg",
"S:/spiffs/sta_icon_20.jpg",
"S:/spiffs/sta_icon_21.jpg",
"S:/spiffs/sta_icon_22.jpg",
"S:/spiffs/sta_icon_23.jpg",
"S:/spiffs/sta_icon_24.jpg",
"S:/spiffs/sta_icon_25.jpg",
"S:/spiffs/sta_icon_26.jpg",
"S:/spiffs/sta_icon_27.jpg",
"S:/spiffs/sta_icon_28.jpg",
"S:/spiffs/sta_icon_29.jpg",
"S:/spiffs/sta_icon_30.jpg",
"S:/spiffs/sta_icon_31.jpg",
"S:/spiffs/sta_icon_32.jpg",
"S:/spiffs/sta_icon_32.jpg",
"S:/spiffs/sta_icon_33.jpg",
"S:/spiffs/sta_icon_34.jpg",
"S:/spiffs/sta_icon_35.jpg",
"S:/spiffs/sta_icon_36.jpg",
"S:/spiffs/sta_icon_37.jpg",
"S:/spiffs/sta_icon_38.jpg",
"S:/spiffs/sta_icon_39.jpg",
};
const char *NavIconImage[] =
{
"S:/spiffs/navi_01.jpg",
"S:/spiffs/navi_02.jpg",
"S:/spiffs/navi_03.jpg",
"S:/spiffs/navi_04.jpg",
"S:/spiffs/navi_05.jpg",
"S:/spiffs/navi_06.jpg",
"S:/spiffs/navi_07.jpg",
"S:/spiffs/navi_08.jpg",
"S:/spiffs/navi_09.jpg",
"S:/spiffs/navi_10.jpg",
"S:/spiffs/navi_11.jpg",
"S:/spiffs/navi_12.jpg",
"S:/spiffs/navi_13.jpg",
"S:/spiffs/navi_14.jpg",
"S:/spiffs/navi_15.jpg",
"S:/spiffs/navi_16.jpg",
"S:/spiffs/navi_17.jpg",
"S:/spiffs/navi_18.jpg",
"S:/spiffs/navi_19.jpg",
"S:/spiffs/navi_20.jpg",
"S:/spiffs/navi_21.jpg",
"S:/spiffs/navi_22.jpg",
"S:/spiffs/navi_23.jpg",
"S:/spiffs/navi_24.jpg",
"S:/spiffs/navi_25.jpg",
"S:/spiffs/navi_26.jpg",
"S:/spiffs/navi_27.jpg",
"S:/spiffs/navi_28.jpg",
"S:/spiffs/navi_29.jpg",
"S:/spiffs/navi_30.jpg",
"S:/spiffs/navi_51.jpg",
"S:/spiffs/navi_52.jpg",
"S:/spiffs/navi_53.jpg",
"S:/spiffs/navi_54.jpg",
"S:/spiffs/navi_55.jpg",
"S:/spiffs/navi_56.jpg",
"S:/spiffs/navi_57.jpg",
"S:/spiffs/navi_58.jpg",
"S:/spiffs/navi_59.jpg",
"S:/spiffs/navi_60.jpg",
"S:/spiffs/navi_61.jpg",
"S:/spiffs/navi_62.jpg",
"S:/spiffs/navi_63.jpg",
"S:/spiffs/navi_64.jpg",
"S:/spiffs/navi_65.jpg",
"S:/spiffs/navi_66.jpg",
"S:/spiffs/navi_67.jpg",
"S:/spiffs/navi_68.jpg",
"S:/spiffs/navi_69.jpg",
"S:/spiffs/navi_70.jpg",
"S:/spiffs/navi_71.jpg",
"S:/spiffs/navi_72.jpg",
"S:/spiffs/navi_73.jpg",
"S:/spiffs/navi_74.jpg",
"S:/spiffs/navi_75.jpg",
"S:/spiffs/navi_76.jpg",
};
const char *PowerImage[] =
{
"S:/spiffs/pw_b_001.jpg",
"S:/spiffs/pw_b_002.jpg",
"S:/spiffs/pw_b_003.jpg",
"S:/spiffs/pw_b_004.jpg",
"S:/spiffs/pw_b_005.jpg",
"S:/spiffs/pw_b_006.jpg",
"S:/spiffs/pw_b_007.jpg",
"S:/spiffs/pw_b_008.jpg",
"S:/spiffs/pw_b_009.jpg",
"S:/spiffs/pw_b_010.jpg",
"S:/spiffs/pw_b_011.jpg",
"S:/spiffs/pw_b_012.jpg",
"S:/spiffs/pw_b_013.jpg",
"S:/spiffs/pw_b_014.jpg",
"S:/spiffs/pw_b_015.jpg",
"S:/spiffs/pw_b_016.jpg",
"S:/spiffs/pw_b_017.jpg",
"S:/spiffs/pw_b_018.jpg",
"S:/spiffs/pw_b_019.jpg",
"S:/spiffs/pw_b_020.jpg",
"S:/spiffs/pw_b_021.jpg",
"S:/spiffs/pw_b_022.jpg",
"S:/spiffs/pw_b_023.jpg",
"S:/spiffs/pw_b_024.jpg",
"S:/spiffs/pw_b_025.jpg",
"S:/spiffs/pw_b_026.jpg",
"S:/spiffs/pw_b_027.jpg",
"S:/spiffs/pw_b_028.jpg",
"S:/spiffs/pw_b_029.jpg",
"S:/spiffs/pw_b_030.jpg",
"S:/spiffs/pw_b_031.jpg",
"S:/spiffs/pw_b_032.jpg",
"S:/spiffs/pw_b_033.jpg",
"S:/spiffs/pw_b_034.jpg",
"S:/spiffs/pw_b_035.jpg",
"S:/spiffs/pw_b_036.jpg",
"S:/spiffs/pw_b_037.jpg",
"S:/spiffs/pw_b_038.jpg",
"S:/spiffs/pw_b_039.jpg",
"S:/spiffs/pw_b_040.jpg",
"S:/spiffs/pw_b_041.jpg",
"S:/spiffs/pw_b_042.jpg",
"S:/spiffs/pw_b_043.jpg",
"S:/spiffs/pw_b_044.jpg",
"S:/spiffs/pw_b_045.jpg",
"S:/spiffs/pw_b_046.jpg",
"S:/spiffs/pw_b_047.jpg",
"S:/spiffs/pw_b_048.jpg",
"S:/spiffs/pw_b_049.jpg",
"S:/spiffs/pw_b_050.jpg",
"S:/spiffs/pw_b_051.jpg",
"S:/spiffs/pw_b_052.jpg",
"S:/spiffs/pw_b_053.jpg",
"S:/spiffs/pw_b_054.jpg",
"S:/spiffs/pw_b_055.jpg",
"S:/spiffs/pw_b_056.jpg",
"S:/spiffs/pw_b_057.jpg",
"S:/spiffs/pw_b_058.jpg",
"S:/spiffs/pw_b_059.jpg",
"S:/spiffs/pw_b_060.jpg",
"S:/spiffs/pw_b_061.jpg",
"S:/spiffs/pw_b_062.jpg",
"S:/spiffs/pw_b_063.jpg",
"S:/spiffs/pw_b_064.jpg",
"S:/spiffs/pw_b_065.jpg",
"S:/spiffs/pw_b_066.jpg",
"S:/spiffs/pw_b_067.jpg",
"S:/spiffs/pw_b_068.jpg",
"S:/spiffs/pw_b_069.jpg",
"S:/spiffs/pw_b_070.jpg",
"S:/spiffs/pw_b_071.jpg",
"S:/spiffs/pw_b_072.jpg",
"S:/spiffs/pw_b_073.jpg",
"S:/spiffs/pw_b_074.jpg",
"S:/spiffs/pw_b_075.jpg",
"S:/spiffs/pw_b_076.jpg",
"S:/spiffs/pw_b_077.jpg",
"S:/spiffs/pw_b_078.jpg",
"S:/spiffs/pw_b_079.jpg",
"S:/spiffs/pw_b_080.jpg",
"S:/spiffs/pw_b_081.jpg",
"S:/spiffs/pw_b_082.jpg",
"S:/spiffs/pw_b_083.jpg",
"S:/spiffs/pw_b_084.jpg",
"S:/spiffs/pw_b_085.jpg",
"S:/spiffs/pw_b_086.jpg",
"S:/spiffs/pw_b_087.jpg",
"S:/spiffs/pw_b_088.jpg",
"S:/spiffs/pw_b_089.jpg",
"S:/spiffs/pw_b_090.jpg",
"S:/spiffs/pw_b_091.jpg",
"S:/spiffs/pw_b_092.jpg",
"S:/spiffs/pw_b_093.jpg",
"S:/spiffs/pw_b_094.jpg",
"S:/spiffs/pw_b_095.jpg",
"S:/spiffs/pw_b_096.jpg",
"S:/spiffs/pw_b_097.jpg",
"S:/spiffs/pw_b_098.jpg",
"S:/spiffs/pw_b_099.jpg",
"S:/spiffs/pw_b_100.jpg",
};
const char *WeatherIcon[Type_Max][Level_Max] =
{
{
"S:/spiffs/wet_p_76.jpg",
"S:/spiffs/wet_p_74.jpg",
"S:/spiffs/wet_p_73.jpg",
"S:/spiffs/wet_p_75.jpg",
"S:/spiffs/wet_p_77.jpg",
},
{
"S:/spiffs/wet_p_08.jpg",
"S:/spiffs/wet_p_06.jpg",
"S:/spiffs/wet_p_05.jpg",
"S:/spiffs/wet_p_07.jpg",
"S:/spiffs/wet_p_77.jpg",
},
{
"S:/spiffs/wet_p_40.jpg",
"S:/spiffs/wet_p_38.jpg",
"S:/spiffs/wet_p_37.jpg",
"S:/spiffs/wet_p_39.jpg",
"S:/spiffs/wet_p_77.jpg",
},
{
"S:/spiffs/wet_p_81.jpg",
"S:/spiffs/wet_p_79.jpg",
"S:/spiffs/wet_p_78.jpg",
"S:/spiffs/wet_p_80.jpg",
"S:/spiffs/wet_p_77.jpg",
},
{
"S:/spiffs/wet_p_12.jpg",
"S:/spiffs/wet_p_10.jpg",
"S:/spiffs/wet_p_09.jpg",
"S:/spiffs/wet_p_11.jpg",
"S:/spiffs/wet_p_77.jpg",
},
{
"S:/spiffs/wet_p_19.jpg", // todo
"S:/spiffs/wet_p_15.jpg", // todo
"S:/spiffs/wet_p_13.jpg", // todo
"S:/spiffs/wet_p_17.jpg", // todo
"S:/spiffs/wet_p_77.jpg", // todo
},
{
"S:/spiffs/wet_p_48.jpg",
"S:/spiffs/wet_p_46.jpg",
"S:/spiffs/wet_p_45.jpg",
"S:/spiffs/wet_p_47.jpg",
"S:/spiffs/wet_p_77.jpg",
},
{
"S:/spiffs/wet_p_60.jpg",
"S:/spiffs/wet_p_58.jpg",
"S:/spiffs/wet_p_57.jpg",
"S:/spiffs/wet_p_59.jpg",
"S:/spiffs/wet_p_77.jpg",
},
{
"S:/spiffs/wet_p_85.jpg",
"S:/spiffs/wet_p_83.jpg",
"S:/spiffs/wet_p_82.jpg",
"S:/spiffs/wet_p_84.jpg",
"S:/spiffs/wet_p_77.jpg",
},
{
"S:/spiffs/wet_p_68.jpg",
"S:/spiffs/wet_p_66.jpg",
"S:/spiffs/wet_p_65.jpg",
"S:/spiffs/wet_p_67.jpg",
"S:/spiffs/wet_p_77.jpg",
},
{
"S:/spiffs/wet_p_28.jpg",
"S:/spiffs/wet_p_26.jpg",
"S:/spiffs/wet_p_27.jpg",
"S:/spiffs/wet_p_25.jpg",
"S:/spiffs/wet_p_77.jpg",
},
{
"S:/spiffs/wet_p_24.jpg",
"S:/spiffs/wet_p_22.jpg",
"S:/spiffs/wet_p_21.jpg",
"S:/spiffs/wet_p_23.jpg",
"S:/spiffs/wet_p_77.jpg",
},
{
"S:/spiffs/wet_p_04.jpg",
"S:/spiffs/wet_p_02.jpg",
"S:/spiffs/wet_p_01.jpg",
"S:/spiffs/wet_p_03.jpg",
"S:/spiffs/wet_p_77.jpg",
},
{
"S:/spiffs/wet_p_20.jpg",
"S:/spiffs/wet_p_16.jpg",
"S:/spiffs/wet_p_18.jpg",
"S:/spiffs/wet_p_14.jpg",
"S:/spiffs/wet_p_77.jpg",
},
{
"S:/spiffs/wet_p_32.jpg",
"S:/spiffs/wet_p_30.jpg",
"S:/spiffs/wet_p_29.jpg",
"S:/spiffs/wet_p_31.jpg",
"S:/spiffs/wet_p_77.jpg",
},
{
"S:/spiffs/wet_p_72.jpg",
"S:/spiffs/wet_p_70.jpg",
"S:/spiffs/wet_p_71.jpg",
"S:/spiffs/wet_p_69.jpg",
"S:/spiffs/wet_p_77.jpg",
},
{
"S:/spiffs/wet_p_36.jpg",
"S:/spiffs/wet_p_34.jpg",
"S:/spiffs/wet_p_33.jpg",
"S:/spiffs/wet_p_35.jpg",
"S:/spiffs/wet_p_77.jpg",
},
{
"S:/spiffs/wet_p_44.jpg",
"S:/spiffs/wet_p_42.jpg",
"S:/spiffs/wet_p_41.jpg",
"S:/spiffs/wet_p_43.jpg",
"S:/spiffs/wet_p_77.jpg",
},
{
"S:/spiffs/wet_p_56.jpg",
"S:/spiffs/wet_p_54.jpg",
"S:/spiffs/wet_p_53.jpg",
"S:/spiffs/wet_p_55.jpg",
"S:/spiffs/wet_p_77.jpg",
},
{
"S:/spiffs/wet_p_64.jpg",
"S:/spiffs/wet_p_62.jpg",
"S:/spiffs/wet_p_61.jpg",
"S:/spiffs/wet_p_63.jpg",
"S:/spiffs/wet_p_77.jpg",
},
};
typedef struct
{
char *Text;
int StartX;
int StartY;
} _st_Down_Disp;
const _st_Down_Disp Down_Text[] =
{
{
"长按返回主界面",
100,
374,
},
{
"短按媒体键忽略",
100,
374,
},
{
"短按查看 | 长按关闭",
64,
354,
},
};
#endif
......@@ -6,12 +6,7 @@
#include "bsp_Gpio.h"
#include "bsp_Uart.h"
#include "MCU_Core_Protocol.h"
#include "Telltales_user.h"
#include "Telltales_Lib.h"
static const char *ProtocolTAG = "MCU_Core_Protocol";
static _ID19_Data_un_t Data_Uart_SendID10;
static _ID12_Data_un_t Data_Uart_SendID12;
static _ID02_Data_un_t Data_Uart_SendID02;
static _ID04_Data_un_t Data_Uart_SendID04;
static const char *ProtocolTAG = "MCU_Core_Protocol";
......@@ -112,6 +112,6 @@ extern void Menu_Set_Charge(uint8_t u8MenuData);
extern void Menu_Set_Music(uint8_t u8MenuData);
extern void Menu_Set_NAV(uint8_t u8MenuData);
extern void Menu_Time_Handle(uint8_t u8MenuTimeBase);
extern Menu_Item_en_t Get_Current_Item(void);
#endif
......@@ -8,8 +8,6 @@
#include "bsp_Gpio.h"
#include "esp_err.h"
#include "esp_log.h"
// #include "bsp_twai.h"
#include "bsp_SysTime.h"
#include "bsp_Timer.h"
......@@ -291,7 +289,7 @@ void APP_Sys_Startup_Init(void)
// {
// u8StartupMode = 0;
// }
ESP_LOGI(tag, "u8StartupMode = %d\r\n!",u8StartupMode);
//ESP_LOGI(tag, "u8StartupMode = %d\r\n!",u8StartupMode);
PwrMemInit();
Power_Management_Init(u8StartupMode);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
#include <time.h>
#include <sys/time.h>
#include "esp_log.h"
#include <stdint.h>
#include "bsp_SysTime.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/queue.h"
#include "freertos/semphr.h"
static const char *TIMETAG = "systime";
int set_local_time(_st_Data_Time *Time,int timeoffest)
{
struct tm timeinfo;
struct timeval tv;
time_t timep;
int yr = 2020;
int month = 1;
int day = 1; // 年月日不变
time(&timep);
setenv("TZ", "CST-8", 1);
tzset();
localtime_r(&timep, &timeinfo); /* 获取当前时间 */
timeinfo.tm_sec = Time->Second;
timeinfo.tm_min = Time->Minute;
timeinfo.tm_hour = Time->Hour;
//printf("timeinfo.tm_hour %d\r\n",timeinfo.tm_hour);
// yr = timeinfo.tm_year + 1900;
// month = timeinfo.tm_mon + 1;
// day = timeinfo.tm_mday;
//
timeinfo.tm_year = yr - 1900;
timeinfo.tm_mon = month - 1;
timeinfo.tm_mday = day;
//ESP_LOGI(TIMETAG, "hour is %d, minute is %d, sec is %d , year is %d, mounth is %d, day is %d", timeinfo.tm_hour, timeinfo.tm_min, timeinfo.tm_sec, timeinfo.tm_year, timeinfo.tm_mon, timeinfo.tm_mday );
timep = mktime(&timeinfo); /* 转换为时间戳 */
tv.tv_sec = timep;
tv.tv_usec = timeoffest;
if (settimeofday(&tv, (struct timezone *)0) < 0) /* 设置系统时间 */
{
return -1;
}
return 0;
}
typedef struct
{
/* data */
uint8_t dispYear;
uint8_t dispmonth;
uint8_t dispday;
uint8_t dispHour;
uint8_t dispMin;
uint8_t dispsecond;
} _Time_Display_Struct;
_Time_Display_Struct TimeDisp;
void Time_Display_Init(int timeoffest)
{
TimeDisp.dispYear = 0;
TimeDisp.dispmonth = 0;
TimeDisp.dispday = 0;
TimeDisp.dispHour = 0;
TimeDisp.dispMin = 0;
TimeDisp.dispsecond = 0;
_st_Data_Time Time = {
.Year = 0,
.Month = 0,
.Day = 0,
.Hour = 0,
.Minute = 0,
.Second = 0,
};
set_local_time(&Time,timeoffest);
}
void Time_Display_Update(void) // 100ms
{
time_t now;
struct tm timeinfo;
time(&now);
setenv("TZ", "CST-8", 1);
tzset();
localtime_r(&now, &timeinfo);
TimeDisp.dispYear = timeinfo.tm_year;
TimeDisp.dispmonth = timeinfo.tm_mon;
TimeDisp.dispday = timeinfo.tm_mday;
TimeDisp.dispHour = timeinfo.tm_hour;
TimeDisp.dispMin = timeinfo.tm_min;
TimeDisp.dispsecond = timeinfo.tm_sec;
//ESP_LOGI(TIMETAG, "hour is %d, minute is %d, sec is %d , year is %d, mounth is %d, day is %d", TimeDisp.dispHour, TimeDisp.dispMin, TimeDisp.dispsecond, TimeDisp.dispYear, TimeDisp.dispmonth, TimeDisp.dispday );
//printf("TimeDisp.dispHour = %d; TimeDisp.dispMin = %d; \r\n",timeinfo.tm_hour,timeinfo.tm_min);
//printf("timeinfo.tm_year %d\r\n",timeinfo.tm_year);
}
uint8_t Get_dispHour(void)
{
return TimeDisp.dispHour;
}
uint8_t Get_dispMin(void)
{
return TimeDisp.dispMin;
}
#ifndef ESP32_RTC_H
#define ESP32_RTC_H
#include "app_dataProcess.h"
void Time_Display_Init(int timeoffest);
void Time_Display_Update(void );
uint8_t Get_dispHour(void );
uint8_t Get_dispMin(void );
int set_local_time(_st_Data_Time *Time,int timeoffest);
#endif
......@@ -14,6 +14,6 @@
extern void MCU_UART_TEST(void);
void uart_event_task(void *pvParameters);
#endif
#include "eepromManage.h"
#include "eeManager_Interface.h"
#include <stdio.h>
#include "bsp_Gpio.h"
#include "driver/gpio.h"
//#include "bsp_port.h"
//#include "abstract.h"
/*-------------------------------------------------------------------------
* Function Name : eeprom_StoreInfo_Init
* Description :
* Input :
* Output : None
* Return : None
* onther :
--------------------------------------------------------------------------*/
void eeprom_StoreInfo_Init(void)
{
eeprom_SetParameter(AT24C16,distance_1m);
EE_SCL_OutConfig();
EE_SDA_OutConfig();
}
/*-------------------------------------------------------------------------
* Function Name : eeprom_comm_DelayUs
* Description :
* Input : None
* Output : None
* Return : None
* onther :
--------------------------------------------------------------------------*/
void eeprom_comm_DelayUs(ee_uint32_t time)
{
ee_uint32_t i;
ee_uint32_t dalayCnt = 0;
dalayCnt = time;
EE_FeedDog();
for(i = 0;i < dalayCnt;i++)
{
EE_NOP();
}
EE_FeedDog();
}
/*-------------------------------------------------------------------------
* Function Name : EE_SDA_InConfig
* Description :
* Input : None
* Output : None
* Return : None
* onther :
--------------------------------------------------------------------------*/
void EE_SDA_InConfig(void)
{
gpio_set_direction(IIC_SDA, GPIO_MODE_INPUT);
}
/*-------------------------------------------------------------------------
* Function Name : EE_SDA_OutConfig
* Description :
* Input : None
* Output : None
* Return : None
* onther :
--------------------------------------------------------------------------*/
void EE_SDA_OutConfig(void)
{
gpio_set_direction(IIC_SDA, GPIO_MODE_OUTPUT_OD);
}
/*-------------------------------------------------------------------------
* Function Name : EE_SDA_GetValue
* Description :
* Input : None
* Output : None
* Return : None
* onther :
--------------------------------------------------------------------------*/
ee_uint8_t EE_SDA_GetValue(void)
{
return gpio_get_level(IIC_SDA);
}
/*-------------------------------------------------------------------------
* Function Name : EE_SDA_OUT
* Description :
* Input : None
* Output : None
* Return : None
* onther :
--------------------------------------------------------------------------*/
void EE_SDA_OUT(ee_uint8_t data)
{
gpio_set_direction(IIC_SDA, GPIO_MODE_OUTPUT_OD);
gpio_set_level(IIC_SDA, data);
}
/*-------------------------------------------------------------------------
* Function Name : EE_SDA_OutConfig
* Description :
* Input : None
* Output : None
* Return : None
* onther :
--------------------------------------------------------------------------*/
void EE_SCL_OutConfig(void)
{
gpio_set_direction(IIC_SCL, GPIO_MODE_OUTPUT_OD);
}
/*-------------------------------------------------------------------------
* Function Name : EE_SCL_OUT
* Description :
* Input : None
* Output : None
* Return : None
* onther :
--------------------------------------------------------------------------*/
void EE_SCL_OUT(ee_uint8_t data)
{
gpio_set_direction(IIC_SCL, GPIO_MODE_OUTPUT_OD);
gpio_set_level(IIC_SCL, data);
}
/*-------------------------------------------------------------------------
* Function Name : EE_FeedDog
* Description : ���� DOG
* Input : None
* Output : None
* Return : None
* onther :
--------------------------------------------------------------------------*/
void EE_FeedDog(void)
{
// bsp_HDOG_Feed();
}
/*-------------------------------------------------------------------------
* Function Name : EE_NOP
* Description : nop ָ��
* Input : None
* Output : None
* Return : None
* onther :
--------------------------------------------------------------------------*/
void EE_NOP(void)
{
// NOP();
}
#ifndef _S6J3360_EE_INTERFACE_H_
#define _S6J3360_EE_INTERFACE_H_
#include "eepromManage.h"
extern void eeprom_StoreInfo_Init(void);
extern void eeprom_comm_DelayUs(ee_uint32_t time);
extern void EE_SDA_InConfig(void);
extern void EE_SDA_OutConfig(void);
extern ee_uint8_t EE_SDA_GetValue(void);
extern void EE_SDA_OUT(ee_uint8_t data);
extern void EE_SCL_OutConfig(void);
extern void EE_SCL_OUT(ee_uint8_t data);
extern void EE_FeedDog(void);
extern void EE_NOP(void);
#endif /* _S6J3360_EE_INTERFACE_H_ */
#ifndef _S6J3360_EE_MANAGE_H_
#define _S6J3360_EE_MANAGE_H_
#pragma pack(1) /* 必须保留 */
typedef unsigned char ee_uint8_t;
typedef unsigned short ee_uint16_t;
typedef unsigned int ee_uint32_t;
#define READ_FAIL 0x0000
#define READING 0x0001
#define READ_COMPLETE 0x0002
#define WRITE_FAIL 0x0000
#define WRITING 0x0001
#define WRITE_COMPLETE 0x0002
typedef enum
{
distance_1m = 1,
distance_10m = 10,
distance_100m = 100,
distance_1000m = 1000
}StorageDistance_t;
typedef enum
{
AT24C04 = 4,
AT24C16 = 16,
}DeviceNo_t;
typedef struct
{
ee_uint32_t Odo;
ee_uint32_t Trip;
ee_uint8_t IsTripClear;
}Mileage_t;
extern ee_uint16_t OdoValidAddress;
/* 读取库版本号 */
//extern ee_uint8_t* eeprom_getVersion(void);
/*-------------------------------------------------------------------------
* Function Name : eeprom_1ms_timeCount
* Description : 中断中调用 必须中断时间 >= 1ms,这个时间影响写的整体速度
* Input :
* Output :
* Return :
* onther :
--------------------------------------------------------------------------*/
extern void eeprom_1ms_timeCount(void);
/*-------------------------------------------------------------------------
* Function Name : eeprom_SetParameter
* Description :
* Input : device_No:芯片型号 AT24C04 or AT24C16
StorageDistance :相邻两次存储数据间隔,两次存储数据之差必须大于这个间隔
distance_1m = 0,
distance_10m = 10,
distance_100m = 100,
distance_1000m = 1000
* Output :
* Return :
* onther :
--------------------------------------------------------------------------*/
extern void eeprom_SetParameter(DeviceNo_t device_No,StorageDistance_t StorageDistance);
/*-------------------------------------------------------------------------
* Function Name : eeprom_ClearOdoSection
* Description : 清零ODO,但是清零完成不死机
* Input :
* Output :
* Return :
* onther :
--------------------------------------------------------------------------*/
extern void eeprom_ClearOdoSection(void);
/*-------------------------------------------------------------------------
* Function Name : eeprom_WriteRecord
* Description :
* Input : address ; 0~xxx
recordDatas:存储数据指针
record_len : 记录长度
* Output :
* Return :
#define WRITE_FAIL 0x0000
#define WRITING 0x0001
#define WRITE_COMPLETE 0x0002
* onther :
--------------------------------------------------------------------------*/
extern ee_uint16_t eeprom_WriteRecord(ee_uint16_t address,ee_uint8_t* recordDatas,ee_uint16_t record_len);
/*-------------------------------------------------------------------------
* Function Name : eeprom_ReadRecord
* Description :
* Input : address ; 0~xxx
recordDatas:存储数据指针
record_len : 记录长度
* Output :
* Return :
#define READ_FAIL 0x0000
#define READING 0x0001
#define READ_COMPLETE 0x0002
* onther :
--------------------------------------------------------------------------*/
extern ee_uint16_t eeprom_ReadRecord(ee_uint16_t address,ee_uint8_t* recordDatas,ee_uint16_t record_len);
/*-------------------------------------------------------------------------
* Function Name : eeprom_WriteODO
* Description :
* Input : StorageDistance 必须与 eeprom_SetParameter设置的一致
u32_odo 单位必须与 StorageDistance 保持一致
每次唤醒必须执行读 调用eeprom_ReadODO,因为有些信息休眠无法保存
* Output :
* Return :
#define WRITE_FAIL 0x0000
#define WRITING 0x0001
#define WRITE_COMPLETE 0x0002
* onther :
--------------------------------------------------------------------------*/
extern ee_uint16_t eeprom_WriteODO(Mileage_t *MileageInfo,StorageDistance_t StorageDistance,ee_uint8_t ign);
/*-------------------------------------------------------------------------
* Function Name : eeprom_ReadODO
* Description :
* Input :
* Output :
* Return :
#define READ_FAIL 0x0000
#define READING 0x0001
#define READ_COMPLETE 0x0002
* onther :
--------------------------------------------------------------------------*/
extern ee_uint16_t eeprom_ReadODO(Mileage_t *MileageInfo);
/*-------------------------------------------------------------------------
get state infomation
--------------------------------------------------------------------------*/
extern ee_uint16_t eeprom_getWriteState(void);
extern ee_uint16_t eeprom_getReadState(void);
extern ee_uint16_t eeprom_getOdoCurWriteAddress(void);
extern ee_uint32_t eeprom_getOdoLastWriteValue(void);
extern ee_uint16_t eeprom_getWriteDebugState(void);
extern ee_uint16_t eeprom_getReadDebugState(void);
extern char* eeprom_getVersion(void);
/***30电只存储一次调用**/
/*extern void SetEEWriteDressToLib(ee_uint16_t EEWriteDressDate);
extern ee_uint16_t GetEEWriteDressToRam(void);*/
#pragma pack () /* 必须保留 */
#endif /* _S6J3360_EE_MANAGE_H_ */
......@@ -119,9 +119,9 @@ static lv_res_t decode_jpeg(const uint8_t *input_buffer, uint32_t input_size, lv
.output_type = JPEG_PIXEL_FORMAT_RGB888,
#elif LV_COLOR_DEPTH == 16
#if LV_BIG_ENDIAN_SYSTEM == 1 || LV_COLOR_16_SWAP == 1
.output_type = JPEG_PIXEL_FORMAT_RGB565_BE,
.output_type = 6,
#else
.output_type = JPEG_PIXEL_FORMAT_RGB565_LE,
.output_type = 6,
#endif
#else
#error Unsupported LV_COLOR_DEPTH
......@@ -130,7 +130,7 @@ static lv_res_t decode_jpeg(const uint8_t *input_buffer, uint32_t input_size, lv
};
jpeg_dec_handle_t jpeg_dec;
jpeg_dec_open(&config, &jpeg_dec);
//jpeg_dec_open(&config, &jpeg_dec);
if (!jpeg_dec) {
ESP_LOGE(TAG, "Failed to open jpeg decoder");
return LV_RES_INV;
......
#include "a2dp_sink_and_hfp.h"
#include "Gui_Display.h"
// #include "bsp_iic_aw8839.h"
#include <dirent.h>
#include <stdbool.h>
#include <stdint.h>
#include "bsp_Uart.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "esp_err.h"
#include "esp_log.h"
#include "bsp_Gpio.h"
#include "R485_User.h"
#include "bsp_Uart.h"
#include "bsp_Adc.h"
#include "bsp_R485.h"
#include "Protocol_User.h"
#include "Protocol_Lib.h"
#include "Services_Mileage_User.h"
#include "eepromManage.h"
#include "R485_User.h"
#include "gatts_table_creat_demo.h"
TaskHandle_t Sys_Run_hdl;
TaskHandle_t R485_RX_hdl;
......@@ -32,7 +26,12 @@ static uint32_t Sys_1ms_Cnt = 0;
static const char *TAGmain = "main";
#define SYS_RUN_TASK_1MS (1)
#define SYS_RU
#define SYS_RUN_TASK_2MS ((Sys_1ms_Cnt + 1) % 2 == 0)
#define SYS_RUN_TASK_10MS ((Sys_1ms_Cnt + 2) % 10 == 0)
#define SYS_RUN_TASK_20MS ((Sys_1ms_Cnt + 3) % 20 == 0)
#define SYS_RUN_TASK_50MS ((Sys_1ms_Cnt + 4) % 50 == 0)
#define SYS_RUN_TASK_100MS ((Sys_1ms_Cnt + 5) % 100 == 0)
#define SYS_RUN_TASK_2S ((Sys_1ms_Cnt + 6) % (2 * 1000) == 0)
void Sys_Run_Task(void *arg)
{
......@@ -179,27 +178,24 @@ void app_main(void)
adc_oneshot_read_init();
Gui_Display_Init();
// // // // vTaskDelay(pdMS_TO_TICKS(1000));
BT_KL30_Wakeup_Init();
BLE_Init();
my_Timer_SysOn_Init();
my_Timer_Driver_Init();
// // // esp_intr_dump(stdout);
// // // vTaskDelay(pdMS_TO_TICKS(1000));
Time_Display_Init(timeroffest * 1000);
//Time_Display_Init(timeroffest * 1000);
APP_SYS_Init();
// // printf("free_heap_size = %d\n", esp_get_free_heap_size());
xTaskCreatePinnedToCore(Sys_Run_Task, "Sys_Run_Task", 4096, NULL, 6, &Sys_Run_hdl, 1);
xTaskCreate(adc_oneshot_read_task, "adc_oneshot_read_task", 4096, NULL, 5, &adc_oneshot_read_hdl);
xTaskCreatePinnedToCore(R485_RX_task, "R485_RX_task", 1024 * 4, NULL, 6, &R485_RX_hdl, 1);
//xTaskCreate(adc_oneshot_read_task, "adc_oneshot_read_task", 4096, NULL, 5, &adc_oneshot_read_hdl);
xTaskCreatePinnedToCore(uart_event_task, "uart_event_task", 1024 * 4, NULL, 5, &uart_event_hdl, 1);
xTaskCreatePinnedToCore(IIC_Service_task, "IIC_Task", 1024 * 4, NULL, 3, &IIC_hdl, 1);
xTaskCreatePinnedToCore(ble_rx_analysis_tasks, "ble_rx_analysis_tasks", 1024 * 4, NULL, 1, &BLE_hdl, 1);
//xTaskCreatePinnedToCore(IIC_Service_task, "IIC_Task", 1024 * 4, NULL, 3, &IIC_hdl, 1);
//xTaskCreatePinnedToCore(ble_rx_analysis_tasks, "ble_rx_analysis_tasks", 1024 * 4, NULL, 1, &BLE_hdl, 1);
// printf("free_heap_size = %d\n", esp_get_free_heap_size());
}
......@@ -344,12 +344,12 @@ CONFIG_ESPTOOLPY_FLASHFREQ="80m"
# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set
CONFIG_ESPTOOLPY_FLASHSIZE="16MB"
CONFIG_ESPTOOLPY_FLASHSIZE="8MB"
# CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE is not set
CONFIG_ESPTOOLPY_BEFORE_RESET=y
# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set
......@@ -1538,15 +1538,16 @@ CONFIG_HEAP_TRACING_OFF=y
#
# CONFIG_LOG_DEFAULT_LEVEL_NONE is not set
# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set
# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set
CONFIG_LOG_DEFAULT_LEVEL_INFO=y
CONFIG_LOG_DEFAULT_LEVEL_WARN=y
# CONFIG_LOG_DEFAULT_LEVEL_INFO is not set
# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set
# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set
CONFIG_LOG_DEFAULT_LEVEL=3
CONFIG_LOG_DEFAULT_LEVEL=2
CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y
# CONFIG_LOG_MAXIMUM_LEVEL_INFO is not set
# CONFIG_LOG_MAXIMUM_LEVEL_DEBUG is not set
# CONFIG_LOG_MAXIMUM_LEVEL_VERBOSE is not set
CONFIG_LOG_MAXIMUM_LEVEL=3
CONFIG_LOG_MAXIMUM_LEVEL=2
# CONFIG_LOG_MASTER_LEVEL is not set
CONFIG_LOG_COLORS=y
CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment