mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2026-02-20 00:55:28 -05: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
|
|
@ -84,7 +84,7 @@
|
|||
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
|
||||
#define configCPU_CLOCK_HZ ( 80000000UL )
|
||||
#define configPERIPHERAL_CLOCK_HZ ( 40000000UL )
|
||||
#define configMAX_PRIORITIES ( 5UL )
|
||||
|
|
|
|||
|
|
@ -106,8 +106,8 @@ static void prvLCDClear( void );
|
|||
|
||||
/* Brief delay to permit the LCD to catch up with commands. */
|
||||
#define lcdVERY_SHORT_DELAY ( 1 )
|
||||
#define lcdSHORT_DELAY ( 8 / portTICK_RATE_MS )
|
||||
#define lcdLONG_DELAY ( 15 / portTICK_RATE_MS )
|
||||
#define lcdSHORT_DELAY ( 8 / portTICK_PERIOD_MS )
|
||||
#define lcdLONG_DELAY ( 15 / portTICK_PERIOD_MS )
|
||||
|
||||
/* LCD specific definitions. */
|
||||
#define LCD_CLEAR_DISPLAY_CMD 0x01
|
||||
|
|
@ -130,7 +130,7 @@ static void prvLCDClear( void );
|
|||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* The queue used to send messages to the LCD task. */
|
||||
xQueueHandle xLCDQueue;
|
||||
QueueHandle_t xLCDQueue;
|
||||
|
||||
/* LCD access functions. */
|
||||
static void prvLCDCommand( char cCommand );
|
||||
|
|
@ -138,7 +138,7 @@ static void prvLCDData( char cChar );
|
|||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
xQueueHandle xStartLCDTask( void )
|
||||
QueueHandle_t xStartLCDTask( void )
|
||||
{
|
||||
/* Create the queue used by the LCD task. Messages for display on the LCD
|
||||
are received via this queue. */
|
||||
|
|
|
|||
|
|
@ -68,13 +68,13 @@
|
|||
|
||||
/* Create the task that will control the LCD. Returned is a handle to the queue
|
||||
on which messages to get written to the LCD should be written. */
|
||||
xQueueHandle xStartLCDTask( void );
|
||||
QueueHandle_t xStartLCDTask( void );
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* The minimum amount of time the message should remain on the LCD without
|
||||
being overwritten. */
|
||||
portTickType xMinDisplayTime;
|
||||
TickType_t xMinDisplayTime;
|
||||
|
||||
/* A pointer to the string to be displayed. */
|
||||
char *pcMessage;
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ void vApplicationIdleHook( void )
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )
|
||||
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
|
||||
{
|
||||
( void ) pcTaskName;
|
||||
( void ) pxTask;
|
||||
|
|
|
|||
|
|
@ -121,8 +121,8 @@
|
|||
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||
|
||||
/* The rate at which data is sent to the queue. The 200ms value is converted
|
||||
to ticks using the portTICK_RATE_MS constant. */
|
||||
#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )
|
||||
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
|
||||
|
|
@ -135,8 +135,8 @@ functionality. */
|
|||
#define mainQUEUE_RECEIVE_PARAMETER ( 0x22UL )
|
||||
|
||||
/* The period of the blinky software timer. The period is specified in ms and
|
||||
converted to ticks using the portTICK_RATE_MS constant. */
|
||||
#define mainBLINKY_TIMER_PERIOD ( 50 / portTICK_RATE_MS )
|
||||
converted to ticks using the portTICK_PERIOD_MS constant. */
|
||||
#define mainBLINKY_TIMER_PERIOD ( 50 / portTICK_PERIOD_MS )
|
||||
|
||||
/* The LED used by the communicating tasks and the blinky timer respectively. */
|
||||
#define mainTASKS_LED ( 0 )
|
||||
|
|
@ -157,7 +157,7 @@ static void prvQueueSendTask( void *pvParameters );
|
|||
* The callback function for the blinky software timer, as described at the top
|
||||
* of this file.
|
||||
*/
|
||||
static void prvBlinkyTimerCallback( xTimerHandle xTimer );
|
||||
static void prvBlinkyTimerCallback( TimerHandle_t xTimer );
|
||||
|
||||
/*
|
||||
* Called by main() to create the simply blinky style application if
|
||||
|
|
@ -168,13 +168,13 @@ void main_blinky( void );
|
|||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* The queue used by both tasks. */
|
||||
static xQueueHandle xQueue = NULL;
|
||||
static QueueHandle_t xQueue = NULL;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void main_blinky( void )
|
||||
{
|
||||
xTimerHandle xTimer;
|
||||
TimerHandle_t xTimer;
|
||||
|
||||
/* Create the queue. */
|
||||
xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( unsigned long ) );
|
||||
|
|
@ -221,7 +221,7 @@ xTimerHandle xTimer;
|
|||
|
||||
static void prvQueueSendTask( void *pvParameters )
|
||||
{
|
||||
portTickType xNextWakeTime;
|
||||
TickType_t xNextWakeTime;
|
||||
const unsigned long ulValueToSend = 100UL;
|
||||
|
||||
/* Check the task parameter is as expected. */
|
||||
|
|
@ -272,7 +272,7 @@ unsigned long ulReceivedValue;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvBlinkyTimerCallback( xTimerHandle xTimer )
|
||||
static void prvBlinkyTimerCallback( TimerHandle_t xTimer )
|
||||
{
|
||||
/* This function is called when the blinky software time expires. All the
|
||||
function does is toggle the LED. LED mainTIMER_LED should therefore toggle
|
||||
|
|
|
|||
|
|
@ -151,13 +151,13 @@
|
|||
|
||||
/* The period after 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 priorities of the various demo application tasks. */
|
||||
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||
|
|
@ -207,7 +207,7 @@ is one less flash timer so the check task can use the third LED. */
|
|||
/*
|
||||
* The check timer callback function, as described at the top of this file.
|
||||
*/
|
||||
static void prvCheckTimerCallback( xTimerHandle xTimer );
|
||||
static void prvCheckTimerCallback( TimerHandle_t xTimer );
|
||||
|
||||
/*
|
||||
* It is important to ensure the high frequency timer test does not start before
|
||||
|
|
@ -216,7 +216,7 @@ static void prvCheckTimerCallback( xTimerHandle xTimer );
|
|||
* executing. A one-shot timer is used, so the callback function will only
|
||||
* execute once (unless it is manually reset/restarted).
|
||||
*/
|
||||
static void prvSetupHighFrequencyTimerTest( xTimerHandle xTimer );
|
||||
static void prvSetupHighFrequencyTimerTest( TimerHandle_t xTimer );
|
||||
|
||||
/*
|
||||
* Tasks that test the context switch mechanism by filling the processor
|
||||
|
|
@ -231,7 +231,7 @@ static void prvRegTestTask2( void *pvParameters );
|
|||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* The queue used to send messages to the LCD task. */
|
||||
static xQueueHandle xLCDQueue;
|
||||
static QueueHandle_t xLCDQueue;
|
||||
|
||||
/* Variables incremented by prvRegTestTask1() and prvRegTestTask2() respectively on
|
||||
each iteration of their function. This is used to detect either task stopping
|
||||
|
|
@ -245,7 +245,7 @@ volatile unsigned long ulRegTest1Cycles = 0, ulRegTest2Cycles = 0;
|
|||
*/
|
||||
int main_full( void )
|
||||
{
|
||||
xTimerHandle xTimer = NULL;
|
||||
TimerHandle_t xTimer = NULL;
|
||||
|
||||
/* Create the LCD task - this returns the queue to use when writing
|
||||
messages to the LCD. */
|
||||
|
|
@ -337,7 +337,7 @@ extern void vRegTest2( volatile unsigned long * );
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvCheckTimerCallback( xTimerHandle xTimer )
|
||||
static void prvCheckTimerCallback( TimerHandle_t xTimer )
|
||||
{
|
||||
static long lChangedTimerPeriodAlready = pdFALSE;
|
||||
static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;
|
||||
|
|
@ -347,7 +347,7 @@ static char cStringBuffer[ mainMAX_STRING_LENGTH ];
|
|||
|
||||
/* The count of the high frequency timer interrupts. */
|
||||
extern unsigned long ulHighFrequencyTimerInterrupts;
|
||||
static xLCDMessage xMessage = { ( 200 / portTICK_RATE_MS ), cStringBuffer };
|
||||
static xLCDMessage xMessage = { ( 200 / portTICK_PERIOD_MS ), cStringBuffer };
|
||||
|
||||
/* Check that the register test 1 task is still running. */
|
||||
if( ulLastRegTest1Value == ulRegTest1Cycles )
|
||||
|
|
@ -425,7 +425,7 @@ static xLCDMessage xMessage = { ( 200 / portTICK_RATE_MS ), cStringBuffer };
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvSetupHighFrequencyTimerTest( xTimerHandle xTimer )
|
||||
static void prvSetupHighFrequencyTimerTest( TimerHandle_t xTimer )
|
||||
{
|
||||
/* Setup the high frequency, high priority, timer test. It is setup in this
|
||||
software timer callback to ensure it does not start before the kernel does.
|
||||
|
|
|
|||
|
|
@ -86,8 +86,8 @@ an example of an efficient driver. */
|
|||
#define serSET_FLAG ( 1 )
|
||||
|
||||
/* The queues used to communicate between tasks and ISR's. */
|
||||
static xQueueHandle xRxedChars;
|
||||
static xQueueHandle xCharsForTx;
|
||||
static QueueHandle_t xRxedChars;
|
||||
static QueueHandle_t xCharsForTx;
|
||||
|
||||
/* Flag used to indicate the tx status. */
|
||||
static volatile portBASE_TYPE xTxHasEnded;
|
||||
|
|
@ -122,7 +122,7 @@ unsigned short usBRG;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )
|
||||
{
|
||||
/* Only one port is supported. */
|
||||
( void ) pxPort;
|
||||
|
|
@ -140,7 +140,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedC
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )
|
||||
{
|
||||
signed portBASE_TYPE xReturn;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue