update for SWO - hw validation menu integrated
git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@239 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
@@ -314,26 +314,33 @@ static ErrorStatus hwValidationMenuReceiveMessage(struct HwValidationMenu* self,
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
ErrorStatus HwValidationMenu_construct(struct HwValidationMenu* self, struct IODevice* ioDevice, struct HwValidationMenuItems testItems)
|
||||
ErrorStatus HwValidationMenu_construct(struct HwValidationMenu* self, struct IODevice* ioDevice, struct HwValidationMenuItems* testItems, int taskPriority, uint16_t stackSize)
|
||||
{
|
||||
|
||||
ErrorStatus returnValue = SUCCESS;
|
||||
|
||||
self->ioDevice = ioDevice;
|
||||
|
||||
self->TaskPriority = 0;
|
||||
self->stackSize = 1024;
|
||||
|
||||
self->menuItemSelected = 0;
|
||||
|
||||
if (xTaskCreate(hwValidationMenuTask, (const char*)"HwValidationMenu", self->stackSize, self, self->TaskPriority, self->taskHandle) != pdTRUE)
|
||||
if (!self->initialized)
|
||||
{
|
||||
returnValue = ERROR;
|
||||
LOGGER_ERROR(mainLog, "Starting hw validation menu task failed");
|
||||
self->ioDevice = ioDevice;
|
||||
|
||||
self->taskPriority = taskPriority;
|
||||
self->stackSize = stackSize;
|
||||
|
||||
self->menuItemSelected = 0;
|
||||
|
||||
if (xTaskCreate(hwValidationMenuTask, (const char*)"HwValidationMenu", self->stackSize, self, self->taskPriority, &self->taskHandle) != pdTRUE)
|
||||
{
|
||||
returnValue = ERROR;
|
||||
LOGGER_ERROR(mainLog, "Starting hw validation menu task failed");
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGGER_INFO(mainLog, "hw validation menu task started");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGGER_INFO(mainLog, "hw validation menu task started");
|
||||
returnValue = ERROR;
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
@@ -346,7 +353,7 @@ static void hwValidationMenuTask(void *parameters)
|
||||
while(1)
|
||||
{
|
||||
hwValidationMenuUpdate(self);
|
||||
vTaskDelay(1);
|
||||
vTaskDelay(100);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1237,4 +1244,4 @@ static ErrorStatus hwValidationMenuReceiveMessage(struct HwValidationMenu* self,
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user