xTaskGetTaskHandle() changed to xTaskGetHandle().

Tidy up CEC1302 demo.
Ensure bit 0 of the task address is clear when setting up stack of initial Cortex-M3/4/7 stacks (for strict compliance, although not practically necessary).
vTaskGetTaskInfo() changed to vTaskGetInfo() - with a macro added for backward compatibility.
This commit is contained in:
Richard Barry 2016-04-15 11:48:07 +00:00
parent ee5386756d
commit 255145bde1
30 changed files with 179 additions and 112 deletions

View file

@ -145,7 +145,7 @@ functions anyway. */
#define INCLUDE_xTaskGetSchedulerState 1
#define INCLUDE_xTimerGetTimerDaemonTaskHandle 1
#define INCLUDE_xTaskGetIdleTaskHandle 1
#define INCLUDE_xTaskGetTaskHandle 1
#define INCLUDE_xTaskGetHandle 1
#define INCLUDE_eTaskGetState 1
#define INCLUDE_xSemaphoreGetMutexHolder 1
#define INCLUDE_xTimerPendFunctionCall 1

View file

@ -599,12 +599,12 @@ extern StackType_t uxTimerTaskStack[];
/* Check the same handle is obtained using the idle task's name. First try
with the wrong name, then the right name. */
if( xTaskGetTaskHandle( "Idle" ) == xIdleTaskHandle )
if( xTaskGetHandle( "Idle" ) == xIdleTaskHandle )
{
pcStatusMessage = "Error: Returned handle for name Idle was incorrect";
}
if( xTaskGetTaskHandle( "IDLE" ) != xIdleTaskHandle )
if( xTaskGetHandle( "IDLE" ) != xIdleTaskHandle )
{
pcStatusMessage = "Error: Returned handle for name Idle was incorrect";
}
@ -616,7 +616,7 @@ extern StackType_t uxTimerTaskStack[];
pcStatusMessage = "Error: Returned timer task handle was incorrect";
}
if( xTaskGetTaskHandle( "Tmr Svc" ) != xTimerTaskHandle )
if( xTaskGetHandle( "Tmr Svc" ) != xTimerTaskHandle )
{
pcStatusMessage = "Error: Returned handle for name Tmr Svc was incorrect";
}
@ -633,20 +633,20 @@ extern StackType_t uxTimerTaskStack[];
pcStatusMessage = "Error: Returned timer task state was incorrect";
}
/* Also with the vTaskGetTaskInfo() function. */
vTaskGetTaskInfo( xTimerTaskHandle, /* The task being queried. */
/* Also with the vTaskGetInfo() function. */
vTaskGetInfo( xTimerTaskHandle, /* The task being queried. */
&xTaskInfo, /* The structure into which information on the task will be written. */
pdTRUE, /* Include the task's high watermark in the structure. */
eInvalid ); /* Include the task state in the structure. */
/* Check the information returned by vTaskGetTaskInfo() is as expected. */
/* Check the information returned by vTaskGetInfo() is as expected. */
if( ( xTaskInfo.eCurrentState != eBlocked ) ||
( strcmp( xTaskInfo.pcTaskName, "Tmr Svc" ) != 0 ) ||
( xTaskInfo.uxCurrentPriority != configTIMER_TASK_PRIORITY ) ||
( xTaskInfo.pxStackBase != uxTimerTaskStack ) ||
( xTaskInfo.xHandle != xTimerTaskHandle ) )
{
pcStatusMessage = "Error: vTaskGetTaskInfo() returned incorrect information about the timer task";
pcStatusMessage = "Error: vTaskGetInfo() returned incorrect information about the timer task";
}
/* Other tests that should only be performed once follow. The test task