Create hal-device module, fix GPIO, fix tests, fix TactilityC (#471)
* **New Features** * Added a HAL device module providing device enumeration, type queries and a HAL↔kernel bridge. * **Improvements** * Integrated HAL module into startup; standardized module names, includes and lifecycle logging; safer file append behavior; broader build support. * **API Changes** * Driver lifecycle now uses explicit add/remove semantics; C and HAL device type/lookup APIs clarified. * **Chores** * Added module README and Apache‑2.0 license; updated build configuration to include the new module. * **Fixes** * Updated tests and object file handling to behave correctly.
This commit is contained in:
committed by
GitHub
parent
5993ceb232
commit
3fe1dc0312
@@ -0,0 +1,46 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
if (DEFINED ENV{ESP_IDF_VERSION})
|
||||
file(GLOB_RECURSE SOURCE_FILES Source/*.c*)
|
||||
|
||||
list(APPEND REQUIRES_LIST
|
||||
TactilityKernel
|
||||
TactilityCore
|
||||
TactilityFreeRtos
|
||||
)
|
||||
|
||||
idf_component_register(
|
||||
SRCS ${SOURCE_FILES}
|
||||
INCLUDE_DIRS "Include/"
|
||||
REQUIRES ${REQUIRES_LIST}
|
||||
)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(${COMPONENT_LIB} PUBLIC -Wno-unused-variable)
|
||||
endif ()
|
||||
|
||||
else ()
|
||||
|
||||
file(GLOB_RECURSE SOURCES "Source/*.c*")
|
||||
|
||||
add_library(hal-device OBJECT)
|
||||
|
||||
target_sources(hal-device PRIVATE ${SOURCES})
|
||||
|
||||
target_include_directories(hal-device
|
||||
PRIVATE Private/
|
||||
PUBLIC Include/
|
||||
)
|
||||
|
||||
add_definitions(-D_Nullable=)
|
||||
add_definitions(-D_Nonnull=)
|
||||
|
||||
target_link_libraries(hal-device PUBLIC
|
||||
TactilityFreeRtos
|
||||
TactilityCore
|
||||
TactilityKernel
|
||||
freertos_kernel
|
||||
)
|
||||
|
||||
endif ()
|
||||
|
||||
Reference in New Issue
Block a user