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

@ -111,8 +111,8 @@
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
/* The rate at which data is sent to the queue, specified in milliseconds, and
converted to ticks using the portTICK_RATE_MS constant. */
#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )
converted 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 because it has the higher priority, meaning
@ -120,7 +120,7 @@ the send task should always find the queue empty. */
#define mainQUEUE_LENGTH ( 1 )
/* A block time of 0 simply means, "don't block". */
#define mainDONT_BLOCK ( portTickType ) 0
#define mainDONT_BLOCK ( TickType_t ) 0
/* The following constants describe the timer instance used in this application.
They are defined here such that a user can easily change all the needed parameters
@ -141,16 +141,16 @@ static void prvQueueSendTask( void *pvParameters );
* The LED timer callback function. This does nothing but increment the
* ulCallback variable each time it executes.
*/
static void vSoftwareTimerCallback( xTimerHandle xTimer );
static void vSoftwareTimerCallback( TimerHandle_t xTimer );
/*-----------------------------------------------------------*/
/* The queue used by the queue send and queue receive tasks. */
static xQueueHandle xQueue = NULL;
static QueueHandle_t xQueue = NULL;
/* The LED software timer. This uses vSoftwareTimerCallback() as its callback
function. */
static xTimerHandle xExampleSoftwareTimer = NULL;
static TimerHandle_t xExampleSoftwareTimer = NULL;
/*-----------------------------------------------------------*/
@ -192,7 +192,7 @@ int main( void )
/* Create the software timer */
xExampleSoftwareTimer = xTimerCreate( "SoftwareTimer", /* A text name, purely to help debugging. */
( 5000 / portTICK_RATE_MS ),/* The timer period, in this case 5000ms (5s). */
( 5000 / portTICK_PERIOD_MS ),/* The timer period, in this case 5000ms (5s). */
pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */
( void * ) 0, /* The ID is not used, so can be set to anything. */
vSoftwareTimerCallback /* The callback function that switches the LED off. */
@ -214,7 +214,7 @@ int main( void )
/*-----------------------------------------------------------*/
/* The callback is executed when the software timer expires. */
static void vSoftwareTimerCallback( xTimerHandle xTimer )
static void vSoftwareTimerCallback( TimerHandle_t xTimer )
{
/* Just increment the ulCallbac variable. */
ulCallback++;
@ -223,7 +223,7 @@ static void vSoftwareTimerCallback( xTimerHandle xTimer )
static void prvQueueSendTask( void *pvParameters )
{
portTickType xNextWakeTime;
TickType_t xNextWakeTime;
const unsigned long ulValueToSend = 100UL;
/* Initialise xNextWakeTime - this only needs to be done once. */
@ -284,7 +284,7 @@ void vApplicationMallocFailedHook( void )
}
/*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )
void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName )
{
( void ) pcTaskName;
( void ) pxTask;

View file

@ -91,7 +91,7 @@
#define configUSE_IDLE_HOOK 1
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( XPAR_MICROBLAZE_CORE_CLOCK_FREQ_HZ ) /* Not actually used in this demo as the timer is set up in main() and uses the peripheral clock, not the CPU clock. */
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
#define configMAX_PRIORITIES ( 7 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 64 * 1024 ) )
#define configMAX_TASK_NAME_LEN ( 10 )

View file

@ -128,8 +128,8 @@
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
/* The rate at which data is sent to the queue, specified in milliseconds, and
converted to ticks using the portTICK_RATE_MS constant. */
#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )
converted 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 because it has the higher priority, meaning
@ -143,7 +143,7 @@ the send task should always find the queue empty. */
#define mainTIMER_CONTROLLED_LED 0x02UL
/* A block time of 0 simply means, "don't block". */
#define mainDONT_BLOCK ( portTickType ) 0
#define mainDONT_BLOCK ( TickType_t ) 0
/*-----------------------------------------------------------*/
@ -162,7 +162,7 @@ static void prvQueueSendTask( void *pvParameters );
* The LED timer callback function. This does nothing but switch off the
* LED defined by the mainTIMER_CONTROLLED_LED constant.
*/
static void vLEDTimerCallback( xTimerHandle xTimer );
static void vLEDTimerCallback( TimerHandle_t xTimer );
/*
* The handler executed each time a button interrupt is generated. This ensures
@ -175,11 +175,11 @@ static void prvButtonInputInterruptHandler( void *pvUnused );
/*-----------------------------------------------------------*/
/* The queue used by the queue send and queue receive tasks. */
static xQueueHandle xQueue = NULL;
static QueueHandle_t xQueue = NULL;
/* The LED software timer. This uses vLEDTimerCallback() as its callback
function. */
static xTimerHandle xLEDTimer = NULL;
static TimerHandle_t xLEDTimer = NULL;
/* Maintains the current LED output state. */
static volatile unsigned char ucGPIOState = 0U;
@ -226,7 +226,7 @@ int main( void )
this file. The timer is not actually started until a button interrupt is
pushed, as it is not until that point that the LED is turned on. */
xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */
( 5000 / portTICK_RATE_MS ),/* The timer period, in this case 5000ms (5s). */
( 5000 / portTICK_PERIOD_MS ),/* The timer period, in this case 5000ms (5s). */
pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */
( void * ) 0, /* The ID is not used, so can be set to anything. */
vLEDTimerCallback /* The callback function that switches the LED off. */
@ -245,7 +245,7 @@ int main( void )
/*-----------------------------------------------------------*/
/* The callback is executed when the LED timer expires. */
static void vLEDTimerCallback( xTimerHandle xTimer )
static void vLEDTimerCallback( TimerHandle_t xTimer )
{
/* The timer has expired - so no button pushes have occurred in the last
five seconds - turn the LED off. NOTE - accessing the LED port should use
@ -286,7 +286,7 @@ long lHigherPriorityTaskWoken = pdFALSE;
static void prvQueueSendTask( void *pvParameters )
{
portTickType xNextWakeTime;
TickType_t xNextWakeTime;
const unsigned long ulValueToSend = 100UL;
/* Initialise xNextWakeTime - this only needs to be done once. */
@ -410,7 +410,7 @@ void vApplicationMallocFailedHook( void )
}
/*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
{
( void ) pcTaskName;
( void ) pxTask;

View file

@ -169,15 +169,15 @@
/* The rate at which mainCHECK_LED will toggle when all the tasks are running
without error. See the description of the check timer in the comments at the
top of this file. */
#define mainNO_ERROR_CHECK_TIMER_PERIOD ( 5000 / portTICK_RATE_MS )
#define mainNO_ERROR_CHECK_TIMER_PERIOD ( 5000 / portTICK_PERIOD_MS )
/* The rate at which mainCHECK_LED will toggle when an error has been reported
by at least one task. See the description of the check timer in the comments at
the top of this file. */
#define mainERROR_CHECK_TIMER_PERIOD ( 200 / portTICK_RATE_MS )
#define mainERROR_CHECK_TIMER_PERIOD ( 200 / portTICK_PERIOD_MS )
/* A block time of zero simply means "don't block". */
#define mainDONT_BLOCK ( ( portTickType ) 0 )
#define mainDONT_BLOCK ( ( TickType_t ) 0 )
/* The LED used by the comtest tasks. See the comtest_strings.c file for more
information. In this case an invalid LED number is provided as all four
@ -208,7 +208,7 @@ extern void vRegisterTest2( void *pvParameters );
* Defines the 'check' timer functionality as described at the top of this file.
* This function is the callback function associated with the 'check' timer.
*/
static void vCheckTimerCallback( xTimerHandle xTimer );
static void vCheckTimerCallback( TimerHandle_t xTimer );
/*
* Configure the interrupt controller, LED outputs and button inputs.
@ -230,7 +230,7 @@ only the timer/counter is used directly within this file. */
static XTmrCtr xTimer0Instance;
/* The 'check' timer, as described at the top of this file. */
static xTimerHandle xCheckTimer = NULL;
static TimerHandle_t xCheckTimer = NULL;
/* Used in the run time stats calculations. */
static unsigned long ulClocksPer10thOfAMilliSecond = 0UL;
@ -309,12 +309,12 @@ int main( void )
}
/*-----------------------------------------------------------*/
static void vCheckTimerCallback( xTimerHandle xTimer )
static void vCheckTimerCallback( TimerHandle_t xTimer )
{
extern unsigned long ulRegTest1CycleCount, ulRegTest2CycleCount;
static volatile unsigned long ulLastRegTest1CycleCount = 0UL, ulLastRegTest2CycleCount = 0UL;
static long lErrorAlreadyLatched = pdFALSE;
portTickType xExecutionRate = mainNO_ERROR_CHECK_TIMER_PERIOD;
TickType_t xExecutionRate = mainNO_ERROR_CHECK_TIMER_PERIOD;
/* This is the callback function used by the 'check' timer, as described
in the comments at the top of this file. */
@ -511,7 +511,7 @@ void vApplicationMallocFailedHook( void )
}
/*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
{
( void ) pcTaskName;
( void ) pxTask;

View file

@ -91,7 +91,7 @@ This is used by the Xilinx peripheral driver API functions. */
static XUartLite xUartLiteInstance;
/* The queue used to hold received characters. */
static xQueueHandle xRxedChars;
static QueueHandle_t xRxedChars;
/*-----------------------------------------------------------*/
@ -148,7 +148,7 @@ portBASE_TYPE xStatus;
}
/*-----------------------------------------------------------*/
portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )
{
/* The port handle is not required as this driver only supports one port. */
( void ) pxPort;