Update the demo directory to use the version 8 type naming conventions.

This commit is contained in:
Richard Barry 2014-02-11 12:04:59 +00:00
parent c6d8892b0d
commit 5a2a8fc319
639 changed files with 3127 additions and 3470 deletions

View file

@ -120,8 +120,8 @@ a chance of executing - this is basically achieved by reducing the number
of times the loop that takes/gives the recursive mutex executes. */
#define recmuMAX_COUNT ( 2 )
#define recmuSHORT_DELAY ( 20 )
#define recmuNO_DELAY ( ( portTickType ) 0 )
#define recmuFIVE_TICK_DELAY ( ( portTickType ) 5 )
#define recmuNO_DELAY ( ( TickType_t ) 0 )
#define recmuFIVE_TICK_DELAY ( ( TickType_t ) 5 )
/* The three tasks as described at the top of this file. */
static void prvRecursiveMutexControllingTask( void *pvParameters );
@ -129,7 +129,7 @@ static void prvRecursiveMutexBlockingTask( void *pvParameters );
static void prvRecursiveMutexPollingTask( void *pvParameters );
/* The mutex used by the demo. */
static xSemaphoreHandle xMutex;
static SemaphoreHandle_t xMutex;
/* Variables used to detect and latch errors. */
static volatile portBASE_TYPE xErrorOccurred = pdFALSE, xControllingIsSuspended = pdFALSE, xBlockingIsSuspended = pdFALSE;
@ -137,7 +137,7 @@ static volatile unsigned portBASE_TYPE uxControllingCycles = 0, uxBlockingCycles
/* Handles of the two higher priority tasks, required so they can be resumed
(unsuspended). */
static xTaskHandle xControllingTaskHandle, xBlockingTaskHandle, xPollingTaskHandle;
static TaskHandle_t xControllingTaskHandle, xBlockingTaskHandle, xPollingTaskHandle;
/*-----------------------------------------------------------*/
@ -153,7 +153,7 @@ void vStartRecursiveMutexTasks( void )
is not being used. The call to vQueueAddToRegistry() will be removed
by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is
defined to be less than 1. */
vQueueAddToRegistry( ( xQueueHandle ) xMutex, "Recursive_Mutex" );
vQueueAddToRegistry( ( QueueHandle_t ) xMutex, "Recursive_Mutex" );
if( xMutex != NULL )

View file

@ -125,7 +125,7 @@ void vFullDemoIdleFunction( void );
within this file. */
void vApplicationMallocFailedHook( void );
void vApplicationIdleHook( void );
void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );
void vApplicationTickHook( void );
/*
@ -225,7 +225,7 @@ void vApplicationIdleHook( void )
}
/*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
{
( void ) pcTaskName;
( void ) pxTask;

View file

@ -127,8 +127,8 @@
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
/* The rate at which data is sent to the queue. The 200ms value is converted
to ticks using the portTICK_RATE_MS constant. */
#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )
to ticks using the portTICK_PERIOD_MS constant. */
#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )
/* The number of items the queue can hold. This is 1 as the receive task
will remove items as they are added, meaning the send task should always find
@ -151,7 +151,7 @@ static void prvQueueSendTask( void *pvParameters );
/*-----------------------------------------------------------*/
/* The queue used by both tasks. */
static xQueueHandle xQueue = NULL;
static QueueHandle_t xQueue = NULL;
/*-----------------------------------------------------------*/
@ -188,7 +188,7 @@ void main_blinky( void )
static void prvQueueSendTask( void *pvParameters )
{
portTickType xNextWakeTime;
TickType_t xNextWakeTime;
const unsigned long ulValueToSend = 100UL;
/* Remove compiler warning in the case that configASSERT() is not

View file

@ -185,7 +185,7 @@ static char *pcStatusMessage = "OK";
/* This semaphore is created purely to test using the vSemaphoreDelete() and
semaphore tracing API functions. It has no other purpose. */
static xSemaphoreHandle xMutexToDelete = NULL;
static SemaphoreHandle_t xMutexToDelete = NULL;
/*-----------------------------------------------------------*/
@ -238,8 +238,8 @@ int main_full( void )
static void prvCheckTask( void *pvParameters )
{
portTickType xNextWakeTime;
const portTickType xCycleFrequency = 2500 / portTICK_RATE_MS;
TickType_t xNextWakeTime;
const TickType_t xCycleFrequency = 2500 / portTICK_PERIOD_MS;
/* Just to remove compiler warning. */
( void ) pvParameters;
@ -355,11 +355,11 @@ void *pvAllocated;
/* These three functions are only meant for use by trace code, and not for
direct use from application code, hence their prototypes are not in queue.h. */
extern void vQueueSetQueueNumber( xQueueHandle pxQueue, unsigned portBASE_TYPE uxQueueNumber );
extern unsigned portBASE_TYPE uxQueueGetQueueNumber( xQueueHandle pxQueue );
extern uint8_t ucQueueGetQueueType( xQueueHandle pxQueue );
extern void vTaskSetTaskNumber( xTaskHandle xTask, unsigned portBASE_TYPE uxHandle );
extern unsigned portBASE_TYPE uxTaskGetTaskNumber( xTaskHandle xTask );
extern void vQueueSetQueueNumber( QueueHandle_t pxQueue, unsigned portBASE_TYPE uxQueueNumber );
extern unsigned portBASE_TYPE uxQueueGetQueueNumber( QueueHandle_t pxQueue );
extern uint8_t ucQueueGetQueueType( QueueHandle_t pxQueue );
extern void vTaskSetTaskNumber( TaskHandle_t xTask, unsigned portBASE_TYPE uxHandle );
extern unsigned portBASE_TYPE uxTaskGetTaskNumber( TaskHandle_t xTask );
/* Sleep to reduce CPU load, but don't sleep indefinitely in case there are
tasks waiting to be terminated by the idle task. */
@ -458,11 +458,11 @@ const TickType_t xDontBlock = 0; /* This is called from the idle task so must *n
static void prvDemonstrateTaskStateAndHandleGetFunctions( void )
{
xTaskHandle xIdleTaskHandle, xTimerTaskHandle;
TaskHandle_t xIdleTaskHandle, xTimerTaskHandle;
const unsigned char ucConstTaskNumber = 0x55U;
char *pcTaskName;
static portBASE_TYPE xPerformedOneShotTests = pdFALSE;
xTaskHandle xTestTask;
TaskHandle_t xTestTask;
/* Demonstrate the use of the xTimerGetTimerDaemonTaskHandle() and
xTaskGetIdleTaskHandle() functions. Also try using the function that sets
@ -535,7 +535,7 @@ xTaskHandle xTestTask;
static void prvDemoQueueSpaceFunctions( void *pvParameters )
{
xQueueHandle xQueue = NULL;
QueueHandle_t xQueue = NULL;
const unsigned portBASE_TYPE uxQueueLength = 10;
unsigned portBASE_TYPE uxReturn, x;