mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-01 20:03:50 -04:00
Update the demo directory to use the version 8 type naming conventions.
This commit is contained in:
parent
c6d8892b0d
commit
5a2a8fc319
639 changed files with 3127 additions and 3470 deletions
|
@ -83,7 +83,7 @@
|
|||
#define configUSE_IDLE_HOOK 1
|
||||
#define configUSE_TICK_HOOK 1
|
||||
#define configCPU_CLOCK_HZ ( 96000000UL )
|
||||
#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 ) )
|
||||
|
|
|
@ -196,22 +196,22 @@ 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. ms are converted to the
|
||||
equivalent in ticks using the portTICK_RATE_MS constant. */
|
||||
#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )
|
||||
equivalent in ticks using the portTICK_PERIOD_MS constant. */
|
||||
#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / 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 )
|
||||
|
||||
/* The LED that is turned on by pressing SW2 remains on until the button has not
|
||||
been pushed for a full 5000ms. */
|
||||
#define mainBUTTON_LED_TIMER_PERIOD_MS ( 5000UL / portTICK_RATE_MS )
|
||||
#define mainBUTTON_LED_TIMER_PERIOD_MS ( 5000UL / portTICK_PERIOD_MS )
|
||||
|
||||
/* The period at which the two simple LED flash timers will execute their
|
||||
callback functions. */
|
||||
#define mainLED1_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )
|
||||
#define mainLED2_TIMER_PERIOD_MS ( 600UL / portTICK_RATE_MS )
|
||||
#define mainLED1_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )
|
||||
#define mainLED2_TIMER_PERIOD_MS ( 600UL / portTICK_PERIOD_MS )
|
||||
|
||||
/* A block time of zero simply means "don't block". */
|
||||
#define mainDONT_BLOCK ( 0UL )
|
||||
|
@ -237,19 +237,19 @@ static void prvCreateDemoSpecificTimers( void );
|
|||
* The LED/button timer callback function. This does nothing but switch an LED
|
||||
* off.
|
||||
*/
|
||||
static void prvButtonLEDTimerCallback( xTimerHandle xTimer );
|
||||
static void prvButtonLEDTimerCallback( TimerHandle_t xTimer );
|
||||
|
||||
/*
|
||||
* The callback function used by both simple LED flash timers. Both timers use
|
||||
* the same callback, so the function parameter is used to determine which LED
|
||||
* should be flashed (effectively to determine which timer has expired).
|
||||
*/
|
||||
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 );
|
||||
|
||||
/*
|
||||
* Contains the implementation of the web server.
|
||||
|
@ -260,15 +260,15 @@ extern void vuIP_Task( void *pvParameters );
|
|||
|
||||
/* The LED/Button software timer. This uses prvButtonLEDTimerCallback() as it's
|
||||
callback function. */
|
||||
static xTimerHandle xLEDButtonTimer = NULL;
|
||||
static TimerHandle_t xLEDButtonTimer = NULL;
|
||||
|
||||
/* The check timer. This uses prvCheckTimerCallback() as its callback
|
||||
function. */
|
||||
static xTimerHandle xCheckTimer = NULL;
|
||||
static TimerHandle_t xCheckTimer = NULL;
|
||||
|
||||
/* LED timers - these simply flash LEDs, each using a different frequency. Both
|
||||
use the same prvLEDTimerCallback() callback function. */
|
||||
static xTimerHandle xLED1Timer = NULL, xLED2Timer = NULL;
|
||||
static TimerHandle_t xLED1Timer = NULL, xLED2Timer = NULL;
|
||||
|
||||
/* If an error is detected in a standard demo task, then pcStatusMessage will
|
||||
be set to point to a string that identifies the offending task. This is just
|
||||
|
@ -324,7 +324,7 @@ void main( void )
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvCheckTimerCallback( xTimerHandle xTimer )
|
||||
static void prvCheckTimerCallback( TimerHandle_t xTimer )
|
||||
{
|
||||
static long lChangedTimerPeriodAlready = pdFALSE;
|
||||
|
||||
|
@ -411,7 +411,7 @@ static long lChangedTimerPeriodAlready = pdFALSE;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvButtonLEDTimerCallback( xTimerHandle xTimer )
|
||||
static void prvButtonLEDTimerCallback( TimerHandle_t xTimer )
|
||||
{
|
||||
/* The timer has expired - so no button pushes have occurred in the last
|
||||
five seconds - turn the LED off. */
|
||||
|
@ -419,7 +419,7 @@ static void prvButtonLEDTimerCallback( xTimerHandle xTimer )
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvLEDTimerCallback( xTimerHandle xTimer )
|
||||
static void prvLEDTimerCallback( TimerHandle_t xTimer )
|
||||
{
|
||||
unsigned long ulLED;
|
||||
|
||||
|
@ -535,7 +535,7 @@ void vApplicationMallocFailedHook( void )
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )
|
||||
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
|
||||
{
|
||||
( void ) pcTaskName;
|
||||
( void ) pxTask;
|
||||
|
|
|
@ -128,12 +128,12 @@
|
|||
#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 LED will remain on until the button has not been pushed for a full
|
||||
5000ms. */
|
||||
#define mainBUTTON_LED_TIMER_PERIOD_MS ( 5000UL / portTICK_RATE_MS )
|
||||
#define mainBUTTON_LED_TIMER_PERIOD_MS ( 5000UL / 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
|
||||
|
@ -171,16 +171,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 prvButtonLEDTimerCallback( xTimerHandle xTimer );
|
||||
static void prvButtonLEDTimerCallback( TimerHandle_t xTimer );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* The queue used by both tasks. */
|
||||
static xQueueHandle xQueue = NULL;
|
||||
static QueueHandle_t xQueue = NULL;
|
||||
|
||||
/* The LED software timer. This uses prvButtonLEDTimerCallback() as its callback
|
||||
function. */
|
||||
static xTimerHandle xButtonLEDTimer = NULL;
|
||||
static TimerHandle_t xButtonLEDTimer = NULL;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -222,7 +222,7 @@ void main( void )
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvButtonLEDTimerCallback( xTimerHandle xTimer )
|
||||
static void prvButtonLEDTimerCallback( TimerHandle_t xTimer )
|
||||
{
|
||||
/* The timer has expired - so no button pushes have occurred in the last
|
||||
five seconds - turn the LED off. */
|
||||
|
@ -259,7 +259,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. */
|
||||
|
@ -340,7 +340,7 @@ void vApplicationMallocFailedHook( void )
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )
|
||||
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
|
||||
{
|
||||
( void ) pcTaskName;
|
||||
( void ) pxTask;
|
||||
|
|
|
@ -122,7 +122,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.
|
||||
|
@ -132,7 +132,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;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -259,7 +259,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 );
|
||||
|
@ -274,14 +274,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
|
||||
|
@ -299,7 +299,7 @@ xTimerHandle xARPTimer, xPeriodicTimer;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
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;
|
||||
|
|
|
@ -78,7 +78,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. */
|
||||
|
@ -95,7 +95,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. */
|
||||
|
@ -105,7 +105,7 @@ become free. */
|
|||
#define emacTX_INTERRUPT_NO ( 76 )
|
||||
#define emacRX_INTERRUPT_NO ( 77 )
|
||||
#define emacERROR_INTERRUPT_NO ( 78 )
|
||||
#define emacLINK_DELAY ( 500 / portTICK_RATE_MS )
|
||||
#define emacLINK_DELAY ( 500 / portTICK_PERIOD_MS )
|
||||
#define emacPHY_STATUS ( 0x1F )
|
||||
#define emacPHY_DUPLEX_STATUS ( 4 << 2 )
|
||||
#define emacPHY_SPEED_STATUS ( 1 << 2 )
|
||||
|
@ -555,7 +555,7 @@ void vEMAC_RxISRHandler( void )
|
|||
{
|
||||
const unsigned long ulRxEvent = uipETHERNET_RX_EVENT;
|
||||
long lHigherPriorityTaskWoken = pdFALSE;
|
||||
extern xQueueHandle xEMACEventQueue;
|
||||
extern QueueHandle_t xEMACEventQueue;
|
||||
|
||||
/* Clear the interrupt. */
|
||||
ENET_EIR = ENET_EIR_RXF_MASK;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue