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 @@ assembly files that include this header file. */
#define configUSE_IDLE_HOOK 1
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( SystemFrequency )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
#define configMAX_PRIORITIES ( 5 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 90 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 30 * 1024 ) )

View file

@ -331,7 +331,7 @@ typedef struct mss_i2c_instance
mss_i2c_slave_wr_handler_t slave_write_handler;
/* Used to get access to and wait for completion of an I2C transaction. */
xSemaphoreHandle xI2CCompleteSemaphore;
SemaphoreHandle_t xI2CCompleteSemaphore;
} mss_i2c_instance_t;

View file

@ -129,8 +129,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, meaning the send task should always find
@ -160,16 +160,16 @@ 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 queue used by both 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 long ulGPIOState = 0UL;
@ -195,7 +195,7 @@ int main(void)
if the button is not pushed within 5000ms, as described at the top of
this file. */
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. */
@ -214,7 +214,7 @@ int main(void)
}
/*-----------------------------------------------------------*/
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
@ -256,7 +256,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = 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. */
@ -355,7 +355,7 @@ void vApplicationMallocFailedHook( void )
}
/*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
{
( void ) pcTaskName;
( void ) pxTask;

View file

@ -174,8 +174,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, meaning the send task should always find
@ -212,19 +212,19 @@ stack than most of the other tasks. */
/* The period at which the check timer will expire, in ms, provided no errors
have been reported by any of the standard demo tasks. */
#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )
#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )
/* The period at which the OLED timer will expire. Each time it expires, it's
callback function updates the OLED text. */
#define mainOLED_PERIOD_MS ( 75UL / portTICK_RATE_MS )
#define mainOLED_PERIOD_MS ( 75UL / 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. */
#define mainERROR_CHECK_TIMER_PERIOD_MS ( 500UL / portTICK_RATE_MS )
#define mainERROR_CHECK_TIMER_PERIOD_MS ( 500UL / portTICK_PERIOD_MS )
/* The LED will remain on until the button has not been pushed for a full
5000ms. */
#define mainLED_TIMER_PERIOD_MS ( 5000UL / portTICK_RATE_MS )
#define mainLED_TIMER_PERIOD_MS ( 5000UL / portTICK_PERIOD_MS )
/* A zero block time. */
#define mainDONT_BLOCK ( 0UL )
@ -245,12 +245,12 @@ static void prvQueueSendTask( void *pvParameters );
* The LED timer callback function. This does nothing but switch the red LED
* off.
*/
static void prvLEDTimerCallback( xTimerHandle xTimer );
static void prvLEDTimerCallback( TimerHandle_t xTimer );
/*
* The check timer callback function, as described at the top of this file.
*/
static void prvCheckTimerCallback( xTimerHandle xTimer );
static void prvCheckTimerCallback( TimerHandle_t xTimer );
/*
* This is not a 'standard' partest function, so the prototype is not in
@ -273,15 +273,15 @@ static void prvOLEDTask( void * pvParameters);
/*-----------------------------------------------------------*/
/* The queue used by both application specific demo tasks defined in this file. */
static xQueueHandle xQueue = NULL;
static QueueHandle_t xQueue = NULL;
/* The LED software timer. This uses prvLEDTimerCallback() as it's callback
function. */
static xTimerHandle xLEDTimer = NULL;
static TimerHandle_t xLEDTimer = NULL;
/* The check timer. This uses prvCheckTimerCallback() as it's callback
function. */
static xTimerHandle xCheckTimer = NULL;
static TimerHandle_t xCheckTimer = NULL;
/* The status message that is displayed at the bottom of the "task stats" web
page, which is served by the uIP task. This will report any errors picked up
@ -357,7 +357,7 @@ int main(void)
}
/*-----------------------------------------------------------*/
static void prvCheckTimerCallback( xTimerHandle xTimer )
static void prvCheckTimerCallback( TimerHandle_t xTimer )
{
/* Check the standard demo tasks are running without error. Latch the
latest reported error in the pcStatusMessage character pointer. */
@ -420,7 +420,7 @@ static void prvCheckTimerCallback( xTimerHandle xTimer )
}
/*-----------------------------------------------------------*/
static void prvLEDTimerCallback( xTimerHandle xTimer )
static void prvLEDTimerCallback( TimerHandle_t xTimer )
{
/* The timer has expired - so no button pushes have occurred in the last
five seconds - turn the LED off. */
@ -457,7 +457,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
static void prvQueueSendTask( void *pvParameters )
{
portTickType xNextWakeTime;
TickType_t xNextWakeTime;
const unsigned long ulValueToSend = 100UL;
/* The timer command queue will have been filled when the timer test tasks
@ -512,7 +512,7 @@ static void prvOLEDTask( void * pvParameters)
{
static struct oled_data xOLEDData;
static unsigned char ucOffset1 = 0, ucOffset2 = 5;
static portTickType xLastScrollTime = 0UL;
static TickType_t xLastScrollTime = 0UL;
/* Initialise the display. */
OLED_init();
@ -580,7 +580,7 @@ void vApplicationMallocFailedHook( void )
}
/*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
{
( void ) pcTaskName;
( void ) pxTask;

View file

@ -106,7 +106,7 @@ driver to the uIP stack. */
#define uipDONT_BLOCK 0UL
/* How long to wait before attempting to connect the MAC again. */
#define uipINIT_WAIT ( 100 / portTICK_RATE_MS )
#define uipINIT_WAIT ( 100 / portTICK_PERIOD_MS )
/* Shortcut to the header within the Rx buffer. */
#define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ])
@ -136,7 +136,7 @@ static void prvEMACEventListener( unsigned long ulISREvents );
* The callback function that is assigned to both the periodic timer and the
* ARP timer.
*/
static void prvUIPTimerCallback( xTimerHandle xTimer );
static void prvUIPTimerCallback( TimerHandle_t xTimer );
/*
* Initialise the MAC hardware.
@ -158,7 +158,7 @@ clock_time_t clock_time( void );
/*-----------------------------------------------------------*/
/* The queue used to send TCP/IP events to the uIP stack. */
xQueueHandle xEMACEventQueue = NULL;
QueueHandle_t xEMACEventQueue = NULL;
/*-----------------------------------------------------------*/
@ -286,7 +286,7 @@ struct uip_eth_addr xAddr;
static void prvInitialise_uIP( void )
{
uip_ipaddr_t xIPAddr;
xTimerHandle xARPTimer, xPeriodicTimer;
TimerHandle_t xARPTimer, xPeriodicTimer;
uip_init();
uip_ipaddr( &xIPAddr, configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 );
@ -301,14 +301,14 @@ xTimerHandle xARPTimer, xPeriodicTimer;
/* Create and start the uIP timers. */
xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */
( 10000UL / portTICK_RATE_MS ), /* Timer period. */
( 10000UL / portTICK_PERIOD_MS ), /* Timer period. */
pdTRUE, /* Autor-reload. */
( void * ) uipARP_TIMER,
prvUIPTimerCallback
);
xPeriodicTimer = xTimerCreate( "PeriodicTimer",
( 500UL / portTICK_RATE_MS ),
( 500UL / portTICK_PERIOD_MS ),
pdTRUE, /* Autor-reload. */
( void * ) uipPERIODIC_TIMER,
prvUIPTimerCallback
@ -370,7 +370,7 @@ void vEMACWrite( void )
{
const long lMaxAttempts = 10;
long lAttempt;
const portTickType xShortDelay = ( 5 / portTICK_RATE_MS );
const TickType_t xShortDelay = ( 5 / portTICK_PERIOD_MS );
/* Try to send data to the Ethernet. Keep trying for a while if data cannot
be sent immediately. Note that this will actually cause the data to be sent
@ -390,7 +390,7 @@ const portTickType xShortDelay = ( 5 / portTICK_RATE_MS );
}
/*-----------------------------------------------------------*/
static void prvUIPTimerCallback( xTimerHandle xTimer )
static void prvUIPTimerCallback( TimerHandle_t xTimer )
{
static const unsigned long ulARPTimerExpired = uipARP_TIMER_EVENT;
static const unsigned long ulPeriodicTimerExpired = uipPERIODIC_TIMER_EVENT;