From 004989ea57e6e42b7b7e06b4ef73f01505878b56 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Sun, 26 Sep 2021 09:25:59 +0200 Subject: [PATCH] [color] Move touch panel init to UI task This allows for the timeout checks in I2C code to work properly as they are based on SysTick IRQ, which is started by FreeRTOS when the scheduler is started. Resolves #803 --- radio/src/targets/horus/board.cpp | 4 ---- radio/src/tasks.cpp | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/radio/src/targets/horus/board.cpp b/radio/src/targets/horus/board.cpp index 3508c2c72..e83e91c82 100644 --- a/radio/src/targets/horus/board.cpp +++ b/radio/src/targets/horus/board.cpp @@ -246,10 +246,6 @@ void boardInit() DBGMCU_APB1PeriphConfig(DBGMCU_IWDG_STOP|DBGMCU_TIM1_STOP|DBGMCU_TIM2_STOP|DBGMCU_TIM3_STOP|DBGMCU_TIM4_STOP|DBGMCU_TIM5_STOP|DBGMCU_TIM6_STOP|DBGMCU_TIM7_STOP|DBGMCU_TIM8_STOP|DBGMCU_TIM9_STOP|DBGMCU_TIM10_STOP|DBGMCU_TIM11_STOP|DBGMCU_TIM12_STOP|DBGMCU_TIM13_STOP|DBGMCU_TIM14_STOP, ENABLE); #endif -#if defined(HARDWARE_TOUCH) - touchPanelInit(); -#endif - ledInit(); #if defined(USB_CHARGER) diff --git a/radio/src/tasks.cpp b/radio/src/tasks.cpp index 735737e22..b3142e89b 100644 --- a/radio/src/tasks.cpp +++ b/radio/src/tasks.cpp @@ -224,6 +224,10 @@ TASK_FUNCTION(menusTask) } #endif +#if defined(HARDWARE_TOUCH) && !defined(PCBFLYSKY) && !defined(SIMU) + touchPanelInit(); +#endif + opentxInit(); #if defined(PWR_BUTTON_PRESS)