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

@ -92,7 +92,7 @@ display. */
/* Defines the minimum time that must pass between consecutive button presses
to accept a button press as a unique press rather than just a bounce. */
#define lcdMIN_TIME_BETWEEN_INTERRUPTS_MS ( 125UL / portTICK_RATE_MS )
#define lcdMIN_TIME_BETWEEN_INTERRUPTS_MS ( 125UL / portTICK_PERIOD_MS )
/* Button interrupt handlers. */
#pragma interrupt ( prvIRQ1_Handler( vect = 65, enable ) )
@ -144,17 +144,17 @@ static void prvDisplayNextString( unsigned char ucLine, char *pcString );
* lcdMIN_TIME_BETWEEN_INTERRUPTS_MS milliseconds have passed since the button
* was last pushed (for debouncing).
*/
static portBASE_TYPE prvSendCommandOnDebouncedInput( portTickType *pxTimeLastInterrupt, unsigned char ucCommand );
static portBASE_TYPE prvSendCommandOnDebouncedInput( TickType_t *pxTimeLastInterrupt, unsigned char ucCommand );
/*-----------------------------------------------------------*/
/* The queue used to pass commands from the button interrupt handlers to the
prvLCDTaskLine2() task. */
static xQueueHandle xButtonCommandQueue = NULL;
static QueueHandle_t xButtonCommandQueue = NULL;
/* The mutex used to ensure only one task writes to the display at any one
time. */
static xSemaphoreHandle xLCDMutex = NULL;
static SemaphoreHandle_t xLCDMutex = NULL;
/* The string that is scrolled up and down the first line of the display. */
static const char cDataString1[] = " http://www.FreeRTOS.org ";
@ -206,7 +206,7 @@ unsigned char ucDirection = lcdRIGHT_TO_LEFT;
for( ;; )
{
vTaskDelay( pxLCDParamaters->Speed / portTICK_RATE_MS );
vTaskDelay( pxLCDParamaters->Speed / portTICK_PERIOD_MS );
/* Write the string. */
prvDisplayNextString( pxLCDParamaters->Line, &( pxLCDParamaters->ptr_str[ usPosition ] ) );
@ -223,7 +223,7 @@ static void prvLCDTaskLine2( void *pvParameters )
struct _LCD_Params *pxLCDParamaters = ( struct _LCD_Params * ) pvParameters;
unsigned short usPosition = 0U;
unsigned char ucDirection = lcdRIGHT_TO_LEFT, ucStatus = lcdRUNNING, ucQueueData;
portTickType xDelayTicks = ( pxLCDParamaters->Speed / portTICK_RATE_MS );
TickType_t xDelayTicks = ( pxLCDParamaters->Speed / portTICK_PERIOD_MS );
for(;;)
{
@ -251,7 +251,7 @@ portTickType xDelayTicks = ( pxLCDParamaters->Speed / portTICK_RATE_MS );
if( ucStatus == lcdRUNNING )
{
xDelayTicks = ( pxLCDParamaters->Speed / portTICK_RATE_MS );
xDelayTicks = ( pxLCDParamaters->Speed / portTICK_PERIOD_MS );
}
else
{
@ -372,10 +372,10 @@ static char cSingleLine[ lcdSTRING_LEN + 1 ];
}
/*-----------------------------------------------------------*/
static portBASE_TYPE prvSendCommandOnDebouncedInput( portTickType *pxTimeLastInterrupt, unsigned char ucCommand )
static portBASE_TYPE prvSendCommandOnDebouncedInput( TickType_t *pxTimeLastInterrupt, unsigned char ucCommand )
{
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
portTickType xCurrentTickCount;
TickType_t xCurrentTickCount;
/* Check the time now for debouncing purposes. */
xCurrentTickCount = xTaskGetTickCountFromISR();
@ -397,7 +397,7 @@ portTickType xCurrentTickCount;
static void prvIRQ1_Handler( void )
{
static portTickType xTimeLastInterrupt = 0UL;
static TickType_t xTimeLastInterrupt = 0UL;
static const unsigned char ucCommand = lcdSHIFT_BACK_COMMAND;
portBASE_TYPE xHigherPriorityTaskWoken;
@ -408,7 +408,7 @@ portBASE_TYPE xHigherPriorityTaskWoken;
static void prvIRQ3_Handler(void)
{
static portTickType xTimeLastInterrupt = 0UL;
static TickType_t xTimeLastInterrupt = 0UL;
static const unsigned char ucCommand = lcdSTART_STOP_COMMAND;
portBASE_TYPE xHigherPriorityTaskWoken;
@ -419,7 +419,7 @@ portBASE_TYPE xHigherPriorityTaskWoken;
static void prvIRQ4_Handler(void)
{
static portTickType xTimeLastInterrupt = 0UL;
static TickType_t xTimeLastInterrupt = 0UL;
static const unsigned char ucCommand = lcdSHIFT_FORWARD_COMMAND;
portBASE_TYPE xHigherPriorityTaskWoken;

View file

@ -86,7 +86,7 @@
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ICLK_FREQUENCY ) /* Set in rskrx210def.h. */
#define configPERIPHERAL_CLOCK_HZ ( PCLK_FREQUENCY ) /* Set in rskrx210def.h. */
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 140 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 50 * 1024 ) )
#define configMAX_TASK_NAME_LEN ( 12 )

View file

@ -87,7 +87,7 @@
#define configQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
/* The rate at which data is sent to the queue, specified in milliseconds. */
#define mainQUEUE_SEND_FREQUENCY_MS ( 500 / portTICK_RATE_MS )
#define mainQUEUE_SEND_FREQUENCY_MS ( 500 / 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 so the send task should always find the
@ -101,7 +101,7 @@ static void prvQueueReceiveTask( void *pvParameters );
static void prvQueueSendTask( void *pvParameters );
/* The queue used by both tasks. */
static xQueueHandle xQueue = NULL;
static QueueHandle_t xQueue = NULL;
/* This variable is not used by this simple Blinky example. It is defined
purely to allow the project to link as it is used by the full build
@ -143,7 +143,7 @@ extern void HardwareSetup( void );
static void prvQueueSendTask( void *pvParameters )
{
portTickType xNextWakeTime;
TickType_t xNextWakeTime;
const unsigned long ulValueToSend = 100UL;
/* Initialise xNextWakeTime - this only needs to be done once. */
@ -230,7 +230,7 @@ void vApplicationMallocFailedHook( void )
FreeRTOSConfig.h, then this function will be called if a task overflows its
stack space. See
http://www.freertos.org/Stacks-and-stack-overflow-checking.html. */
void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
{
for( ;; );
}

View file

@ -181,13 +181,13 @@ The tasks check that the values are passed in correctly. */
/* The period at which the check timer will expire, in ms, provided no errors
have been reported by any of the standard demo tasks. ms are converted to the
equivalent in ticks using the portTICK_RATE_MS constant. */
#define mainCHECK_TIMER_PERIOD_MS ( 5000UL / portTICK_RATE_MS )
equivalent in ticks using the portTICK_PERIOD_MS constant. */
#define mainCHECK_TIMER_PERIOD_MS ( 5000UL / portTICK_PERIOD_MS )
/* The period at which the check timer will expire, in ms, if an error has been
reported in one of the standard demo tasks. ms are converted to the equivalent
in ticks using the portTICK_RATE_MS constant. */
#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )
in ticks using the portTICK_PERIOD_MS constant. */
#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )
/* A block time of zero simple means "Don't Block". */
#define mainDONT_BLOCK ( 0UL )
@ -222,7 +222,7 @@ void vApplicationIdleHook( void );
* it is possible that the stack overflow will have corrupted these - in which
* case pxCurrentTCB can be inspected to find the same information.
*/
void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName );
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );
/*
* The reg test tasks as described at the top of this file.
@ -240,7 +240,7 @@ static void prvRegTest2Implementation( void );
/*
* The check timer callback function, as described at the top of this file.
*/
static void prvCheckTimerCallback( xTimerHandle xTimer );
static void prvCheckTimerCallback( TimerHandle_t xTimer );
/*-----------------------------------------------------------*/
@ -253,7 +253,7 @@ unsigned long ulRegTest1CycleCount = 0UL, ulRegTest2CycleCount = 0UL;
/* The check timer. This uses prvCheckTimerCallback() as its callback
function. */
static xTimerHandle xCheckTimer = NULL;
static TimerHandle_t xCheckTimer = NULL;
/*-----------------------------------------------------------*/
@ -317,7 +317,7 @@ extern void HardwareSetup( void );
}
/*-----------------------------------------------------------*/
static void prvCheckTimerCallback( xTimerHandle xTimer )
static void prvCheckTimerCallback( TimerHandle_t xTimer )
{
static long lChangedTimerPeriodAlready = pdFALSE, lErrorStatus = pdPASS;
static volatile unsigned long ulLastRegTest1CycleCount = 0UL, ulLastRegTest2CycleCount = 0UL;
@ -437,7 +437,7 @@ void vApplicationMallocFailedHook( void )
/* This function is explained by the comments above its prototype at the top
of this file. */
void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
{
for( ;; );
}