Support rename of TimerController to FreeRTOS::Timer

This commit is contained in:
Reinhold Gschweicher 2023-02-27 22:03:01 +01:00
parent 6c0488da74
commit 32fada34f4
2 changed files with 20 additions and 2 deletions

View File

@ -196,8 +196,6 @@ target_sources(infinisim PUBLIC
${InfiniTime_DIR}/src/components/fs/FS.cpp
${InfiniTime_DIR}/src/components/motor/MotorController.h
${InfiniTime_DIR}/src/components/motor/MotorController.cpp
${InfiniTime_DIR}/src/components/timer/TimerController.h
${InfiniTime_DIR}/src/components/timer/TimerController.cpp
${InfiniTime_DIR}/src/drivers/PinMap.h
${InfiniTime_DIR}/src/drivers/Spi.h
${InfiniTime_DIR}/src/drivers/Spi.cpp
@ -216,6 +214,19 @@ target_sources(infinisim PUBLIC
${InfiniTime_DIR}/src/displayapp/InfiniTimeTheme.h
)
if(EXISTS ${InfiniTime_DIR}/src/wrappers/FreeRTOS/Timer.h)
target_sources(infinisim PUBLIC
${InfiniTime_DIR}/src/wrappers/FreeRTOS/Timer.h
${InfiniTime_DIR}/src/wrappers/FreeRTOS/Timer.cpp
)
else()
target_compile_definitions(infinisim PUBLIC INFINITIME_TIMERCONTROLLER)
target_sources(infinisim PUBLIC
${InfiniTime_DIR}/src/components/timer/TimerController.h
${InfiniTime_DIR}/src/components/timer/TimerController.cpp
)
endif()
# littlefs
add_library(littlefs STATIC
${InfiniTime_DIR}/src/libs/littlefs/lfs_util.h

View File

@ -345,7 +345,10 @@ Pinetime::Controllers::DateTime dateTimeController {settingsController};
Pinetime::Drivers::Watchdog watchdog;
Pinetime::Controllers::NotificationManager notificationManager;
Pinetime::Controllers::MotionController motionController;
#if defined(INFINITIME_TIMERCONTROLLER)
Pinetime::Controllers::TimerController timerController;
#endif
Pinetime::Controllers::AlarmController alarmController {dateTimeController};
Pinetime::Controllers::TouchHandler touchHandler;
Pinetime::Controllers::ButtonHandler buttonHandler;
@ -362,7 +365,9 @@ Pinetime::Applications::DisplayApp displayApp(lcd,
settingsController,
motorController,
motionController,
#if defined(INFINITIME_TIMERCONTROLLER)
timerController,
#endif
alarmController,
brightnessController,
touchHandler,
@ -375,7 +380,9 @@ Pinetime::System::SystemTask systemTask(spi,
batteryController,
bleController,
dateTimeController,
#if defined(INFINITIME_TIMERCONTROLLER)
timerController,
#endif
alarmController,
watchdog,
notificationManager,