Добавлены некоторые IO и изменены стеки задач

This commit is contained in:
cfif 2026-07-23 15:03:05 +03:00
parent 56d32fede5
commit fce6e67201
2 changed files with 16 additions and 3 deletions

View File

@ -651,7 +651,14 @@ typedef struct {
uint16_t bufWriteFlashCount;
uint32_t bufWriteFlashAdr;
tStaticThreadBlock(384) T_can_Listener_XCP;
struct {
osThreadId_t id;
uint32_t stack[384];
StaticTask_t controlBlock;
osThreadAttr_t attr;
} thread_Listener_XCP;
// tStaticThreadBlock(384) T_can_Listener_XCP;
// tStaticThreadBlock(512) T_can_Listener_Dto_Stim_XCP;
// tStaticThreadBlock(512) T_can_Listener_Dto_Daq_10_XCP;
// tStaticThreadBlock(512) T_can_Listener_Dto_Daq_100_XCP;

View File

@ -134,7 +134,9 @@ void CanSerialPortFrameXcpInit(
env->access = osMutexNew(NULL);
InitThreadBlock(env->T_can_Listener_XCP, "CanListenerXCP", osPriorityNormal);
// InitThreadBlock(env->T_can_Listener_XCP, "CanListenerXCP", osPriorityNormal);
InitThreadAtrStatic(&env->thread_Listener_XCP.attr, "CanListenerXCP", env->thread_Listener_XCP.controlBlock, env->thread_Listener_XCP.stack,
osPriorityNormal);
}
static void FREE_DAQ(tCanSerialPortFrameXCP *env) {
@ -1904,6 +1906,10 @@ _Noreturn void CanXcpProcessing_ListenerTask(tCanSerialPortFrameXCP *env) {
}
void CanXcpProcessing_Listener_Start(tCanSerialPortFrameXCP *env) {
ThreadBlock_Start(env->T_can_Listener_XCP, env, CanXcpProcessing_ListenerTask);
// ThreadBlock_Start(env->T_can_Listener_XCP, env, CanXcpProcessing_ListenerTask);
if (!env->thread_Listener_XCP.id) {
env->thread_Listener_XCP.id = osThreadNew((osThreadFunc_t) (CanXcpProcessing_ListenerTask), (void *) (env), &env->thread_Listener_XCP.attr);
}
// CanXcpProcessing_Service_Start(env);
}