Changeset 73 for ctrl/firmware/Main/SES/Core
- Timestamp:
- Jan 29, 2025, 10:08:12 AM (3 months ago)
- Location:
- ctrl/firmware/Main/SES/Core
- Files:
-
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
ctrl/firmware/Main/SES/Core/Inc/keys_task.h
r72 r73 1 1 #ifndef __KEYS_THREAD_H 2 2 #define __KEYS_THREAD_H 3 4 #include "tx_api.h"5 3 6 4 #ifdef __cplusplus … … 9 7 #endif 10 8 11 VOID scanKeysThread(ULONG initial_input);9 void keysTaskStart(void* argument) __attribute__((noreturn)); 12 10 13 11 #ifdef __cplusplus -
ctrl/firmware/Main/SES/Core/Inc/main_task.h
r72 r73 1 1 #ifndef __MAIN_THREAD_H 2 2 #define __MAIN_THREAD_H 3 4 #include "fx_api.h"5 3 6 4 #ifdef __cplusplus … … 9 7 #endif 10 8 11 void startMainThread(FX_MEDIA*);9 [[noreturn]] void mainTaskStart(void *argument); 12 10 13 11 #ifdef __cplusplus -
ctrl/firmware/Main/SES/Core/Src/keys_task.cpp
r72 r73 1 1 #include <cstdio> 2 2 3 #include "FreeRTOS.h" 4 #include "task.h" 5 3 6 #include "main.h" 4 #include "keys_t hread.h"7 #include "keys_task.h" 5 8 #include "utils.h" 6 9 7 10 static const char* const TAG = "KEYS"; 8 static uint16_t delay_ms = 2000U;11 static uint16_t delay_ms = 500U; 9 12 10 13 //------------------------------------------------------------------------------ 11 14 12 VOID scanKeysThread(ULONG initial_input)15 void keysTaskStart(void* argument) 13 16 { 14 (void) initial_input;17 (void)argument; 15 18 16 19 HAL_GPIO_WritePin(POWER_5V_EN_GPIO_Port, POWER_5V_EN_Pin, GPIO_PIN_SET); … … 31 34 //HAL_GPIO_WritePin(RX2_LED_GPIO_Port, RX2_LED_Pin, GPIO_PIN_RESET); 32 35 33 tx_thread_sleep(delay_ms);36 vTaskDelay(delay_ms); 34 37 35 38 //HAL_GPIO_WritePin(RX1_LED_GPIO_Port, RX1_LED_Pin, GPIO_PIN_SET); -
ctrl/firmware/Main/SES/Core/Src/main_task.cpp
r72 r73 2 2 #include <cstdint> 3 3 4 #include "tx_api.h" 5 #include "fx_api.h" 6 #include "main_thread.h" 4 #include "FreeRTOS.h" 5 #include "task.h" 6 7 #include "main_task.h" 7 8 #include "utils.h" 8 9 … … 12 13 static constexpr uint16_t delay_ms = 5000; 13 14 static constexpr unsigned MAX_CHARS_IN_VOLUME_NAME = 12U; 14 static CHARvolumeName[MAX_CHARS_IN_VOLUME_NAME];15 static CHAR entry[FX_MAX_LONG_NAME_LEN]; 16 UINT ret;15 static uint8_t volumeName[MAX_CHARS_IN_VOLUME_NAME]; 16 17 //UINT ret; 17 18 18 19 //------------------------------------------------------------------------------ 19 20 20 void startMainThread(FX_MEDIA* sdio_disk)21 [[noreturn]] void mainTaskStart(void *argument) 21 22 { 22 23 /* ret = fx_media_volume_get(sdio_disk, volumeName, FX_DIRECTORY_SECTOR); … … 68 69 while(1) 69 70 { 70 tx_thread_sleep(delay_ms);71 vTaskDelay(delay_ms); 71 72 72 73 //printThreadStackInfo(TAG);
Note: See TracChangeset
for help on using the changeset viewer.