mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-04-21 02:45:07 +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(TactilityCore)
|
||||||
add_subdirectory(TactilityFreeRtos)
|
add_subdirectory(TactilityFreeRtos)
|
||||||
add_subdirectory(TactilityKernel)
|
add_subdirectory(TactilityKernel)
|
||||||
|
add_subdirectory(Drivers/PlatformPosix)
|
||||||
add_subdirectory(Devices/simulator)
|
add_subdirectory(Devices/simulator)
|
||||||
add_subdirectory(Libraries/cJSON)
|
add_subdirectory(Libraries/cJSON)
|
||||||
add_subdirectory(Libraries/lv_screenshot)
|
add_subdirectory(Libraries/lv_screenshot)
|
||||||
|
|||||||
@ -3,5 +3,5 @@ file(GLOB_RECURSE SOURCE_FILES Source/*.c*)
|
|||||||
idf_component_register(
|
idf_component_register(
|
||||||
SRCS ${SOURCE_FILES}
|
SRCS ${SOURCE_FILES}
|
||||||
INCLUDE_DIRS "Source"
|
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:
|
dependencies:
|
||||||
- Drivers/drivers-esp
|
- Drivers/PlatformEsp32
|
||||||
bindings: ./
|
bindings: ./
|
||||||
dts: lilygo,tlora_pager.dts
|
dts: lilygo,tlora_pager.dts
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- TactilityKernel
|
- TactilityKernel
|
||||||
|
- Drivers/PlatformPosix
|
||||||
dts: ../placeholder.dts
|
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:
|
dependencies:
|
||||||
- TactilityKernel
|
- 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(
|
idf_component_register(
|
||||||
SRCS ${SOURCE_FILES} "${CMAKE_SOURCE_DIR}/Firmware/Generated/devicetree.c"
|
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 ()
|
else ()
|
||||||
|
|
||||||
add_executable(FirmwareSim ${SOURCE_FILES} "${CMAKE_SOURCE_DIR}/Firmware/Generated/devicetree.c")
|
add_executable(FirmwareSim ${SOURCE_FILES} "${CMAKE_SOURCE_DIR}/Firmware/Generated/devicetree.c")
|
||||||
target_link_libraries(FirmwareSim
|
target_link_libraries(FirmwareSim PRIVATE
|
||||||
PRIVATE Tactility
|
Tactility
|
||||||
PRIVATE TactilityCore
|
TactilityCore
|
||||||
PRIVATE TactilityFreeRtos
|
TactilityFreeRtos
|
||||||
PRIVATE TactilityKernel
|
TactilityKernel
|
||||||
PRIVATE Simulator
|
Simulator
|
||||||
PRIVATE SDL2::SDL2-static SDL2-static
|
PlatformPosix
|
||||||
|
SDL2::SDL2-static SDL2-static
|
||||||
)
|
)
|
||||||
|
|
||||||
add_definitions(-D_Nullable=)
|
add_definitions(-D_Nullable=)
|
||||||
@ -52,6 +53,7 @@ add_custom_command(
|
|||||||
)
|
)
|
||||||
add_custom_target(Generated DEPENDS "${CMAKE_SOURCE_DIR}/Firmware/Generated/devicetree.c")
|
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.c" PROPERTIES GENERATED TRUE)
|
||||||
|
set_source_files_properties("${CMAKE_SOURCE_DIR}/Firmware/Generated/devicetree.h" PROPERTIES GENERATED TRUE)
|
||||||
# Update target for generated code
|
# Update target for generated code
|
||||||
target_sources(${COMPONENT_LIB} PRIVATE "${CMAKE_SOURCE_DIR}/Firmware/Generated/devicetree.c")
|
target_sources(${COMPONENT_LIB} PRIVATE "${CMAKE_SOURCE_DIR}/Firmware/Generated/devicetree.c")
|
||||||
target_include_directories(${COMPONENT_LIB} PRIVATE "${CMAKE_SOURCE_DIR}/Firmware/Generated")
|
target_include_directories(${COMPONENT_LIB} PRIVATE "${CMAKE_SOURCE_DIR}/Firmware/Generated")
|
||||||
|
|||||||
@ -1,18 +1,18 @@
|
|||||||
cmake_minimum_required(VERSION 3.20)
|
cmake_minimum_required(VERSION 3.20)
|
||||||
|
|
||||||
file(GLOB_RECURSE SOURCES "source/*.c**")
|
file(GLOB_RECURSE SOURCES "Source/*.c**")
|
||||||
|
|
||||||
if (DEFINED ENV{ESP_IDF_VERSION})
|
if (DEFINED ENV{ESP_IDF_VERSION})
|
||||||
|
|
||||||
idf_component_register(
|
idf_component_register(
|
||||||
SRCS ${SOURCES}
|
SRCS ${SOURCES}
|
||||||
INCLUDE_DIRS "include/"
|
INCLUDE_DIRS "Include/"
|
||||||
)
|
)
|
||||||
|
|
||||||
else ()
|
else ()
|
||||||
|
|
||||||
add_library(core OBJECT ${SOURCES})
|
add_library(TactilityKernel OBJECT ${SOURCES})
|
||||||
target_include_directories(core PUBLIC include/)
|
target_include_directories(TactilityKernel PUBLIC Include/)
|
||||||
target_link_libraries(core PUBLIC freertos_kernel)
|
target_link_libraries(TactilityKernel PUBLIC freertos_kernel)
|
||||||
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|||||||
@ -5,3 +5,6 @@
|
|||||||
#else
|
#else
|
||||||
#include <FreeRTOS.h>
|
#include <FreeRTOS.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Custom port compatibility definitins, mainly for PC compatibility
|
||||||
|
#include "port.h"
|
||||||
@ -1,10 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "FreeRTOS.h"
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM
|
#ifdef ESP_PLATFORM
|
||||||
#include <freertos/FreeRTOS.h>
|
|
||||||
#include <freertos/event_groups.h>
|
#include <freertos/event_groups.h>
|
||||||
#else
|
#else
|
||||||
#include <FreeRTOS.h>
|
|
||||||
#include <event_groups.h>
|
#include <event_groups.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -4,4 +4,5 @@
|
|||||||
|
|
||||||
#ifndef ESP_PLATFORM
|
#ifndef ESP_PLATFORM
|
||||||
#define xPortInIsrContext(x) (false)
|
#define xPortInIsrContext(x) (false)
|
||||||
|
#define vPortAssertIfInISR()
|
||||||
#endif
|
#endif
|
||||||
@ -1,10 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "FreeRTOS.h"
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM
|
#ifdef ESP_PLATFORM
|
||||||
#include <freertos/FreeRTOS.h>
|
|
||||||
#include <freertos/queue.h>
|
#include <freertos/queue.h>
|
||||||
#else
|
#else
|
||||||
#include <FreeRTOS.h>
|
|
||||||
#include <queue.h>
|
#include <queue.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1,9 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "FreeRTOS.h"
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM
|
#ifdef ESP_PLATFORM
|
||||||
#include <freertos/FreeRTOS.h>
|
|
||||||
#include <freertos/semphr.h>
|
#include <freertos/semphr.h>
|
||||||
#else
|
#else
|
||||||
#include <FreeRTOS.h>
|
|
||||||
#include <semphr.h>
|
#include <semphr.h>
|
||||||
#endif
|
#endif
|
||||||
@ -1,10 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "FreeRTOS.h"
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM
|
#ifdef ESP_PLATFORM
|
||||||
#include <freertos/FreeRTOS.h>
|
|
||||||
#include <freertos/task.h>
|
#include <freertos/task.h>
|
||||||
#else
|
#else
|
||||||
#include <FreeRTOS.h>
|
|
||||||
#include <task.h>
|
#include <task.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1,9 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "FreeRTOS.h"
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM
|
#ifdef ESP_PLATFORM
|
||||||
#include <freertos/FreeRTOS.h>
|
|
||||||
#include <freertos/timers.h>
|
#include <freertos/timers.h>
|
||||||
#else
|
#else
|
||||||
#include <FreeRTOS.h>
|
|
||||||
#include <timers.h>
|
#include <timers.h>
|
||||||
#endif
|
#endif
|
||||||
@ -1,5 +1,6 @@
|
|||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
#include <Tactility/concurrent/Mutex.h>
|
#include <Tactility/concurrent/Mutex.h>
|
||||||
#include <Tactility/Device.h>
|
#include <Tactility/Device.h>
|
||||||
@ -1 +1 @@
|
|||||||
bindings: bindings
|
bindings: Bindings
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user