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

@ -86,7 +86,7 @@
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( 96000000UL )
#define configPERIPHERAL_CLOCK_HZ ( 48000000UL )
#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

@ -89,10 +89,10 @@
#define configQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
/* The rate at which data is sent to the queue, specified in milliseconds. */
#define mainQUEUE_SEND_PERIOD_MS ( 500 / portTICK_RATE_MS )
#define mainQUEUE_SEND_PERIOD_MS ( 500 / portTICK_PERIOD_MS )
/* The period of the software timer, specified in milliseconds. */
#define mainSOFTWARE_TIMER_PERIOD_MS ( 150 / portTICK_RATE_MS )
#define mainSOFTWARE_TIMER_PERIOD_MS ( 150 / 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
@ -112,10 +112,10 @@ static void prvQueueSendTask( void *pvParameters );
/*
* The callback function used by the software timer.
*/
static void prvBlinkyTimerCallback( xTimerHandle xTimer );
static void prvBlinkyTimerCallback( TimerHandle_t xTimer );
/* 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 project. */
@ -124,7 +124,7 @@ volatile unsigned long ulHighFrequencyTickCount = 0UL;
void main(void)
{
xTimerHandle xTimer;
TimerHandle_t xTimer;
/* Turn all LEDs off. */
vParTestInitialise();
@ -173,7 +173,7 @@ 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. */
@ -215,7 +215,7 @@ unsigned long ulReceivedValue;
}
/*-----------------------------------------------------------*/
static void prvBlinkyTimerCallback( xTimerHandle xTimer )
static void prvBlinkyTimerCallback( TimerHandle_t xTimer )
{
/* The software timer does nothing but toggle an LED. */
vParTestToggleLED( mainTIMER_LED );
@ -257,7 +257,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( ;; );
}

View file

@ -189,12 +189,12 @@ stack than most of the other tasks. */
/* The rate at which mainCHECK_LED will toggle when all the tasks are running
without error. Controlled by the check timer as described at the top of this
file. */
#define mainNO_ERROR_CHECK_TIMER_PERIOD_MS ( 5000 / portTICK_RATE_MS )
#define mainNO_ERROR_CHECK_TIMER_PERIOD_MS ( 5000 / portTICK_PERIOD_MS )
/* The rate at which mainCHECK_LED will toggle when an error has been reported
by at least one task. Controlled by the check timer as described at the top of
this file. */
#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200 / portTICK_RATE_MS )
#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200 / portTICK_PERIOD_MS )
/* A block time of zero simply means "don't block". */
#define mainDONT_BLOCK ( 0UL )
@ -233,7 +233,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.
@ -251,7 +251,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 );
/*
* Contains the implementation of the WEB server.
@ -275,7 +275,7 @@ const char *pcStatusMessage = "All tasks executing without error.";
void main(void)
{
xTimerHandle xCheckTimer;
TimerHandle_t xCheckTimer;
extern void HardwareSetup( void );
/* Turn all LEDs off. */
@ -334,7 +334,7 @@ extern void HardwareSetup( void );
}
/*-----------------------------------------------------------*/
static void prvCheckTimerCallback( xTimerHandle xTimer )
static void prvCheckTimerCallback( TimerHandle_t xTimer )
{
static long lChangedTimerPeriodAlready = pdFALSE;
static unsigned long ulLastRegTest1CycleCount = 0, ulLastRegTest2CycleCount = 0;
@ -483,7 +483,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( ;; );
}

View file

@ -86,7 +86,7 @@
/*-----------------------------------------------------------*/
/* 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 ])
@ -119,7 +119,7 @@ static void prvInitialise_uIP( void );
* 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 );
/*
* Port functions required by the uIP stack.
@ -129,7 +129,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;
/*-----------------------------------------------------------*/
@ -238,7 +238,7 @@ unsigned long ulUIP_Events = 0UL;
static void prvInitialise_uIP( void )
{
xTimerHandle xARPTimer, xPeriodicTimer;
TimerHandle_t xARPTimer, xPeriodicTimer;
uip_ipaddr_t xIPAddr;
const unsigned long ul_uIPEventQueueLength = 10UL;
@ -256,14 +256,14 @@ const unsigned long ul_uIPEventQueueLength = 10UL;
/* 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",
( 50 / portTICK_RATE_MS ),
( 50 / portTICK_PERIOD_MS ),
pdTRUE, /* Autor-reload. */
( void * ) uipPERIODIC_TIMER,
prvUIPTimerCallback
@ -277,7 +277,7 @@ const unsigned long ul_uIPEventQueueLength = 10UL;
}
/*-----------------------------------------------------------*/
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;

View file

@ -76,7 +76,7 @@
#include "net/uip.h"
/* The time to wait between attempts to obtain a free buffer. */
#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_RATE_MS )
#define emacBUFFER_WAIT_DELAY_ms ( 3 / portTICK_PERIOD_MS )
/* The number of times emacBUFFER_WAIT_DELAY_ms should be waited before giving
up on attempting to obtain a free buffer all together. */
@ -93,7 +93,7 @@ more than two. */
#define emacNUM_BUFFERS ( emacNUM_RX_DESCRIPTORS + emacNUM_TX_BUFFERS )
/* The time to wait for the Tx descriptor to become free. */
#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_RATE_MS )
#define emacTX_WAIT_DELAY_ms ( 10 / portTICK_PERIOD_MS )
/* The total number of times to wait emacTX_WAIT_DELAY_ms for the Tx descriptor to
become free. */
@ -501,12 +501,12 @@ static void prvResetMAC( void )
{
/* Ensure the EtherC and EDMAC are enabled. */
SYSTEM.MSTPCRB.BIT.MSTPB15 = 0;
vTaskDelay( 100 / portTICK_RATE_MS );
vTaskDelay( 100 / portTICK_PERIOD_MS );
EDMAC.EDMR.BIT.SWR = 1;
/* Crude wait for reset to complete. */
vTaskDelay( 500 / portTICK_RATE_MS );
vTaskDelay( 500 / portTICK_PERIOD_MS );
}
/*-----------------------------------------------------------*/
@ -549,7 +549,7 @@ void vEMAC_ISR_Handler( void )
{
unsigned long ul = EDMAC.EESR.LONG;
long lHigherPriorityTaskWoken = pdFALSE;
extern xQueueHandle xEMACEventQueue;
extern QueueHandle_t xEMACEventQueue;
const unsigned long ulRxEvent = uipETHERNET_RX_EVENT;
/* Has a Tx end occurred? */

View file

@ -98,7 +98,7 @@ int16_t phy_init( void )
do
{
vTaskDelay( 2 / portTICK_RATE_MS );
vTaskDelay( 2 / portTICK_PERIOD_MS );
reg = _phy_read(BASIC_MODE_CONTROL_REG);
count++;
} while (reg & 0x8000 && count < PHY_RESET_WAIT);
@ -159,7 +159,7 @@ int16_t phy_set_autonegotiate( void )
{
reg = _phy_read(BASIC_MODE_STATUS_REG);
count++;
vTaskDelay( 100 / portTICK_RATE_MS );
vTaskDelay( 100 / portTICK_PERIOD_MS );
/* Make sure we don't break out if reg just contains 0xffff. */
if( reg == 0xffff )