mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-04-18 17:35:05 +00:00
Fixes
This commit is contained in:
parent
179ec6ca6a
commit
5565b77c7c
@ -76,6 +76,7 @@ if (NOT DEFINED ENV{ESP_IDF_VERSION})
|
||||
add_subdirectory(TactilityCore)
|
||||
add_subdirectory(TactilityFreeRtos)
|
||||
add_subdirectory(TactilityKernel)
|
||||
add_subdirectory(Drivers/PlatformPosix)
|
||||
add_subdirectory(Devices/simulator)
|
||||
add_subdirectory(Libraries/cJSON)
|
||||
add_subdirectory(Libraries/lv_screenshot)
|
||||
|
||||
@ -3,5 +3,5 @@ file(GLOB_RECURSE SOURCE_FILES Source/*.c*)
|
||||
idf_component_register(
|
||||
SRCS ${SOURCE_FILES}
|
||||
INCLUDE_DIRS "Source"
|
||||
REQUIRES Tactility esp_lcd ST7796 BQ25896 BQ27220 TCA8418 DRV2605 PwmBacklight driver esp_adc drivers-esp
|
||||
REQUIRES Tactility esp_lcd ST7796 BQ25896 BQ27220 TCA8418 DRV2605 PwmBacklight driver esp_adc PlatformEsp32
|
||||
)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
dependencies:
|
||||
- Drivers/drivers-esp
|
||||
- Drivers/PlatformEsp32
|
||||
bindings: ./
|
||||
dts: lilygo,tlora_pager.dts
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
dependencies:
|
||||
- TactilityKernel
|
||||
- Drivers/PlatformPosix
|
||||
dts: ../placeholder.dts
|
||||
|
||||
20
Drivers/PlatformEsp32/CMakeLists.txt
Normal file
20
Drivers/PlatformEsp32/CMakeLists.txt
Normal file
@ -0,0 +1,20 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
file(GLOB_RECURSE SOURCES "Source/*.c**")
|
||||
|
||||
if (DEFINED ENV{ESP_IDF_VERSION})
|
||||
|
||||
idf_component_register(
|
||||
SRCS ${SOURCES}
|
||||
INCLUDE_DIRS "Include/"
|
||||
REQUIRES TactilityKernel driver
|
||||
)
|
||||
|
||||
else ()
|
||||
|
||||
add_library(PlatformEsp32 OBJECT)
|
||||
target_sources(PlatformEsp32 PRIVATE ${SOURCES})
|
||||
target_include_directories(PlatformEsp32 PUBLIC Include/)
|
||||
target_link_libraries(PlatformEsp32 PUBLIC TactilityKernel)
|
||||
|
||||
endif ()
|
||||
@ -1,3 +1,3 @@
|
||||
dependencies:
|
||||
- TactilityKernel
|
||||
bindings: bindings
|
||||
bindings: Bindings
|
||||
20
Drivers/PlatformPosix/CMakeLists.txt
Normal file
20
Drivers/PlatformPosix/CMakeLists.txt
Normal file
@ -0,0 +1,20 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
file(GLOB_RECURSE SOURCES "Source/*.c**")
|
||||
|
||||
if (DEFINED ENV{ESP_IDF_VERSION})
|
||||
|
||||
idf_component_register(
|
||||
SRCS ${SOURCES}
|
||||
# INCLUDE_DIRS "Include/"
|
||||
REQUIRES TactilityKernel driver
|
||||
)
|
||||
|
||||
else ()
|
||||
|
||||
add_library(PlatformPosix OBJECT)
|
||||
target_sources(PlatformPosix PRIVATE ${SOURCES})
|
||||
# target_include_directories(PlatformPosix PUBLIC Include/)
|
||||
target_link_libraries(PlatformPosix PUBLIC TactilityKernel)
|
||||
|
||||
endif ()
|
||||
9
Drivers/PlatformPosix/Source/Register.cpp
Normal file
9
Drivers/PlatformPosix/Source/Register.cpp
Normal file
@ -0,0 +1,9 @@
|
||||
#include <Tactility/Driver.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
extern void register_platform_drivers() {
|
||||
/* Placeholder */
|
||||
}
|
||||
|
||||
}
|
||||
2
Drivers/PlatformPosix/devicetree.yaml
Normal file
2
Drivers/PlatformPosix/devicetree.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
dependencies:
|
||||
- TactilityKernel
|
||||
@ -1,20 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
file(GLOB_RECURSE SOURCES "source/*.c**")
|
||||
|
||||
if (DEFINED ENV{ESP_IDF_VERSION})
|
||||
|
||||
idf_component_register(
|
||||
SRCS ${SOURCES}
|
||||
INCLUDE_DIRS "include/"
|
||||
REQUIRES TactilityKernel driver
|
||||
)
|
||||
|
||||
else ()
|
||||
|
||||
add_library(drivers-esp OBJECT)
|
||||
target_sources(drivers-esp PRIVATE ${SOURCES})
|
||||
target_include_directories(drivers-esp PUBLIC include/)
|
||||
target_link_libraries(drivers-esp PUBLIC core)
|
||||
|
||||
endif ()
|
||||
@ -18,19 +18,20 @@ if (DEFINED ENV{ESP_IDF_VERSION})
|
||||
|
||||
idf_component_register(
|
||||
SRCS ${SOURCE_FILES} "${CMAKE_SOURCE_DIR}/Firmware/Generated/devicetree.c"
|
||||
REQUIRES Tactility TactilityC TactilityKernel drivers-esp ${TACTILITY_DEVICE_PROJECT}
|
||||
REQUIRES Tactility TactilityC TactilityKernel PlatformEsp32 ${TACTILITY_DEVICE_PROJECT}
|
||||
)
|
||||
|
||||
else ()
|
||||
|
||||
add_executable(FirmwareSim ${SOURCE_FILES} "${CMAKE_SOURCE_DIR}/Firmware/Generated/devicetree.c")
|
||||
target_link_libraries(FirmwareSim
|
||||
PRIVATE Tactility
|
||||
PRIVATE TactilityCore
|
||||
PRIVATE TactilityFreeRtos
|
||||
PRIVATE TactilityKernel
|
||||
PRIVATE Simulator
|
||||
PRIVATE SDL2::SDL2-static SDL2-static
|
||||
target_link_libraries(FirmwareSim PRIVATE
|
||||
Tactility
|
||||
TactilityCore
|
||||
TactilityFreeRtos
|
||||
TactilityKernel
|
||||
Simulator
|
||||
PlatformPosix
|
||||
SDL2::SDL2-static SDL2-static
|
||||
)
|
||||
|
||||
add_definitions(-D_Nullable=)
|
||||
@ -52,6 +53,7 @@ add_custom_command(
|
||||
)
|
||||
add_custom_target(Generated DEPENDS "${CMAKE_SOURCE_DIR}/Firmware/Generated/devicetree.c")
|
||||
set_source_files_properties("${CMAKE_SOURCE_DIR}/Firmware/Generated/devicetree.c" PROPERTIES GENERATED TRUE)
|
||||
set_source_files_properties("${CMAKE_SOURCE_DIR}/Firmware/Generated/devicetree.h" PROPERTIES GENERATED TRUE)
|
||||
# Update target for generated code
|
||||
target_sources(${COMPONENT_LIB} PRIVATE "${CMAKE_SOURCE_DIR}/Firmware/Generated/devicetree.c")
|
||||
target_include_directories(${COMPONENT_LIB} PRIVATE "${CMAKE_SOURCE_DIR}/Firmware/Generated")
|
||||
|
||||
@ -1,18 +1,18 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
file(GLOB_RECURSE SOURCES "source/*.c**")
|
||||
file(GLOB_RECURSE SOURCES "Source/*.c**")
|
||||
|
||||
if (DEFINED ENV{ESP_IDF_VERSION})
|
||||
|
||||
idf_component_register(
|
||||
SRCS ${SOURCES}
|
||||
INCLUDE_DIRS "include/"
|
||||
INCLUDE_DIRS "Include/"
|
||||
)
|
||||
|
||||
else ()
|
||||
|
||||
add_library(core OBJECT ${SOURCES})
|
||||
target_include_directories(core PUBLIC include/)
|
||||
target_link_libraries(core PUBLIC freertos_kernel)
|
||||
add_library(TactilityKernel OBJECT ${SOURCES})
|
||||
target_include_directories(TactilityKernel PUBLIC Include/)
|
||||
target_link_libraries(TactilityKernel PUBLIC freertos_kernel)
|
||||
|
||||
endif ()
|
||||
|
||||
@ -5,3 +5,6 @@
|
||||
#else
|
||||
#include <FreeRTOS.h>
|
||||
#endif
|
||||
|
||||
// Custom port compatibility definitins, mainly for PC compatibility
|
||||
#include "port.h"
|
||||
@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
#include <freertos/FreeRTOS.h>
|
||||
#include <freertos/event_groups.h>
|
||||
#else
|
||||
#include <FreeRTOS.h>
|
||||
#include <event_groups.h>
|
||||
#endif
|
||||
|
||||
@ -4,4 +4,5 @@
|
||||
|
||||
#ifndef ESP_PLATFORM
|
||||
#define xPortInIsrContext(x) (false)
|
||||
#define vPortAssertIfInISR()
|
||||
#endif
|
||||
@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
#include <freertos/FreeRTOS.h>
|
||||
#include <freertos/queue.h>
|
||||
#else
|
||||
#include <FreeRTOS.h>
|
||||
#include <queue.h>
|
||||
#endif
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
#include <freertos/FreeRTOS.h>
|
||||
#include <freertos/semphr.h>
|
||||
#else
|
||||
#include <FreeRTOS.h>
|
||||
#include <semphr.h>
|
||||
#endif
|
||||
@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
#include <freertos/FreeRTOS.h>
|
||||
#include <freertos/task.h>
|
||||
#else
|
||||
#include <FreeRTOS.h>
|
||||
#include <task.h>
|
||||
#endif
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
#include <freertos/FreeRTOS.h>
|
||||
#include <freertos/timers.h>
|
||||
#else
|
||||
#include <FreeRTOS.h>
|
||||
#include <timers.h>
|
||||
#endif
|
||||
@ -1,5 +1,6 @@
|
||||
#include <sys/errno.h>
|
||||
#include <vector>
|
||||
#include <cstring>
|
||||
|
||||
#include <Tactility/concurrent/Mutex.h>
|
||||
#include <Tactility/Device.h>
|
||||
@ -1 +1 @@
|
||||
bindings: bindings
|
||||
bindings: Bindings
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user