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

@ -94,7 +94,7 @@
Changes from V2.0.0
+ Delay periods are now specified using variables and constants of
portTickType rather than unsigned long.
TickType_t rather than unsigned long.
*/
#include <stdlib.h>
@ -122,7 +122,7 @@ static volatile short sPollingConsumerCount = 0, sPollingProducerCount = 0;
void vStartPolledQueueTasks( unsigned portBASE_TYPE uxPriority )
{
static xQueueHandle xPolledQueue;
static QueueHandle_t xPolledQueue;
const unsigned portBASE_TYPE uxQueueSize = 10;
/* Create the queue used by the producer and consumer. */
@ -137,8 +137,8 @@ const unsigned portBASE_TYPE uxQueueSize = 10;
static void vPolledQueueProducer( void *pvParameters )
{
unsigned short usValue = 0, usLoop;
xQueueHandle *pxQueue;
const portTickType xDelay = ( portTickType ) 200 / portTICK_RATE_MS;
QueueHandle_t *pxQueue;
const TickType_t xDelay = ( TickType_t ) 200 / portTICK_PERIOD_MS;
const unsigned short usNumToProduce = 3;
const char * const pcTaskStartMsg = "Polled queue producer started.\r\n";
const char * const pcTaskErrorMsg = "Could not post on polled queue.\r\n";
@ -148,14 +148,14 @@ short sError = pdFALSE;
vPrintDisplayMessage( &pcTaskStartMsg );
/* The queue being used is passed in as the parameter. */
pxQueue = ( xQueueHandle * ) pvParameters;
pxQueue = ( QueueHandle_t * ) pvParameters;
for( ;; )
{
for( usLoop = 0; usLoop < usNumToProduce; ++usLoop )
{
/* Send an incrementing number on the queue without blocking. */
if( xQueueSendToBack( *pxQueue, ( void * ) &usValue, ( portTickType ) 0 ) != pdPASS )
if( xQueueSendToBack( *pxQueue, ( void * ) &usValue, ( TickType_t ) 0 ) != pdPASS )
{
/* We should never find the queue full - this is an error. */
vPrintDisplayMessage( &pcTaskErrorMsg );
@ -185,8 +185,8 @@ short sError = pdFALSE;
static void vPolledQueueConsumer( void *pvParameters )
{
unsigned short usData, usExpectedValue = 0;
xQueueHandle *pxQueue;
const portTickType xDelay = ( portTickType ) 200 / portTICK_RATE_MS;
QueueHandle_t *pxQueue;
const TickType_t xDelay = ( TickType_t ) 200 / portTICK_PERIOD_MS;
const char * const pcTaskStartMsg = "Polled queue consumer started.\r\n";
const char * const pcTaskErrorMsg = "Incorrect value received on polled queue.\r\n";
short sError = pdFALSE;
@ -195,14 +195,14 @@ short sError = pdFALSE;
vPrintDisplayMessage( &pcTaskStartMsg );
/* The queue being used is passed in as the parameter. */
pxQueue = ( xQueueHandle * ) pvParameters;
pxQueue = ( QueueHandle_t * ) pvParameters;
for( ;; )
{
/* Loop until the queue is empty. */
while( uxQueueMessagesWaiting( *pxQueue ) )
{
if( xQueueReceive( *pxQueue, &usData, ( portTickType ) 0 ) == pdPASS )
if( xQueueReceive( *pxQueue, &usData, ( TickType_t ) 0 ) == pdPASS )
{
if( usData != usExpectedValue )
{