Changeset 58 for ctrl/firmware/Main/SES/Core
- Timestamp:
- Dec 13, 2024, 8:38:16 AM (5 weeks ago)
- Location:
- ctrl/firmware/Main/SES/Core/Src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ctrl/firmware/Main/SES/Core/Src/keys_thread.cpp
r57 r58 1 #include <cstdio> 2 1 3 #include "main.h" 2 4 #include "keys_thread.h" 3 5 4 static uint16_t delay_ms = 500; // Must be greater than 10ms 6 static const char* const TAG = "KEYS"; 7 static uint16_t delay_ms = 2000U; 8 9 //------------------------------------------------------------------------------ 5 10 6 11 VOID scanKeysThread(ULONG initial_input) 7 12 { 8 13 (void)initial_input; 14 15 HAL_GPIO_WritePin(POWER_4V_EN_GPIO_Port, POWER_4V_EN_Pin, GPIO_PIN_SET); 16 HAL_GPIO_WritePin(POWER_5V_EN_GPIO_Port, POWER_5V_EN_Pin, GPIO_PIN_SET); 17 HAL_GPIO_WritePin(POWER_10V_EN_GPIO_Port, POWER_10V_EN_Pin, GPIO_PIN_SET); 9 18 10 19 while(1) … … 19 28 //HAL_GPIO_WritePin(RX2_LED_GPIO_Port, RX2_LED_Pin, GPIO_PIN_SET); 20 29 21 //tx_thread_sleep((TX_TIMER_TICKS_PER_SECOND * delay_ms)/1000); 30 // Calculating worse stack allocation 31 TX_THREAD* current_thread = tx_thread_identify(); 32 printf("%s: Stack size: %lu, used: %u, free: %u\n", TAG, current_thread->tx_thread_stack_size, 33 (uint8_t*)current_thread->tx_thread_stack_ptr - (uint8_t*)current_thread->tx_thread_stack_start, 34 (uint8_t*)current_thread->tx_thread_stack_end - (uint8_t*)current_thread->tx_thread_stack_ptr); 22 35 } 23 36 } 37 38 //------------------------------------------------------------------------------ -
ctrl/firmware/Main/SES/Core/Src/main_thread.cpp
r57 r58 4 4 #include "tx_api.h" 5 5 #include "fx_api.h" 6 //#include "main.h"7 6 #include "main_thread.h" 8 7 9 static constexpr uint16_t delay_ms = 500; // Must be greater than 10ms 8 9 static const char* const TAG = "MAIN"; 10 static constexpr uint16_t delay_ms = 5000; 10 11 static constexpr unsigned MAX_CHARS_IN_VOLUME_NAME = 12U; 11 12 static CHAR volumeName[MAX_CHARS_IN_VOLUME_NAME]; 12 13 static CHAR entry[FX_MAX_LONG_NAME_LEN]; 13 14 UINT ret; 15 16 //------------------------------------------------------------------------------ 14 17 15 18 void startMainThread(FX_MEDIA* sdio_disk) … … 64 67 { 65 68 tx_thread_sleep(delay_ms); 69 70 // Calculating worse stack allocation 71 TX_THREAD* current_thread = tx_thread_identify(); 72 printf("%s: Stack size: %lu, used: %u, free: %u\n", TAG, current_thread->tx_thread_stack_size, 73 (uint8_t*)current_thread->tx_thread_stack_ptr - (uint8_t*)current_thread->tx_thread_stack_start, 74 (uint8_t*)current_thread->tx_thread_stack_end - (uint8_t*)current_thread->tx_thread_stack_ptr); 75 66 76 } 67 77 }
Note: See TracChangeset
for help on using the changeset viewer.