mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-24 15:31:56 -04:00
Remove unnecessary use of portLONG, portCHAR and portSHORT.
Change version number in headers.
This commit is contained in:
parent
f625cf929a
commit
9468e36040
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -66,7 +67,7 @@
|
|||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 20000000 )
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 4 )
|
||||
#define configMINIMAL_STACK_SIZE ( 105 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) 1024 )
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -60,11 +61,11 @@ Changes from V2.0.0
|
|||
* The four LED's are connected to D4 to D7.
|
||||
*-----------------------------------------------------------*/
|
||||
|
||||
#define partstBIT_AS_OUTPUT ( ( unsigned portSHORT ) 0 )
|
||||
#define partstSET_OUTPUT ( ( unsigned portSHORT ) 1 )
|
||||
#define partstCLEAR_OUTPUT ( ( unsigned portSHORT ) 0 )
|
||||
#define partstBIT_AS_OUTPUT ( ( unsigned short ) 0 )
|
||||
#define partstSET_OUTPUT ( ( unsigned short ) 1 )
|
||||
#define partstCLEAR_OUTPUT ( ( unsigned short ) 0 )
|
||||
|
||||
#define partstENABLE_GENERAL_IO ( ( unsigned portCHAR ) 7 )
|
||||
#define partstENABLE_GENERAL_IO ( ( unsigned char ) 7 )
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -96,13 +97,13 @@ void vParTestSetLED( unsigned portBASE_TYPE uxLED, portBASE_TYPE xValue )
|
|||
{
|
||||
switch( uxLED )
|
||||
{
|
||||
case 3 : PORTDbits.RD7 = ( portSHORT ) xValue;
|
||||
case 3 : PORTDbits.RD7 = ( short ) xValue;
|
||||
break;
|
||||
case 2 : PORTDbits.RD6 = ( portSHORT ) xValue;
|
||||
case 2 : PORTDbits.RD6 = ( short ) xValue;
|
||||
break;
|
||||
case 1 : PORTDbits.RD5 = ( portSHORT ) xValue;
|
||||
case 1 : PORTDbits.RD5 = ( short ) xValue;
|
||||
break;
|
||||
case 0 : PORTDbits.RD4 = ( portSHORT ) xValue;
|
||||
case 0 : PORTDbits.RD4 = ( short ) xValue;
|
||||
break;
|
||||
default : /* There are only 4 LED's. */
|
||||
break;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -83,7 +84,7 @@
|
|||
Changes from V2.0.0
|
||||
|
||||
+ Delay periods are now specified using variables and constants of
|
||||
portTickType rather than unsigned portLONG.
|
||||
portTickType rather than unsigned long.
|
||||
*/
|
||||
|
||||
/* Scheduler include files. */
|
||||
|
@ -114,7 +115,7 @@ priority. */
|
|||
transmitted. */
|
||||
#define mainCOMMS_QUEUE_LENGTH ( 5 )
|
||||
#define mainNO_BLOCK ( ( portTickType ) 0 )
|
||||
#define mainBAUD_RATE ( ( unsigned portLONG ) 9600 )
|
||||
#define mainBAUD_RATE ( ( unsigned long ) 9600 )
|
||||
|
||||
/*
|
||||
* The task function for the "Check" task.
|
||||
|
@ -145,7 +146,7 @@ void main( void )
|
|||
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
||||
|
||||
/* Start the check task defined in this file. */
|
||||
xTaskCreate( vErrorChecks, ( const portCHAR * const ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vErrorChecks, ( const char * const ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Start the scheduler. Will never return here. */
|
||||
vTaskStartScheduler();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -79,7 +80,7 @@
|
|||
Changes from V2.0.0
|
||||
|
||||
+ Delay periods are now specified using variables and constants of
|
||||
portTickType rather than unsigned portLONG.
|
||||
portTickType rather than unsigned long.
|
||||
*/
|
||||
|
||||
/* Scheduler include files. */
|
||||
|
@ -102,7 +103,7 @@ priority. */
|
|||
transmitted. */
|
||||
#define mainCOMMS_QUEUE_LENGTH ( ( unsigned portBASE_TYPE ) 5 )
|
||||
#define mainNO_BLOCK ( ( portTickType ) 0 )
|
||||
#define mainBAUD_RATE ( ( unsigned portLONG ) 9600 )
|
||||
#define mainBAUD_RATE ( ( unsigned long ) 9600 )
|
||||
|
||||
/*
|
||||
* The task that performs the 32 bit calculation at the idle priority.
|
||||
|
@ -126,7 +127,7 @@ void main( void )
|
|||
vStartLEDFlashTasks( mainLED_FLASH_PRIORITY );
|
||||
|
||||
/* Start the check task defined in this file. */
|
||||
xTaskCreate( vCalculationTask, ( const portCHAR * const ) "Check", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||
xTaskCreate( vCalculationTask, ( const char * const ) "Check", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||
|
||||
/* Start the scheduler. */
|
||||
vTaskStartScheduler();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -87,7 +88,7 @@
|
|||
Changes from V2.0.0
|
||||
|
||||
+ Delay periods are now specified using variables and constants of
|
||||
portTickType rather than unsigned portLONG.
|
||||
portTickType rather than unsigned long.
|
||||
*/
|
||||
|
||||
/* Scheduler include files. */
|
||||
|
@ -127,7 +128,7 @@ error status. */
|
|||
|
||||
/* Constants required for the communications. */
|
||||
#define mainCOMMS_QUEUE_LENGTH ( ( unsigned portBASE_TYPE ) 5 )
|
||||
#define mainBAUD_RATE ( ( unsigned portLONG ) 57600 )
|
||||
#define mainBAUD_RATE ( ( unsigned long ) 57600 )
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
|
@ -155,7 +156,7 @@ void main( void )
|
|||
vStartIntegerMathTasks( tskIDLE_PRIORITY );
|
||||
|
||||
/* Start the check task defined in this file. */
|
||||
xTaskCreate( vErrorChecks, ( const portCHAR * const ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vErrorChecks, ( const char * const ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Start the scheduler. This will never return. */
|
||||
vTaskStartScheduler();
|
||||
|
@ -165,7 +166,7 @@ void main( void )
|
|||
static void vErrorChecks( void *pvParameters )
|
||||
{
|
||||
portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD;
|
||||
volatile unsigned portLONG ulDummy = 3UL;
|
||||
volatile unsigned long ulDummy = 3UL;
|
||||
|
||||
/* Toggle the LED so we can see when a reset occurs. */
|
||||
vParTestSetLED( mainRESET_LED, pdTRUE );
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -80,13 +81,13 @@ void vSerialRxISR( void );
|
|||
/* Bit/register definitions. */
|
||||
#define serINPUT ( 1 )
|
||||
#define serOUTPUT ( 0 )
|
||||
#define serTX_ENABLE ( ( unsigned portSHORT ) 1 )
|
||||
#define serRX_ENABLE ( ( unsigned portSHORT ) 1 )
|
||||
#define serHIGH_SPEED ( ( unsigned portSHORT ) 1 )
|
||||
#define serCONTINUOUS_RX ( ( unsigned portSHORT ) 1 )
|
||||
#define serCLEAR_OVERRUN ( ( unsigned portSHORT ) 0 )
|
||||
#define serINTERRUPT_ENABLED ( ( unsigned portSHORT ) 1 )
|
||||
#define serINTERRUPT_DISABLED ( ( unsigned portSHORT ) 0 )
|
||||
#define serTX_ENABLE ( ( unsigned short ) 1 )
|
||||
#define serRX_ENABLE ( ( unsigned short ) 1 )
|
||||
#define serHIGH_SPEED ( ( unsigned short ) 1 )
|
||||
#define serCONTINUOUS_RX ( ( unsigned short ) 1 )
|
||||
#define serCLEAR_OVERRUN ( ( unsigned short ) 0 )
|
||||
#define serINTERRUPT_ENABLED ( ( unsigned short ) 1 )
|
||||
#define serINTERRUPT_DISABLED ( ( unsigned short ) 0 )
|
||||
|
||||
/* All ISR's use the PIC18 low priority interrupt. */
|
||||
#define serLOW_PRIORITY ( 0 )
|
||||
|
@ -99,29 +100,29 @@ static xQueueHandle xCharsForTx;
|
|||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
{
|
||||
unsigned portLONG ulBaud;
|
||||
unsigned long ulBaud;
|
||||
|
||||
/* Calculate the baud rate generator constant.
|
||||
SPBRG = ( (FOSC / Desired Baud Rate) / 16 ) - 1 */
|
||||
ulBaud = configCPU_CLOCK_HZ / ulWantedBaud;
|
||||
ulBaud /= ( unsigned portLONG ) 16;
|
||||
ulBaud -= ( unsigned portLONG ) 1;
|
||||
ulBaud /= ( unsigned long ) 16;
|
||||
ulBaud -= ( unsigned long ) 1;
|
||||
|
||||
/* Create the queues used by the ISR's to interface to tasks. */
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( portCHAR ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( portCHAR ) );
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( char ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( char ) );
|
||||
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
/* Start with config registers cleared, so we can just set the wanted
|
||||
bits. */
|
||||
TXSTA = ( unsigned portSHORT ) 0;
|
||||
RCSTA = ( unsigned portSHORT ) 0;
|
||||
TXSTA = ( unsigned short ) 0;
|
||||
RCSTA = ( unsigned short ) 0;
|
||||
|
||||
/* Set the baud rate generator using the above calculated constant. */
|
||||
SPBRG = ( unsigned portCHAR ) ulBaud;
|
||||
SPBRG = ( unsigned char ) ulBaud;
|
||||
|
||||
/* Setup the IO pins to enable the USART IO. */
|
||||
serTX_PIN = serOUTPUT;
|
||||
|
@ -159,7 +160,7 @@ xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWant
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
|
||||
portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
|
||||
{
|
||||
/* Get the next character from the buffer. Return false if no characters
|
||||
are available, or arrive before xBlockTime expires. */
|
||||
|
@ -174,7 +175,7 @@ portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )
|
||||
portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )
|
||||
{
|
||||
/* Return false if after the block time there is no room on the Tx queue. */
|
||||
if( xQueueSend( xCharsForTx, ( const void * ) &cOutChar, xBlockTime ) != pdPASS )
|
||||
|
@ -201,7 +202,7 @@ void vSerialClose( xComPortHandle xPort )
|
|||
#pragma interruptlow vSerialRxISR save=PRODH, PRODL, TABLAT, section(".tmpdata")
|
||||
void vSerialRxISR( void )
|
||||
{
|
||||
portCHAR cChar;
|
||||
char cChar;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* Get the character and post it on the queue of Rxed characters.
|
||||
|
@ -228,7 +229,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
|||
#pragma interruptlow vSerialTxISR save=PRODH, PRODL, TABLAT, section(".tmpdata")
|
||||
void vSerialTxISR( void )
|
||||
{
|
||||
portCHAR cChar, cTaskWoken = pdFALSE;
|
||||
char cChar, cTaskWoken = pdFALSE;
|
||||
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &cTaskWoken ) == pdTRUE )
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -97,21 +98,21 @@ has been discovered. If an error has been discovered the check task runs
|
|||
more frequently - increasing the LED flash rate. */
|
||||
#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 10000 / portTICK_RATE_MS )
|
||||
#define mainERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS )
|
||||
#define mainCHECK_TASK_LED ( ( unsigned portCHAR ) 3 )
|
||||
#define mainCHECK_TASK_LED ( ( unsigned char ) 3 )
|
||||
|
||||
/* Priority definitions for some of the tasks. Other tasks just use the idle
|
||||
priority. */
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + ( unsigned portCHAR ) 3 )
|
||||
#define mainLED_FLASH_PRIORITY ( tskIDLE_PRIORITY + ( unsigned portCHAR ) 2 )
|
||||
#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + ( unsigned portCHAR ) 1 )
|
||||
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + ( unsigned portCHAR ) 1 )
|
||||
#define mainINTEGER_PRIORITY ( tskIDLE_PRIORITY + ( unsigned portCHAR ) 0 )
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 3 )
|
||||
#define mainLED_FLASH_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 2 )
|
||||
#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 1 )
|
||||
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 1 )
|
||||
#define mainINTEGER_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 0 )
|
||||
|
||||
/* Constants required for the communications. Only one character is ever
|
||||
transmitted. */
|
||||
#define mainCOMMS_QUEUE_LENGTH ( ( unsigned portCHAR ) 5 )
|
||||
#define mainCOMMS_QUEUE_LENGTH ( ( unsigned char ) 5 )
|
||||
#define mainNO_BLOCK ( ( portTickType ) 0 )
|
||||
#define mainBAUD_RATE ( ( unsigned portLONG ) 57600 )
|
||||
#define mainBAUD_RATE ( ( unsigned long ) 57600 )
|
||||
|
||||
/*
|
||||
* The task function for the "Check" task.
|
||||
|
@ -122,7 +123,7 @@ static portTASK_FUNCTION_PROTO( vErrorChecks, pvParameters );
|
|||
* Checks the unique counts of other tasks to ensure they are still operational.
|
||||
* Returns pdTRUE if an error is detected, otherwise pdFALSE.
|
||||
*/
|
||||
static portCHAR prvCheckOtherTasksAreStillRunning( void );
|
||||
static char prvCheckOtherTasksAreStillRunning( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -143,7 +144,7 @@ void main( void )
|
|||
vStartLEDFlashTasks( mainLED_FLASH_PRIORITY );
|
||||
|
||||
/* Start the check task defined in this file. */
|
||||
xTaskCreate( vErrorChecks, ( const portCHAR * const ) "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vErrorChecks, ( const char * const ) "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Start the scheduler. Will never return here. */
|
||||
vTaskStartScheduler();
|
||||
|
@ -158,7 +159,7 @@ static portTASK_FUNCTION( vErrorChecks, pvParameters )
|
|||
{
|
||||
portTickType xLastCheckTime;
|
||||
portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD;
|
||||
portCHAR cErrorOccurred;
|
||||
char cErrorOccurred;
|
||||
|
||||
/* We need to initialise xLastCheckTime prior to the first call to
|
||||
vTaskDelayUntil(). */
|
||||
|
@ -187,23 +188,23 @@ portCHAR cErrorOccurred;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portCHAR prvCheckOtherTasksAreStillRunning( void )
|
||||
static char prvCheckOtherTasksAreStillRunning( void )
|
||||
{
|
||||
portCHAR cErrorHasOccurred = ( portCHAR ) pdFALSE;
|
||||
char cErrorHasOccurred = ( char ) pdFALSE;
|
||||
|
||||
if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
|
||||
{
|
||||
cErrorHasOccurred = ( portCHAR ) pdTRUE;
|
||||
cErrorHasOccurred = ( char ) pdTRUE;
|
||||
}
|
||||
|
||||
if( xArePollingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
cErrorHasOccurred = ( portCHAR ) pdTRUE;
|
||||
cErrorHasOccurred = ( char ) pdTRUE;
|
||||
}
|
||||
|
||||
if( xAreSemaphoreTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
cErrorHasOccurred = ( portCHAR ) pdTRUE;
|
||||
cErrorHasOccurred = ( char ) pdTRUE;
|
||||
}
|
||||
|
||||
return cErrorHasOccurred;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -95,20 +96,20 @@ has been discovered. If an error has been discovered the check task runs
|
|||
more frequently - increasing the LED flash rate. */
|
||||
#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 10000 / portTICK_RATE_MS )
|
||||
#define mainERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS )
|
||||
#define mainCHECK_TASK_LED ( ( unsigned portCHAR ) 3 )
|
||||
#define mainCHECK_TASK_LED ( ( unsigned char ) 3 )
|
||||
|
||||
/* Priority definitions for some of the tasks. Other tasks just use the idle
|
||||
priority. */
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + ( unsigned portCHAR ) 3 )
|
||||
#define mainLED_FLASH_PRIORITY ( tskIDLE_PRIORITY + ( unsigned portCHAR ) 2 )
|
||||
#define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + ( unsigned portCHAR ) 1 )
|
||||
#define mainINTEGER_PRIORITY ( tskIDLE_PRIORITY + ( unsigned portCHAR ) 0 )
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 3 )
|
||||
#define mainLED_FLASH_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 2 )
|
||||
#define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 1 )
|
||||
#define mainINTEGER_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 0 )
|
||||
|
||||
/* Constants required for the communications. Only one character is ever
|
||||
transmitted. */
|
||||
#define mainCOMMS_QUEUE_LENGTH ( ( unsigned portCHAR ) 5 )
|
||||
#define mainCOMMS_QUEUE_LENGTH ( ( unsigned char ) 5 )
|
||||
#define mainNO_BLOCK ( ( portTickType ) 0 )
|
||||
#define mainBAUD_RATE ( ( unsigned portLONG ) 57600 )
|
||||
#define mainBAUD_RATE ( ( unsigned long ) 57600 )
|
||||
|
||||
/*
|
||||
* The task function for the "Check" task.
|
||||
|
@ -119,7 +120,7 @@ static portTASK_FUNCTION_PROTO( vErrorChecks, pvParameters );
|
|||
* Checks the unique counts of other tasks to ensure they are still operational.
|
||||
* Returns pdTRUE if an error is detected, otherwise pdFALSE.
|
||||
*/
|
||||
static portCHAR prvCheckOtherTasksAreStillRunning( void );
|
||||
static char prvCheckOtherTasksAreStillRunning( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -139,7 +140,7 @@ void main( void )
|
|||
vStartLEDFlashTasks( mainLED_FLASH_PRIORITY );
|
||||
|
||||
/* Start the check task defined in this file. */
|
||||
xTaskCreate( vErrorChecks, ( const portCHAR * const ) "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vErrorChecks, ( const char * const ) "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Start the scheduler. Will never return here. */
|
||||
vTaskStartScheduler( );
|
||||
|
@ -154,7 +155,7 @@ static portTASK_FUNCTION( vErrorChecks, pvParameters )
|
|||
{
|
||||
portTickType xLastCheckTime;
|
||||
portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD;
|
||||
portCHAR cErrorOccurred;
|
||||
char cErrorOccurred;
|
||||
|
||||
/* We need to initialise xLastCheckTime prior to the first call to
|
||||
vTaskDelayUntil(). */
|
||||
|
@ -184,18 +185,18 @@ static portTASK_FUNCTION( vErrorChecks, pvParameters )
|
|||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portCHAR prvCheckOtherTasksAreStillRunning( void )
|
||||
static char prvCheckOtherTasksAreStillRunning( void )
|
||||
{
|
||||
portCHAR cErrorHasOccurred = ( portCHAR ) pdFALSE;
|
||||
char cErrorHasOccurred = ( char ) pdFALSE;
|
||||
|
||||
if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
|
||||
{
|
||||
cErrorHasOccurred = ( portCHAR ) pdTRUE;
|
||||
cErrorHasOccurred = ( char ) pdTRUE;
|
||||
}
|
||||
|
||||
if( xAreBlockingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
cErrorHasOccurred = ( portCHAR ) pdTRUE;
|
||||
cErrorHasOccurred = ( char ) pdTRUE;
|
||||
}
|
||||
|
||||
return cErrorHasOccurred;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -95,19 +96,19 @@ has been discovered. If an error has been discovered the check task runs
|
|||
more frequently - increasing the LED flash rate. */
|
||||
#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 10000 / portTICK_RATE_MS )
|
||||
#define mainERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS )
|
||||
#define mainCHECK_TASK_LED ( ( unsigned portCHAR ) 3 )
|
||||
#define mainCHECK_TASK_LED ( ( unsigned char ) 3 )
|
||||
|
||||
/* Priority definitions for some of the tasks. Other tasks just use the idle
|
||||
priority. */
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + ( unsigned portCHAR ) 3 )
|
||||
#define mainLED_FLASH_PRIORITY ( tskIDLE_PRIORITY + ( unsigned portCHAR ) 2 )
|
||||
#define mainINTEGER_PRIORITY ( tskIDLE_PRIORITY + ( unsigned portCHAR ) 0 )
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 3 )
|
||||
#define mainLED_FLASH_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 2 )
|
||||
#define mainINTEGER_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 0 )
|
||||
|
||||
/* Constants required for the communications. Only one character is ever
|
||||
transmitted. */
|
||||
#define mainCOMMS_QUEUE_LENGTH ( ( unsigned portCHAR ) 5 )
|
||||
#define mainCOMMS_QUEUE_LENGTH ( ( unsigned char ) 5 )
|
||||
#define mainNO_BLOCK ( ( portTickType ) 0 )
|
||||
#define mainBAUD_RATE ( ( unsigned portLONG ) 57600 )
|
||||
#define mainBAUD_RATE ( ( unsigned long ) 57600 )
|
||||
|
||||
/*
|
||||
* The task function for the "Check" task.
|
||||
|
@ -118,7 +119,7 @@ static portTASK_FUNCTION_PROTO( vErrorChecks, pvParameters );
|
|||
* Checks the unique counts of other tasks to ensure they are still operational.
|
||||
* Returns pdTRUE if an error is detected, otherwise pdFALSE.
|
||||
*/
|
||||
static portCHAR prvCheckOtherTasksAreStillRunning( void );
|
||||
static char prvCheckOtherTasksAreStillRunning( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -138,7 +139,7 @@ void main( void )
|
|||
vStartLEDFlashTasks( mainLED_FLASH_PRIORITY );
|
||||
|
||||
/* Start the check task defined in this file. */
|
||||
xTaskCreate( vErrorChecks, ( const portCHAR * const ) "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vErrorChecks, ( const char * const ) "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Start the scheduler. Will never return here. */
|
||||
vTaskStartScheduler( );
|
||||
|
@ -153,7 +154,7 @@ static portTASK_FUNCTION( vErrorChecks, pvParameters )
|
|||
{
|
||||
portTickType xLastCheckTime;
|
||||
portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD;
|
||||
portCHAR cErrorOccurred;
|
||||
char cErrorOccurred;
|
||||
|
||||
/* We need to initialise xLastCheckTime prior to the first call to
|
||||
vTaskDelayUntil(). */
|
||||
|
@ -183,18 +184,18 @@ static portTASK_FUNCTION( vErrorChecks, pvParameters )
|
|||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portCHAR prvCheckOtherTasksAreStillRunning( void )
|
||||
static char prvCheckOtherTasksAreStillRunning( void )
|
||||
{
|
||||
portCHAR cErrorHasOccurred = ( portCHAR ) pdFALSE;
|
||||
char cErrorHasOccurred = ( char ) pdFALSE;
|
||||
|
||||
if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
|
||||
{
|
||||
cErrorHasOccurred = ( portCHAR ) pdTRUE;
|
||||
cErrorHasOccurred = ( char ) pdTRUE;
|
||||
}
|
||||
|
||||
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
cErrorHasOccurred = ( portCHAR ) pdTRUE;
|
||||
cErrorHasOccurred = ( char ) pdTRUE;
|
||||
}
|
||||
|
||||
return cErrorHasOccurred;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -93,18 +94,18 @@ has been discovered. If an error has been discovered the check task runs
|
|||
more frequently - increasing the LED flash rate. */
|
||||
#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 10000 / portTICK_RATE_MS )
|
||||
#define mainERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS )
|
||||
#define mainCHECK_TASK_LED ( ( unsigned portCHAR ) 3 )
|
||||
#define mainCHECK_TASK_LED ( ( unsigned char ) 3 )
|
||||
|
||||
/* Priority definitions for some of the tasks. Other tasks just use the idle
|
||||
priority. */
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + ( unsigned portCHAR ) 2 )
|
||||
#define mainLED_FLASH_PRIORITY ( tskIDLE_PRIORITY + ( unsigned portCHAR ) 1 )
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 2 )
|
||||
#define mainLED_FLASH_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 1 )
|
||||
|
||||
/* Constants required for the communications. Only one character is ever
|
||||
transmitted. */
|
||||
#define mainCOMMS_QUEUE_LENGTH ( ( unsigned portCHAR ) 5 )
|
||||
#define mainCOMMS_QUEUE_LENGTH ( ( unsigned char ) 5 )
|
||||
#define mainNO_BLOCK ( ( portTickType ) 0 )
|
||||
#define mainBAUD_RATE ( ( unsigned portLONG ) 57600 )
|
||||
#define mainBAUD_RATE ( ( unsigned long ) 57600 )
|
||||
|
||||
/*
|
||||
* The task function for the "Check" task.
|
||||
|
@ -115,7 +116,7 @@ static portTASK_FUNCTION_PROTO( vErrorChecks, pvParameters );
|
|||
* Checks the unique counts of other tasks to ensure they are still operational.
|
||||
* Returns pdTRUE if an error is detected, otherwise pdFALSE.
|
||||
*/
|
||||
static portCHAR prvCheckOtherTasksAreStillRunning( void );
|
||||
static char prvCheckOtherTasksAreStillRunning( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -134,7 +135,7 @@ void main( void )
|
|||
vStartLEDFlashTasks( mainLED_FLASH_PRIORITY );
|
||||
|
||||
/* Start the check task defined in this file. */
|
||||
xTaskCreate( vErrorChecks, ( const portCHAR * const ) "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vErrorChecks, ( const char * const ) "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Start the scheduler. Will never return here. */
|
||||
vTaskStartScheduler();
|
||||
|
@ -149,7 +150,7 @@ static portTASK_FUNCTION( vErrorChecks, pvParameters )
|
|||
{
|
||||
portTickType xLastCheckTime;
|
||||
portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD;
|
||||
portCHAR cErrorOccurred;
|
||||
char cErrorOccurred;
|
||||
|
||||
/* We need to initialise xLastCheckTime prior to the first call to
|
||||
vTaskDelayUntil(). */
|
||||
|
@ -178,13 +179,13 @@ portCHAR cErrorOccurred;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portCHAR prvCheckOtherTasksAreStillRunning( void )
|
||||
static char prvCheckOtherTasksAreStillRunning( void )
|
||||
{
|
||||
portCHAR cErrorHasOccurred = ( portCHAR ) pdFALSE;
|
||||
char cErrorHasOccurred = ( char ) pdFALSE;
|
||||
|
||||
if( xAreMathsTaskStillRunning() != pdTRUE )
|
||||
{
|
||||
cErrorHasOccurred = ( portCHAR ) pdTRUE;
|
||||
cErrorHasOccurred = ( char ) pdTRUE;
|
||||
}
|
||||
return cErrorHasOccurred;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -88,19 +89,19 @@ has been discovered. If an error has been discovered the check task runs
|
|||
more frequently - increasing the LED flash rate. */
|
||||
#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 10000 / portTICK_RATE_MS )
|
||||
#define mainERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS )
|
||||
#define mainCHECK_TASK_LED ( ( unsigned portCHAR ) 3 )
|
||||
#define mainCHECK_TASK_LED ( ( unsigned char ) 3 )
|
||||
|
||||
/* Priority definitions for some of the tasks. Other tasks just use the idle
|
||||
priority. */
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + ( unsigned portCHAR ) 2 )
|
||||
#define mainCOMM_TEST_PRIORITY ( tskIDLE_PRIORITY + ( unsigned portCHAR ) 1 )
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 2 )
|
||||
#define mainCOMM_TEST_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 1 )
|
||||
|
||||
/* The LED that is toggled whenever a character is transmitted.
|
||||
mainCOMM_TX_RX_LED + 1 will be toggled every time a character is received. */
|
||||
#define mainCOMM_TX_RX_LED ( ( unsigned portCHAR ) 0 )
|
||||
#define mainCOMM_TX_RX_LED ( ( unsigned char ) 0 )
|
||||
|
||||
/* Constants required for the communications. */
|
||||
#define mainBAUD_RATE ( ( unsigned portLONG ) 57600 )
|
||||
#define mainBAUD_RATE ( ( unsigned long ) 57600 )
|
||||
|
||||
/*
|
||||
* The task function for the "Check" task.
|
||||
|
@ -111,7 +112,7 @@ static portTASK_FUNCTION_PROTO( vErrorChecks, pvParameters );
|
|||
* Checks the unique counts of other tasks to ensure they are still operational.
|
||||
* Returns pdTRUE if an error is detected, otherwise pdFALSE.
|
||||
*/
|
||||
static portCHAR prvCheckOtherTasksAreStillRunning( void );
|
||||
static char prvCheckOtherTasksAreStillRunning( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -125,7 +126,7 @@ void main( void )
|
|||
vAltStartComTestTasks( mainCOMM_TEST_PRIORITY, mainBAUD_RATE, mainCOMM_TX_RX_LED );
|
||||
|
||||
/* Start the check task defined in this file. */
|
||||
xTaskCreate( vErrorChecks, ( const portCHAR * const ) "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vErrorChecks, ( const char * const ) "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Start the scheduler. Will never return here. */
|
||||
vTaskStartScheduler();
|
||||
|
@ -140,7 +141,7 @@ static portTASK_FUNCTION( vErrorChecks, pvParameters )
|
|||
{
|
||||
portTickType xLastCheckTime;
|
||||
portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD;
|
||||
portCHAR cErrorOccurred;
|
||||
char cErrorOccurred;
|
||||
|
||||
/* We need to initialise xLastCheckTime prior to the first call to
|
||||
vTaskDelayUntil(). */
|
||||
|
@ -169,13 +170,13 @@ portCHAR cErrorOccurred;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portCHAR prvCheckOtherTasksAreStillRunning( void )
|
||||
static char prvCheckOtherTasksAreStillRunning( void )
|
||||
{
|
||||
portCHAR cErrorHasOccurred = ( portCHAR ) pdFALSE;
|
||||
char cErrorHasOccurred = ( char ) pdFALSE;
|
||||
|
||||
if( xAreComTestTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
cErrorHasOccurred = ( portCHAR ) pdTRUE;
|
||||
cErrorHasOccurred = ( char ) pdTRUE;
|
||||
}
|
||||
|
||||
return cErrorHasOccurred;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -94,19 +95,19 @@ has been discovered. If an error has been discovered the check task runs
|
|||
more frequently - increasing the LED flash rate. */
|
||||
#define mainNO_ERROR_CHECK_PERIOD ( ( portTickType ) 10000 / portTICK_RATE_MS )
|
||||
#define mainERROR_CHECK_PERIOD ( ( portTickType ) 1000 / portTICK_RATE_MS )
|
||||
#define mainCHECK_TASK_LED ( ( unsigned portCHAR ) 3 )
|
||||
#define mainCHECK_TASK_LED ( ( unsigned char ) 3 )
|
||||
|
||||
/* Priority definitions for some of the tasks. Other tasks just use the idle
|
||||
priority. */
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + ( unsigned portCHAR ) 2 )
|
||||
#define mainLED_FLASH_PRIORITY ( tskIDLE_PRIORITY + ( unsigned portCHAR ) 2 )
|
||||
#define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + ( unsigned portCHAR ) 1 )
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 2 )
|
||||
#define mainLED_FLASH_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 2 )
|
||||
#define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 1 )
|
||||
|
||||
/* Constants required for the communications. Only one character is ever
|
||||
transmitted. */
|
||||
#define mainCOMMS_QUEUE_LENGTH ( ( unsigned portCHAR ) 5 )
|
||||
#define mainCOMMS_QUEUE_LENGTH ( ( unsigned char ) 5 )
|
||||
#define mainNO_BLOCK ( ( portTickType ) 0 )
|
||||
#define mainBAUD_RATE ( ( unsigned portLONG ) 57600 )
|
||||
#define mainBAUD_RATE ( ( unsigned long ) 57600 )
|
||||
|
||||
/*
|
||||
* The task function for the "Check" task.
|
||||
|
@ -117,7 +118,7 @@ static portTASK_FUNCTION_PROTO( vErrorChecks, pvParameters );
|
|||
* Checks the unique counts of other tasks to ensure they are still operational.
|
||||
* Returns pdTRUE if an error is detected, otherwise pdFALSE.
|
||||
*/
|
||||
static portCHAR prvCheckOtherTasksAreStillRunning( void );
|
||||
static char prvCheckOtherTasksAreStillRunning( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -135,7 +136,7 @@ void main( void )
|
|||
vStartLEDFlashTasks( mainLED_FLASH_PRIORITY );
|
||||
|
||||
/* Start the check task defined in this file. */
|
||||
xTaskCreate( vErrorChecks, ( const portCHAR * const ) "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vErrorChecks, ( const char * const ) "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* This task has to be created last as it keeps account of the number of tasks
|
||||
it expects to see running. */
|
||||
|
@ -154,7 +155,7 @@ static portTASK_FUNCTION( vErrorChecks, pvParameters )
|
|||
{
|
||||
portTickType xLastCheckTime;
|
||||
portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD;
|
||||
portCHAR cErrorOccurred;
|
||||
char cErrorOccurred;
|
||||
|
||||
/* We need to initialise xLastCheckTime prior to the first call to
|
||||
vTaskDelayUntil(). */
|
||||
|
@ -183,13 +184,13 @@ portCHAR cErrorOccurred;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portCHAR prvCheckOtherTasksAreStillRunning( void )
|
||||
static char prvCheckOtherTasksAreStillRunning( void )
|
||||
{
|
||||
portCHAR cErrorHasOccurred = ( portCHAR ) pdFALSE;
|
||||
char cErrorHasOccurred = ( char ) pdFALSE;
|
||||
|
||||
if( xIsCreateTaskStillRunning() != pdTRUE )
|
||||
{
|
||||
cErrorHasOccurred = ( portCHAR ) pdTRUE;
|
||||
cErrorHasOccurred = ( char ) pdTRUE;
|
||||
}
|
||||
|
||||
return cErrorHasOccurred;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -62,11 +63,11 @@ Changes from V3.0.1
|
|||
* The four LED's are connected to D4 to D7.
|
||||
*-----------------------------------------------------------*/
|
||||
|
||||
#define partstBIT_AS_OUTPUT ( ( unsigned portSHORT ) 0 )
|
||||
#define partstSET_OUTPUT ( ( unsigned portSHORT ) 1 )
|
||||
#define partstCLEAR_OUTPUT ( ( unsigned portSHORT ) 0 )
|
||||
#define partstBIT_AS_OUTPUT ( ( unsigned short ) 0 )
|
||||
#define partstSET_OUTPUT ( ( unsigned short ) 1 )
|
||||
#define partstCLEAR_OUTPUT ( ( unsigned short ) 0 )
|
||||
|
||||
#define partstENABLE_GENERAL_IO ( ( unsigned portCHAR ) 7 )
|
||||
#define partstENABLE_GENERAL_IO ( ( unsigned char ) 7 )
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -91,20 +92,20 @@ void vParTestInitialise( void )
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestSetLED( unsigned portCHAR ucLED, portCHAR cValue )
|
||||
void vParTestSetLED( unsigned char ucLED, char cValue )
|
||||
{
|
||||
/* We are only using the top nibble, so LED 0 corresponds to bit 4. */
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
switch( ucLED )
|
||||
{
|
||||
case 3 : bRD7 = ( portSHORT ) cValue;
|
||||
case 3 : bRD7 = ( short ) cValue;
|
||||
break;
|
||||
case 2 : bRD6 = ( portSHORT ) cValue;
|
||||
case 2 : bRD6 = ( short ) cValue;
|
||||
break;
|
||||
case 1 : bRD5 = ( portSHORT ) cValue;
|
||||
case 1 : bRD5 = ( short ) cValue;
|
||||
break;
|
||||
case 0 : bRD4 = ( portSHORT ) cValue;
|
||||
case 0 : bRD4 = ( short ) cValue;
|
||||
break;
|
||||
default : /* There are only 4 LED's. */
|
||||
break;
|
||||
|
@ -114,7 +115,7 @@ void vParTestSetLED( unsigned portCHAR ucLED, portCHAR cValue )
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestToggleLED( unsigned portCHAR ucLED )
|
||||
void vParTestToggleLED( unsigned char ucLED )
|
||||
{
|
||||
/* We are only using the top nibble, so LED 0 corresponds to bit 4. */
|
||||
vTaskSuspendAll();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -80,7 +81,7 @@ Changes from V3.0.1
|
|||
* PRODL is (ab)used as temporary storage. This is allowed
|
||||
* because this SFR will be restored before exiting the ISR.
|
||||
*/
|
||||
extern portCHAR cChar;
|
||||
extern char cChar;
|
||||
extern portBASE_TYPE xHigherPriorityTaskWoken;
|
||||
#pragma locate cChar &PRODL
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -81,7 +82,7 @@ Changes from V3.0.1
|
|||
* is allowed because these SFR's will be restored before
|
||||
* exiting the ISR.
|
||||
*/
|
||||
extern portCHAR cChar;
|
||||
extern char cChar;
|
||||
#pragma locate cChar &PRODL
|
||||
extern portBASE_TYPE pxTaskWoken;
|
||||
#pragma locate pxTaskWoken &PRODH
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -82,13 +83,13 @@ portBASE_TYPE xHigherPriorityTaskWoken;
|
|||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portCHAR ucQueueLength )
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned char ucQueueLength )
|
||||
{
|
||||
unsigned portSHORT usSPBRG;
|
||||
unsigned short usSPBRG;
|
||||
|
||||
/* Create the queues used by the ISR's to interface to tasks. */
|
||||
xRxedChars = xQueueCreate( ucQueueLength, ( unsigned portBASE_TYPE ) sizeof( portCHAR ) );
|
||||
xCharsForTx = xQueueCreate( ucQueueLength, ( unsigned portBASE_TYPE ) sizeof( portCHAR ) );
|
||||
xRxedChars = xQueueCreate( ucQueueLength, ( unsigned portBASE_TYPE ) sizeof( char ) );
|
||||
xCharsForTx = xQueueCreate( ucQueueLength, ( unsigned portBASE_TYPE ) sizeof( char ) );
|
||||
|
||||
portENTER_CRITICAL();
|
||||
|
||||
|
@ -148,7 +149,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWantedParity, eDataBits eWantedDataBits, eStopBits eWantedStopBits, unsigned portCHAR ucBufferLength )
|
||||
xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWantedParity, eDataBits eWantedDataBits, eStopBits eWantedStopBits, unsigned char ucBufferLength )
|
||||
{
|
||||
/* This is not implemented in this port.
|
||||
Use xSerialPortInitMinimal() instead. */
|
||||
|
@ -156,23 +157,23 @@ xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWant
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, portCHAR *pcRxedChar, portTickType xBlockTime )
|
||||
portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, portTickType xBlockTime )
|
||||
{
|
||||
/* Get the next character from the buffer. Return false if no characters
|
||||
are available, or arrive before xBlockTime expires. */
|
||||
if( xQueueReceive( xRxedChars, pcRxedChar, xBlockTime ) )
|
||||
{
|
||||
return ( portCHAR ) pdTRUE;
|
||||
return ( char ) pdTRUE;
|
||||
}
|
||||
|
||||
return ( portCHAR ) pdFALSE;
|
||||
return ( char ) pdFALSE;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, portCHAR cOutChar, portTickType xBlockTime )
|
||||
portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, portTickType xBlockTime )
|
||||
{
|
||||
/* Return false if after the block time there is no room on the Tx queue. */
|
||||
if( xQueueSend( xCharsForTx, ( const void * ) &cOutChar, xBlockTime ) != ( portCHAR ) pdPASS )
|
||||
if( xQueueSend( xCharsForTx, ( const void * ) &cOutChar, xBlockTime ) != ( char ) pdPASS )
|
||||
{
|
||||
return pdFAIL;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -66,7 +67,7 @@
|
|||
#define configUSE_IDLE_HOOK 1
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 16000000 ) /* Fosc / 2 */
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned long ) 16000000 ) /* Fosc / 2 */
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 4 )
|
||||
#define configMINIMAL_STACK_SIZE ( 115 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) 5120 )
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -59,7 +60,7 @@ typedef struct
|
|||
portTickType xMinDisplayTime;
|
||||
|
||||
/* A pointer to the string to be displayed. */
|
||||
portCHAR *pcMessage;
|
||||
char *pcMessage;
|
||||
|
||||
} xLCDMessage;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -125,7 +126,7 @@ interrupt test" interrupt. */
|
|||
#define mainEXPECTED_CLOCKS_BETWEEN_INTERRUPTS ( configCPU_CLOCK_HZ / mainTEST_INTERRUPT_FREQUENCY )
|
||||
|
||||
/* The number of nano seconds between each processor clock. */
|
||||
#define mainNS_PER_CLOCK ( ( unsigned portSHORT ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )
|
||||
#define mainNS_PER_CLOCK ( ( unsigned short ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )
|
||||
|
||||
/* Dimension the buffer used to hold the value of the maximum jitter time when
|
||||
it is converted to a string. */
|
||||
|
@ -166,7 +167,7 @@ int main( void )
|
|||
vCreateBlockTimeTasks();
|
||||
|
||||
/* Create the test tasks defined within this file. */
|
||||
xTaskCreate( vCheckTask, ( signed portCHAR * ) "Check", mainCHECK_TAKS_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vCheckTask, ( signed char * ) "Check", mainCHECK_TAKS_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Start the task that will control the LCD. This returns the handle
|
||||
to the queue used to write text out to the task. */
|
||||
|
@ -196,10 +197,10 @@ static void vCheckTask( void *pvParameters )
|
|||
portTickType xLastExecutionTime;
|
||||
|
||||
/* The maximum jitter time measured by the fast interrupt test. */
|
||||
extern unsigned portSHORT usMaxJitter ;
|
||||
extern unsigned short usMaxJitter ;
|
||||
|
||||
/* Buffer into which the maximum jitter time is written as a string. */
|
||||
static portCHAR cStringBuffer[ mainMAX_STRING_LENGTH ];
|
||||
static char cStringBuffer[ mainMAX_STRING_LENGTH ];
|
||||
|
||||
/* The message that is sent on the queue to the LCD task. The first
|
||||
parameter is the minimum time (in ticks) that the message should be
|
||||
|
@ -208,7 +209,7 @@ to the message to display itself. */
|
|||
xLCDMessage xMessage = { 0, cStringBuffer };
|
||||
|
||||
/* Set to pdTRUE should an error be detected in any of the standard demo tasks. */
|
||||
unsigned portSHORT usErrorDetected = pdFALSE;
|
||||
unsigned short usErrorDetected = pdFALSE;
|
||||
|
||||
/* Initialise xLastExecutionTime so the first call to vTaskDelayUntil()
|
||||
works correctly. */
|
||||
|
@ -249,7 +250,7 @@ unsigned portSHORT usErrorDetected = pdFALSE;
|
|||
{
|
||||
/* No errors have been discovered, so display the maximum jitter
|
||||
timer discovered by the "fast interrupt test". */
|
||||
sprintf( cStringBuffer, "%dns max jitter", ( portSHORT ) ( usMaxJitter - mainEXPECTED_CLOCKS_BETWEEN_INTERRUPTS ) * mainNS_PER_CLOCK );
|
||||
sprintf( cStringBuffer, "%dns max jitter", ( short ) ( usMaxJitter - mainEXPECTED_CLOCKS_BETWEEN_INTERRUPTS ) * mainNS_PER_CLOCK );
|
||||
}
|
||||
|
||||
/* Send the message to the LCD gatekeeper for display. */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -93,13 +94,13 @@ static xQueueHandle xCharsForTx;
|
|||
static portBASE_TYPE xTxHasEnded;
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
{
|
||||
portCHAR cChar;
|
||||
char cChar;
|
||||
|
||||
/* Create the queues used by the com test task. */
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
|
||||
/* Setup the UART. */
|
||||
U2MODEbits.BRGH = serLOW_SPEED;
|
||||
|
@ -114,7 +115,7 @@ portCHAR cChar;
|
|||
U2MODEbits.USIDL = serCONTINUE_IN_IDLE_MODE;
|
||||
U2MODEbits.UARTEN = serUART_ENABLED;
|
||||
|
||||
U2BRG = (unsigned portSHORT)(( (float)configCPU_CLOCK_HZ / ( (float)16 * (float)ulWantedBaud ) ) - (float)0.5);
|
||||
U2BRG = (unsigned short)(( (float)configCPU_CLOCK_HZ / ( (float)16 * (float)ulWantedBaud ) ) - (float)0.5);
|
||||
|
||||
U2STAbits.URXISEL = serINTERRUPT_ON_SINGLE_CHAR;
|
||||
U2STAbits.UTXEN = serTX_ENABLE;
|
||||
|
@ -146,7 +147,7 @@ portCHAR cChar;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
|
||||
{
|
||||
/* Only one port is supported. */
|
||||
( void ) pxPort;
|
||||
|
@ -164,7 +165,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcR
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )
|
||||
{
|
||||
/* Only one port is supported. */
|
||||
( void ) pxPort;
|
||||
|
@ -194,7 +195,7 @@ void vSerialClose( xComPortHandle xPort )
|
|||
|
||||
void __attribute__((__interrupt__, auto_psv)) _U2RXInterrupt( void )
|
||||
{
|
||||
portCHAR cChar;
|
||||
char cChar;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* Get the character and post it on the queue of Rxed characters.
|
||||
|
@ -216,7 +217,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
|||
|
||||
void __attribute__((__interrupt__, auto_psv)) _U2TXInterrupt( void )
|
||||
{
|
||||
signed portCHAR cChar;
|
||||
signed char cChar;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* If the transmit buffer is full we cannot get the next character.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -49,7 +50,7 @@
|
|||
#define TIMER_TEST_H
|
||||
|
||||
/* Setup the high frequency timer interrupt. */
|
||||
void vSetupTimerTest( unsigned portSHORT usFrequencyHz );
|
||||
void vSetupTimerTest( unsigned short usFrequencyHz );
|
||||
|
||||
#endif /* TIMER_TEST_H */
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -66,8 +67,8 @@
|
|||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 80000000UL )
|
||||
#define configPERIPHERAL_CLOCK_HZ ( ( unsigned portLONG ) 40000000UL )
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned long ) 80000000UL )
|
||||
#define configPERIPHERAL_CLOCK_HZ ( ( unsigned long ) 40000000UL )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
|
||||
#define configMINIMAL_STACK_SIZE ( 190 )
|
||||
#define configISR_STACK_SIZE ( 400 )
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -59,7 +60,7 @@ typedef struct
|
|||
portTickType xMinDisplayTime;
|
||||
|
||||
/* A pointer to the string to be displayed. */
|
||||
portCHAR *pcMessage;
|
||||
char *pcMessage;
|
||||
|
||||
} xLCDMessage;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -49,7 +50,7 @@
|
|||
#define TIMER_TEST_H
|
||||
|
||||
/* Setup the high frequency timer interrupt. */
|
||||
void vSetupTimerTest( unsigned portSHORT usFrequencyHz );
|
||||
void vSetupTimerTest( unsigned short usFrequencyHz );
|
||||
|
||||
#endif /* TIMER_TEST_H */
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -63,8 +64,8 @@
|
|||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 250 )
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 200000000 ) /* Clock setup from start.asm in the demo application. */
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 250 )
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned long ) 200000000 ) /* Clock setup from start.asm in the demo application. */
|
||||
#define configTICK_RATE_HZ ( (portTickType) 1000 )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 6 )
|
||||
#define configTOTAL_HEAP_SIZE ( (size_t) (80 * 1024) )
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -63,8 +64,8 @@
|
|||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 250 )
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 200000000 ) /* Clock setup from start.asm in the demo application. */
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 250 )
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned long ) 200000000 ) /* Clock setup from start.asm in the demo application. */
|
||||
#define configTICK_RATE_HZ ( (portTickType) 1000 )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 6 )
|
||||
#define configTOTAL_HEAP_SIZE ( (size_t) (80 * 1024) )
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -65,8 +66,8 @@
|
|||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 250 )
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) XPAR_CPU_PPC440_CORE_CLOCK_FREQ_HZ ) /* Clock setup from start.asm in the demo application. */
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 250 )
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned long ) XPAR_CPU_PPC440_CORE_CLOCK_FREQ_HZ ) /* Clock setup from start.asm in the demo application. */
|
||||
#define configTICK_RATE_HZ ( (portTickType) 1000 )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 6 )
|
||||
#define configTOTAL_HEAP_SIZE ( (size_t) (80 * 1024) )
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -111,7 +112,7 @@ static volatile portDOUBLE dFlopRegisters[ flopNUMBER_OF_TASKS ][ portNO_FLOP_RE
|
|||
|
||||
/* Variables that are incremented by the tasks to indicate that they are still
|
||||
running. */
|
||||
static volatile unsigned portLONG ulFlop1CycleCount = 0, ulFlop2CycleCount = 0;
|
||||
static volatile unsigned long ulFlop1CycleCount = 0, ulFlop2CycleCount = 0;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -138,7 +139,7 @@ portDOUBLE z = flopSTART_VALUE;
|
|||
|
||||
|
||||
/* Create the first task. */
|
||||
xTaskCreate( vFlopTest1, ( signed portCHAR * ) "flop1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated );
|
||||
xTaskCreate( vFlopTest1, ( signed char * ) "flop1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated );
|
||||
|
||||
/* The task tag value is a value that can be associated with a task, but
|
||||
is not used by the scheduler itself. Its use is down to the application so
|
||||
|
@ -148,7 +149,7 @@ portDOUBLE z = flopSTART_VALUE;
|
|||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 0 ][ 0 ] ) );
|
||||
|
||||
/* Do the same for the second task. */
|
||||
xTaskCreate( vFlopTest2, ( signed portCHAR * ) "flop2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated );
|
||||
xTaskCreate( vFlopTest2, ( signed char * ) "flop2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 1 ][ 0 ] ) );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -203,7 +204,7 @@ portBASE_TYPE xAreFlopRegisterTestsStillRunning( void )
|
|||
portBASE_TYPE xReturn = pdPASS;
|
||||
unsigned portBASE_TYPE x, y;
|
||||
portDOUBLE z = flopSTART_VALUE;
|
||||
static unsigned portLONG ulLastFlop1CycleCount = 0, ulLastFlop2CycleCount = 0;
|
||||
static unsigned long ulLastFlop1CycleCount = 0, ulLastFlop2CycleCount = 0;
|
||||
|
||||
/* Called from the 'check' task.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -84,7 +85,7 @@ static portTASK_FUNCTION_PROTO( vCompetingMathTask4, pvParameters );
|
|||
|
||||
/* These variables are used to check that all the tasks are still running. If a
|
||||
task gets a calculation wrong it will stop incrementing its check variable. */
|
||||
static volatile unsigned portSHORT usTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned portSHORT ) 0 };
|
||||
static volatile unsigned short usTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned short ) 0 };
|
||||
|
||||
/* Buffers into which the flop registers will be saved. There is a buffer for
|
||||
each task created within this file. Zeroing out this array is the normal and
|
||||
|
@ -118,7 +119,7 @@ portBASE_TYPE x, y;
|
|||
/* Create the first task - passing it the address of the check variable
|
||||
that it is going to increment. This check variable is used as an
|
||||
indication that the task is still running. */
|
||||
xTaskCreate( vCompetingMathTask1, ( signed portCHAR * ) "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask1, ( signed char * ) "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, &xTaskJustCreated );
|
||||
|
||||
/* The task tag value is a value that can be associated with a task, but
|
||||
is not used by the scheduler itself. Its use is down to the application so
|
||||
|
@ -128,25 +129,25 @@ portBASE_TYPE x, y;
|
|||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 0 ][ 0 ] ) );
|
||||
|
||||
/* Create another 7 tasks, allocating a buffer for each. */
|
||||
xTaskCreate( vCompetingMathTask2, ( signed portCHAR * ) "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask2, ( signed char * ) "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 1 ][ 0 ] ) );
|
||||
|
||||
xTaskCreate( vCompetingMathTask3, ( signed portCHAR * ) "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask3, ( signed char * ) "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 2 ][ 0 ] ) );
|
||||
|
||||
xTaskCreate( vCompetingMathTask4, ( signed portCHAR * ) "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask4, ( signed char * ) "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 3 ][ 0 ] ) );
|
||||
|
||||
xTaskCreate( vCompetingMathTask1, ( signed portCHAR * ) "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask1, ( signed char * ) "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 4 ][ 0 ] ) );
|
||||
|
||||
xTaskCreate( vCompetingMathTask2, ( signed portCHAR * ) "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask2, ( signed char * ) "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 5 ][ 0 ] ) );
|
||||
|
||||
xTaskCreate( vCompetingMathTask3, ( signed portCHAR * ) "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask3, ( signed char * ) "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 6 ][ 0 ] ) );
|
||||
|
||||
xTaskCreate( vCompetingMathTask4, ( signed portCHAR * ) "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask4, ( signed char * ) "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 7 ][ 0 ] ) );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -154,9 +155,9 @@ portBASE_TYPE x, y;
|
|||
static portTASK_FUNCTION( vCompetingMathTask1, pvParameters )
|
||||
{
|
||||
volatile portDOUBLE df1, df2, df3, df4;
|
||||
volatile unsigned portSHORT *pusTaskCheckVariable;
|
||||
volatile unsigned short *pusTaskCheckVariable;
|
||||
volatile portDOUBLE dAnswer;
|
||||
portSHORT sError = pdFALSE;
|
||||
short sError = pdFALSE;
|
||||
|
||||
df1 = 123.4567;
|
||||
df2 = 2345.6789;
|
||||
|
@ -166,7 +167,7 @@ portSHORT sError = pdFALSE;
|
|||
|
||||
/* The variable this task increments to show it is still running is passed in
|
||||
as the parameter. */
|
||||
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;
|
||||
pusTaskCheckVariable = ( unsigned short * ) pvParameters;
|
||||
|
||||
/* Keep performing a calculation and checking the result against a constant. */
|
||||
for(;;)
|
||||
|
@ -206,9 +207,9 @@ portSHORT sError = pdFALSE;
|
|||
static portTASK_FUNCTION( vCompetingMathTask2, pvParameters )
|
||||
{
|
||||
volatile portDOUBLE df1, df2, df3, df4;
|
||||
volatile unsigned portSHORT *pusTaskCheckVariable;
|
||||
volatile unsigned short *pusTaskCheckVariable;
|
||||
volatile portDOUBLE dAnswer;
|
||||
portSHORT sError = pdFALSE;
|
||||
short sError = pdFALSE;
|
||||
|
||||
df1 = -389.38;
|
||||
df2 = 32498.2;
|
||||
|
@ -219,7 +220,7 @@ portSHORT sError = pdFALSE;
|
|||
|
||||
/* The variable this task increments to show it is still running is passed in
|
||||
as the parameter. */
|
||||
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;
|
||||
pusTaskCheckVariable = ( unsigned short * ) pvParameters;
|
||||
|
||||
/* Keep performing a calculation and checking the result against a constant. */
|
||||
for( ;; )
|
||||
|
@ -259,14 +260,14 @@ portSHORT sError = pdFALSE;
|
|||
static portTASK_FUNCTION( vCompetingMathTask3, pvParameters )
|
||||
{
|
||||
volatile portDOUBLE *pdArray, dTotal1, dTotal2, dDifference;
|
||||
volatile unsigned portSHORT *pusTaskCheckVariable;
|
||||
volatile unsigned short *pusTaskCheckVariable;
|
||||
const size_t xArraySize = 10;
|
||||
size_t xPosition;
|
||||
portSHORT sError = pdFALSE;
|
||||
short sError = pdFALSE;
|
||||
|
||||
/* The variable this task increments to show it is still running is passed in
|
||||
as the parameter. */
|
||||
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;
|
||||
pusTaskCheckVariable = ( unsigned short * ) pvParameters;
|
||||
|
||||
pdArray = ( portDOUBLE * ) pvPortMalloc( xArraySize * sizeof( portDOUBLE ) );
|
||||
|
||||
|
@ -316,14 +317,14 @@ portSHORT sError = pdFALSE;
|
|||
static portTASK_FUNCTION( vCompetingMathTask4, pvParameters )
|
||||
{
|
||||
volatile portDOUBLE *pdArray, dTotal1, dTotal2, dDifference;
|
||||
volatile unsigned portSHORT *pusTaskCheckVariable;
|
||||
volatile unsigned short *pusTaskCheckVariable;
|
||||
const size_t xArraySize = 10;
|
||||
size_t xPosition;
|
||||
portSHORT sError = pdFALSE;
|
||||
short sError = pdFALSE;
|
||||
|
||||
/* The variable this task increments to show it is still running is passed in
|
||||
as the parameter. */
|
||||
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;
|
||||
pusTaskCheckVariable = ( unsigned short * ) pvParameters;
|
||||
|
||||
pdArray = ( portDOUBLE * ) pvPortMalloc( xArraySize * sizeof( portDOUBLE ) );
|
||||
|
||||
|
@ -375,7 +376,7 @@ portBASE_TYPE xAreMathsTaskStillRunning( void )
|
|||
{
|
||||
/* Keep a history of the check variables so we know if they have been incremented
|
||||
since the last call. */
|
||||
static unsigned portSHORT usLastTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned portSHORT ) 0 };
|
||||
static unsigned short usLastTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned short ) 0 };
|
||||
portBASE_TYPE xReturn = pdTRUE, xTask;
|
||||
|
||||
/* Check the maths tasks are still running by ensuring their check variables
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -149,7 +150,7 @@ discover an unexpected value. */
|
|||
static volatile unsigned portBASE_TYPE xRegTestStatus = pdPASS;
|
||||
|
||||
/* Counters used to ensure the regtest tasks are still running. */
|
||||
static volatile unsigned portLONG ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;
|
||||
static volatile unsigned long ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -184,9 +185,9 @@ int main( void )
|
|||
#endif
|
||||
|
||||
/* Create the tasks defined within this file. */
|
||||
xTaskCreate( prvRegTestTask1, ( signed portCHAR * ) "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||
xTaskCreate( prvRegTestTask2, ( signed portCHAR * ) "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||
xTaskCreate( prvErrorChecks, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( prvRegTestTask1, ( signed char * ) "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||
xTaskCreate( prvRegTestTask2, ( signed char * ) "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||
xTaskCreate( prvErrorChecks, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* The suicide tasks must be started last as they record the number of other
|
||||
tasks that exist within the system. The value is then used to ensure at run
|
||||
|
@ -208,7 +209,7 @@ int main( void )
|
|||
static portBASE_TYPE prvCheckOtherTasksAreStillRunning( void )
|
||||
{
|
||||
portBASE_TYPE lReturn = pdPASS;
|
||||
static unsigned portLONG ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL;
|
||||
static unsigned long ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL;
|
||||
|
||||
/* The demo tasks maintain a count that increments every cycle of the task
|
||||
provided that the task has never encountered an error. This function
|
||||
|
@ -673,12 +674,12 @@ static void prvRegTestTask2( void *pvParameters )
|
|||
/* This hook function will get called if there is a suspected stack overflow.
|
||||
An overflow can cause the task name to be corrupted, in which case the task
|
||||
handle needs to be used to determine the offending task. */
|
||||
void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName );
|
||||
void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName )
|
||||
void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName );
|
||||
void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName )
|
||||
{
|
||||
/* To prevent the optimiser removing the variables. */
|
||||
volatile xTaskHandle xTaskIn = xTask;
|
||||
volatile signed portCHAR *pcTaskNameIn = pcTaskName;
|
||||
volatile signed char *pcTaskNameIn = pcTaskName;
|
||||
|
||||
/* Remove compiler warnings. */
|
||||
( void ) xTaskIn;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -82,7 +83,7 @@ static void vSerialISR( XUartLite *pxUART );
|
|||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
{
|
||||
/* NOTE: The baud rate used by this driver is determined by the hardware
|
||||
parameterization of the UART Lite peripheral, and the baud value passed to
|
||||
|
@ -90,8 +91,8 @@ xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned
|
|||
( void ) ulWantedBaud;
|
||||
|
||||
/* Create the queues used to hold Rx and Tx characters. */
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
|
||||
/* Only initialise the UART if the queues were created correctly. */
|
||||
if( ( xRxedChars != NULL ) && ( xCharsForTx != NULL ) )
|
||||
|
@ -115,7 +116,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
|
||||
{
|
||||
/* The port handle is not required as this driver only supports one UART. */
|
||||
( void ) pxPort;
|
||||
|
@ -133,7 +134,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcR
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )
|
||||
{
|
||||
portBASE_TYPE xReturn = pdTRUE;
|
||||
|
||||
|
@ -184,9 +185,9 @@ void vSerialClose( xComPortHandle xPort )
|
|||
|
||||
static void vSerialISR( XUartLite *pxUART )
|
||||
{
|
||||
unsigned portLONG ulISRStatus;
|
||||
unsigned long ulISRStatus;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE, lDidSomething;
|
||||
portCHAR cChar;
|
||||
char cChar;
|
||||
|
||||
/* Just to remove compiler warning. */
|
||||
( void ) pxUART;
|
||||
|
@ -202,7 +203,7 @@ portCHAR cChar;
|
|||
/* A character is available - place it in the queue of received
|
||||
characters. This might wake a task that was blocked waiting for
|
||||
data. */
|
||||
cChar = ( portCHAR ) XIo_In32( XPAR_RS232_UART_1_BASEADDR + XUL_RX_FIFO_OFFSET );
|
||||
cChar = ( char ) XIo_In32( XPAR_RS232_UART_1_BASEADDR + XUL_RX_FIFO_OFFSET );
|
||||
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
|
||||
lDidSomething = pdTRUE;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -65,8 +66,8 @@
|
|||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 250 )
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) XPAR_CPU_PPC440_CORE_CLOCK_FREQ_HZ ) /* Clock setup from start.asm in the demo application. */
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 250 )
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned long ) XPAR_CPU_PPC440_CORE_CLOCK_FREQ_HZ ) /* Clock setup from start.asm in the demo application. */
|
||||
#define configTICK_RATE_HZ ( (portTickType) 1000 )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 6 )
|
||||
#define configTOTAL_HEAP_SIZE ( (size_t) (80 * 1024) )
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -107,11 +108,11 @@ static void vFlopTest2( void *pvParameters );
|
|||
|
||||
/* Buffers into which the flop registers will be saved. There is a buffer for
|
||||
both tasks. */
|
||||
static volatile unsigned portLONG ulFlopRegisters[ flopNUMBER_OF_TASKS ][ portNO_FLOP_REGISTERS_TO_SAVE ];
|
||||
static volatile unsigned long ulFlopRegisters[ flopNUMBER_OF_TASKS ][ portNO_FLOP_REGISTERS_TO_SAVE ];
|
||||
|
||||
/* Variables that are incremented by the tasks to indicate that they are still
|
||||
running. */
|
||||
static volatile unsigned portLONG ulFlop1CycleCount = 0, ulFlop2CycleCount = 0;
|
||||
static volatile unsigned long ulFlop1CycleCount = 0, ulFlop2CycleCount = 0;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -137,7 +138,7 @@ unsigned portBASE_TYPE x, y, z = flopSTART_VALUE;
|
|||
|
||||
|
||||
/* Create the first task. */
|
||||
xTaskCreate( vFlopTest1, ( signed portCHAR * ) "flop1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated );
|
||||
xTaskCreate( vFlopTest1, ( signed char * ) "flop1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated );
|
||||
|
||||
/* The task tag value is a value that can be associated with a task, but
|
||||
is not used by the scheduler itself. Its use is down to the application so
|
||||
|
@ -147,7 +148,7 @@ unsigned portBASE_TYPE x, y, z = flopSTART_VALUE;
|
|||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 0 ][ 0 ] ) );
|
||||
|
||||
/* Do the same for the second task. */
|
||||
xTaskCreate( vFlopTest2, ( signed portCHAR * ) "flop2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated );
|
||||
xTaskCreate( vFlopTest2, ( signed char * ) "flop2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 1 ][ 0 ] ) );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -201,7 +202,7 @@ portBASE_TYPE xAreFlopRegisterTestsStillRunning( void )
|
|||
{
|
||||
portBASE_TYPE xReturn = pdPASS;
|
||||
unsigned portBASE_TYPE x, y, z = flopSTART_VALUE;
|
||||
static unsigned portLONG ulLastFlop1CycleCount = 0, ulLastFlop2CycleCount = 0;
|
||||
static unsigned long ulLastFlop1CycleCount = 0, ulLastFlop2CycleCount = 0;
|
||||
|
||||
/* Called from the 'check' task.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -84,13 +85,13 @@ static portTASK_FUNCTION_PROTO( vCompetingMathTask4, pvParameters );
|
|||
|
||||
/* These variables are used to check that all the tasks are still running. If a
|
||||
task gets a calculation wrong it will stop incrementing its check variable. */
|
||||
static volatile unsigned portSHORT usTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned portSHORT ) 0 };
|
||||
static volatile unsigned short usTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned short ) 0 };
|
||||
|
||||
/* Buffers into which the flop registers will be saved. There is a buffer for
|
||||
each task created within this file. Zeroing out this array is the normal and
|
||||
safe option as this will cause the task to start with all zeros in its flop
|
||||
context. */
|
||||
static unsigned portLONG ulFlopRegisters[ mathNUMBER_OF_TASKS ][ portNO_FLOP_REGISTERS_TO_SAVE ];
|
||||
static unsigned long ulFlopRegisters[ mathNUMBER_OF_TASKS ][ portNO_FLOP_REGISTERS_TO_SAVE ];
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -118,7 +119,7 @@ portBASE_TYPE x, y;
|
|||
/* Create the first task - passing it the address of the check variable
|
||||
that it is going to increment. This check variable is used as an
|
||||
indication that the task is still running. */
|
||||
xTaskCreate( vCompetingMathTask1, ( signed portCHAR * ) "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask1, ( signed char * ) "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, &xTaskJustCreated );
|
||||
|
||||
/* The task tag value is a value that can be associated with a task, but
|
||||
is not used by the scheduler itself. Its use is down to the application so
|
||||
|
@ -128,25 +129,25 @@ portBASE_TYPE x, y;
|
|||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 0 ][ 0 ] ) );
|
||||
|
||||
/* Create another 7 tasks, allocating a buffer for each. */
|
||||
xTaskCreate( vCompetingMathTask2, ( signed portCHAR * ) "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask2, ( signed char * ) "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 1 ][ 0 ] ) );
|
||||
|
||||
xTaskCreate( vCompetingMathTask3, ( signed portCHAR * ) "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask3, ( signed char * ) "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 2 ][ 0 ] ) );
|
||||
|
||||
xTaskCreate( vCompetingMathTask4, ( signed portCHAR * ) "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask4, ( signed char * ) "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 3 ][ 0 ] ) );
|
||||
|
||||
xTaskCreate( vCompetingMathTask1, ( signed portCHAR * ) "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask1, ( signed char * ) "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 4 ][ 0 ] ) );
|
||||
|
||||
xTaskCreate( vCompetingMathTask2, ( signed portCHAR * ) "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask2, ( signed char * ) "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 5 ][ 0 ] ) );
|
||||
|
||||
xTaskCreate( vCompetingMathTask3, ( signed portCHAR * ) "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask3, ( signed char * ) "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 6 ][ 0 ] ) );
|
||||
|
||||
xTaskCreate( vCompetingMathTask4, ( signed portCHAR * ) "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask4, ( signed char * ) "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 7 ][ 0 ] ) );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -154,9 +155,9 @@ portBASE_TYPE x, y;
|
|||
static portTASK_FUNCTION( vCompetingMathTask1, pvParameters )
|
||||
{
|
||||
volatile portFLOAT ff1, ff2, ff3, ff4;
|
||||
volatile unsigned portSHORT *pusTaskCheckVariable;
|
||||
volatile unsigned short *pusTaskCheckVariable;
|
||||
volatile portFLOAT fAnswer;
|
||||
portSHORT sError = pdFALSE;
|
||||
short sError = pdFALSE;
|
||||
|
||||
ff1 = 123.4567F;
|
||||
ff2 = 2345.6789F;
|
||||
|
@ -166,7 +167,7 @@ portSHORT sError = pdFALSE;
|
|||
|
||||
/* The variable this task increments to show it is still running is passed in
|
||||
as the parameter. */
|
||||
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;
|
||||
pusTaskCheckVariable = ( unsigned short * ) pvParameters;
|
||||
|
||||
/* Keep performing a calculation and checking the result against a constant. */
|
||||
for(;;)
|
||||
|
@ -206,9 +207,9 @@ portSHORT sError = pdFALSE;
|
|||
static portTASK_FUNCTION( vCompetingMathTask2, pvParameters )
|
||||
{
|
||||
volatile portFLOAT ff1, ff2, ff3, ff4;
|
||||
volatile unsigned portSHORT *pusTaskCheckVariable;
|
||||
volatile unsigned short *pusTaskCheckVariable;
|
||||
volatile portFLOAT fAnswer;
|
||||
portSHORT sError = pdFALSE;
|
||||
short sError = pdFALSE;
|
||||
|
||||
ff1 = -389.38F;
|
||||
ff2 = 32498.2F;
|
||||
|
@ -219,7 +220,7 @@ portSHORT sError = pdFALSE;
|
|||
|
||||
/* The variable this task increments to show it is still running is passed in
|
||||
as the parameter. */
|
||||
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;
|
||||
pusTaskCheckVariable = ( unsigned short * ) pvParameters;
|
||||
|
||||
/* Keep performing a calculation and checking the result against a constant. */
|
||||
for( ;; )
|
||||
|
@ -259,14 +260,14 @@ portSHORT sError = pdFALSE;
|
|||
static portTASK_FUNCTION( vCompetingMathTask3, pvParameters )
|
||||
{
|
||||
volatile portFLOAT *pfArray, fTotal1, fTotal2, fDifference;
|
||||
volatile unsigned portSHORT *pusTaskCheckVariable;
|
||||
volatile unsigned short *pusTaskCheckVariable;
|
||||
const size_t xArraySize = 10;
|
||||
size_t xPosition;
|
||||
portSHORT sError = pdFALSE;
|
||||
short sError = pdFALSE;
|
||||
|
||||
/* The variable this task increments to show it is still running is passed in
|
||||
as the parameter. */
|
||||
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;
|
||||
pusTaskCheckVariable = ( unsigned short * ) pvParameters;
|
||||
|
||||
pfArray = ( portFLOAT * ) pvPortMalloc( xArraySize * sizeof( portFLOAT ) );
|
||||
|
||||
|
@ -316,14 +317,14 @@ portSHORT sError = pdFALSE;
|
|||
static portTASK_FUNCTION( vCompetingMathTask4, pvParameters )
|
||||
{
|
||||
volatile portFLOAT *pfArray, fTotal1, fTotal2, fDifference;
|
||||
volatile unsigned portSHORT *pusTaskCheckVariable;
|
||||
volatile unsigned short *pusTaskCheckVariable;
|
||||
const size_t xArraySize = 10;
|
||||
size_t xPosition;
|
||||
portSHORT sError = pdFALSE;
|
||||
short sError = pdFALSE;
|
||||
|
||||
/* The variable this task increments to show it is still running is passed in
|
||||
as the parameter. */
|
||||
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;
|
||||
pusTaskCheckVariable = ( unsigned short * ) pvParameters;
|
||||
|
||||
pfArray = ( portFLOAT * ) pvPortMalloc( xArraySize * sizeof( portFLOAT ) );
|
||||
|
||||
|
@ -375,7 +376,7 @@ portBASE_TYPE xAreMathsTaskStillRunning( void )
|
|||
{
|
||||
/* Keep a history of the check variables so we know if they have been incremented
|
||||
since the last call. */
|
||||
static unsigned portSHORT usLastTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned portSHORT ) 0 };
|
||||
static unsigned short usLastTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned short ) 0 };
|
||||
portBASE_TYPE xReturn = pdTRUE, xTask;
|
||||
|
||||
/* Check the maths tasks are still running by ensuring their check variables
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -149,7 +150,7 @@ discover an unexpected value. */
|
|||
static volatile unsigned portBASE_TYPE xRegTestStatus = pdPASS;
|
||||
|
||||
/* Counters used to ensure the regtest tasks are still running. */
|
||||
static volatile unsigned portLONG ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;
|
||||
static volatile unsigned long ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -184,9 +185,9 @@ int main( void )
|
|||
#endif
|
||||
|
||||
/* Create the tasks defined within this file. */
|
||||
xTaskCreate( prvRegTestTask1, ( signed portCHAR * ) "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||
xTaskCreate( prvRegTestTask2, ( signed portCHAR * ) "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||
xTaskCreate( prvErrorChecks, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( prvRegTestTask1, ( signed char * ) "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||
xTaskCreate( prvRegTestTask2, ( signed char * ) "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||
xTaskCreate( prvErrorChecks, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* The suicide tasks must be started last as they record the number of other
|
||||
tasks that exist within the system. The value is then used to ensure at run
|
||||
|
@ -208,7 +209,7 @@ int main( void )
|
|||
static portBASE_TYPE prvCheckOtherTasksAreStillRunning( void )
|
||||
{
|
||||
portBASE_TYPE lReturn = pdPASS;
|
||||
static unsigned portLONG ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL;
|
||||
static unsigned long ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL;
|
||||
|
||||
/* The demo tasks maintain a count that increments every cycle of the task
|
||||
provided that the task has never encountered an error. This function
|
||||
|
@ -673,12 +674,12 @@ static void prvRegTestTask2( void *pvParameters )
|
|||
/* This hook function will get called if there is a suspected stack overflow.
|
||||
An overflow can cause the task name to be corrupted, in which case the task
|
||||
handle needs to be used to determine the offending task. */
|
||||
void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName );
|
||||
void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName )
|
||||
void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName );
|
||||
void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName )
|
||||
{
|
||||
/* To prevent the optimiser removing the variables. */
|
||||
volatile xTaskHandle xTaskIn = xTask;
|
||||
volatile signed portCHAR *pcTaskNameIn = pcTaskName;
|
||||
volatile signed char *pcTaskNameIn = pcTaskName;
|
||||
|
||||
/* Remove compiler warnings. */
|
||||
( void ) xTaskIn;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -82,7 +83,7 @@ static void vSerialISR( XUartLite *pxUART );
|
|||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
{
|
||||
/* NOTE: The baud rate used by this driver is determined by the hardware
|
||||
parameterization of the UART Lite peripheral, and the baud value passed to
|
||||
|
@ -90,8 +91,8 @@ xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned
|
|||
( void ) ulWantedBaud;
|
||||
|
||||
/* Create the queues used to hold Rx and Tx characters. */
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
|
||||
/* Only initialise the UART if the queues were created correctly. */
|
||||
if( ( xRxedChars != NULL ) && ( xCharsForTx != NULL ) )
|
||||
|
@ -115,7 +116,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
|
||||
{
|
||||
/* The port handle is not required as this driver only supports one UART. */
|
||||
( void ) pxPort;
|
||||
|
@ -133,7 +134,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcR
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )
|
||||
{
|
||||
portBASE_TYPE xReturn = pdTRUE;
|
||||
|
||||
|
@ -184,9 +185,9 @@ void vSerialClose( xComPortHandle xPort )
|
|||
|
||||
static void vSerialISR( XUartLite *pxUART )
|
||||
{
|
||||
unsigned portLONG ulISRStatus;
|
||||
unsigned long ulISRStatus;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE, lDidSomething;
|
||||
portCHAR cChar;
|
||||
char cChar;
|
||||
|
||||
/* Just to remove compiler warning. */
|
||||
( void ) pxUART;
|
||||
|
@ -202,7 +203,7 @@ portCHAR cChar;
|
|||
/* A character is available - place it in the queue of received
|
||||
characters. This might wake a task that was blocked waiting for
|
||||
data. */
|
||||
cChar = ( portCHAR ) XIo_In32( XPAR_RS232_UART_1_BASEADDR + XUL_RX_FIFO_OFFSET );
|
||||
cChar = ( char ) XIo_In32( XPAR_RS232_UART_1_BASEADDR + XUL_RX_FIFO_OFFSET );
|
||||
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
|
||||
lDidSomething = pdTRUE;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -65,8 +66,8 @@
|
|||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 250 )
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) XPAR_CPU_PPC440_CORE_CLOCK_FREQ_HZ ) /* Clock setup from start.asm in the demo application. */
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 250 )
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned long ) XPAR_CPU_PPC440_CORE_CLOCK_FREQ_HZ ) /* Clock setup from start.asm in the demo application. */
|
||||
#define configTICK_RATE_HZ ( (portTickType) 1000 )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 6 )
|
||||
#define configTOTAL_HEAP_SIZE ( (size_t) (80 * 1024) )
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -107,11 +108,11 @@ static void vFlopTest2( void *pvParameters );
|
|||
|
||||
/* Buffers into which the flop registers will be saved. There is a buffer for
|
||||
both tasks. */
|
||||
static volatile unsigned portLONG ulFlopRegisters[ flopNUMBER_OF_TASKS ][ portNO_FLOP_REGISTERS_TO_SAVE ];
|
||||
static volatile unsigned long ulFlopRegisters[ flopNUMBER_OF_TASKS ][ portNO_FLOP_REGISTERS_TO_SAVE ];
|
||||
|
||||
/* Variables that are incremented by the tasks to indicate that they are still
|
||||
running. */
|
||||
static volatile unsigned portLONG ulFlop1CycleCount = 0, ulFlop2CycleCount = 0;
|
||||
static volatile unsigned long ulFlop1CycleCount = 0, ulFlop2CycleCount = 0;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -137,7 +138,7 @@ unsigned portBASE_TYPE x, y, z = flopSTART_VALUE;
|
|||
|
||||
|
||||
/* Create the first task. */
|
||||
xTaskCreate( vFlopTest1, ( signed portCHAR * ) "flop1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated );
|
||||
xTaskCreate( vFlopTest1, ( signed char * ) "flop1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated );
|
||||
|
||||
/* The task tag value is a value that can be associated with a task, but
|
||||
is not used by the scheduler itself. Its use is down to the application so
|
||||
|
@ -147,7 +148,7 @@ unsigned portBASE_TYPE x, y, z = flopSTART_VALUE;
|
|||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 0 ][ 0 ] ) );
|
||||
|
||||
/* Do the same for the second task. */
|
||||
xTaskCreate( vFlopTest2, ( signed portCHAR * ) "flop2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated );
|
||||
xTaskCreate( vFlopTest2, ( signed char * ) "flop2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 1 ][ 0 ] ) );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -201,7 +202,7 @@ portBASE_TYPE xAreFlopRegisterTestsStillRunning( void )
|
|||
{
|
||||
portBASE_TYPE xReturn = pdPASS;
|
||||
unsigned portBASE_TYPE x, y, z = flopSTART_VALUE;
|
||||
static unsigned portLONG ulLastFlop1CycleCount = 0, ulLastFlop2CycleCount = 0;
|
||||
static unsigned long ulLastFlop1CycleCount = 0, ulLastFlop2CycleCount = 0;
|
||||
|
||||
/* Called from the 'check' task.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -84,13 +85,13 @@ static portTASK_FUNCTION_PROTO( vCompetingMathTask4, pvParameters );
|
|||
|
||||
/* These variables are used to check that all the tasks are still running. If a
|
||||
task gets a calculation wrong it will stop incrementing its check variable. */
|
||||
static volatile unsigned portSHORT usTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned portSHORT ) 0 };
|
||||
static volatile unsigned short usTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned short ) 0 };
|
||||
|
||||
/* Buffers into which the flop registers will be saved. There is a buffer for
|
||||
each task created within this file. Zeroing out this array is the normal and
|
||||
safe option as this will cause the task to start with all zeros in its flop
|
||||
context. */
|
||||
static unsigned portLONG ulFlopRegisters[ mathNUMBER_OF_TASKS ][ portNO_FLOP_REGISTERS_TO_SAVE ];
|
||||
static unsigned long ulFlopRegisters[ mathNUMBER_OF_TASKS ][ portNO_FLOP_REGISTERS_TO_SAVE ];
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -118,7 +119,7 @@ portBASE_TYPE x, y;
|
|||
/* Create the first task - passing it the address of the check variable
|
||||
that it is going to increment. This check variable is used as an
|
||||
indication that the task is still running. */
|
||||
xTaskCreate( vCompetingMathTask1, ( signed portCHAR * ) "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask1, ( signed char * ) "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, &xTaskJustCreated );
|
||||
|
||||
/* The task tag value is a value that can be associated with a task, but
|
||||
is not used by the scheduler itself. Its use is down to the application so
|
||||
|
@ -128,25 +129,25 @@ portBASE_TYPE x, y;
|
|||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 0 ][ 0 ] ) );
|
||||
|
||||
/* Create another 7 tasks, allocating a buffer for each. */
|
||||
xTaskCreate( vCompetingMathTask2, ( signed portCHAR * ) "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask2, ( signed char * ) "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 1 ][ 0 ] ) );
|
||||
|
||||
xTaskCreate( vCompetingMathTask3, ( signed portCHAR * ) "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask3, ( signed char * ) "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 2 ][ 0 ] ) );
|
||||
|
||||
xTaskCreate( vCompetingMathTask4, ( signed portCHAR * ) "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask4, ( signed char * ) "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 3 ][ 0 ] ) );
|
||||
|
||||
xTaskCreate( vCompetingMathTask1, ( signed portCHAR * ) "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask1, ( signed char * ) "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 4 ][ 0 ] ) );
|
||||
|
||||
xTaskCreate( vCompetingMathTask2, ( signed portCHAR * ) "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask2, ( signed char * ) "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 5 ][ 0 ] ) );
|
||||
|
||||
xTaskCreate( vCompetingMathTask3, ( signed portCHAR * ) "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask3, ( signed char * ) "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 6 ][ 0 ] ) );
|
||||
|
||||
xTaskCreate( vCompetingMathTask4, ( signed portCHAR * ) "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, &xTaskJustCreated );
|
||||
xTaskCreate( vCompetingMathTask4, ( signed char * ) "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, &xTaskJustCreated );
|
||||
vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( ulFlopRegisters[ 7 ][ 0 ] ) );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -154,9 +155,9 @@ portBASE_TYPE x, y;
|
|||
static portTASK_FUNCTION( vCompetingMathTask1, pvParameters )
|
||||
{
|
||||
volatile portFLOAT ff1, ff2, ff3, ff4;
|
||||
volatile unsigned portSHORT *pusTaskCheckVariable;
|
||||
volatile unsigned short *pusTaskCheckVariable;
|
||||
volatile portFLOAT fAnswer;
|
||||
portSHORT sError = pdFALSE;
|
||||
short sError = pdFALSE;
|
||||
|
||||
ff1 = 123.4567F;
|
||||
ff2 = 2345.6789F;
|
||||
|
@ -166,7 +167,7 @@ portSHORT sError = pdFALSE;
|
|||
|
||||
/* The variable this task increments to show it is still running is passed in
|
||||
as the parameter. */
|
||||
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;
|
||||
pusTaskCheckVariable = ( unsigned short * ) pvParameters;
|
||||
|
||||
/* Keep performing a calculation and checking the result against a constant. */
|
||||
for(;;)
|
||||
|
@ -206,9 +207,9 @@ portSHORT sError = pdFALSE;
|
|||
static portTASK_FUNCTION( vCompetingMathTask2, pvParameters )
|
||||
{
|
||||
volatile portFLOAT ff1, ff2, ff3, ff4;
|
||||
volatile unsigned portSHORT *pusTaskCheckVariable;
|
||||
volatile unsigned short *pusTaskCheckVariable;
|
||||
volatile portFLOAT fAnswer;
|
||||
portSHORT sError = pdFALSE;
|
||||
short sError = pdFALSE;
|
||||
|
||||
ff1 = -389.38F;
|
||||
ff2 = 32498.2F;
|
||||
|
@ -219,7 +220,7 @@ portSHORT sError = pdFALSE;
|
|||
|
||||
/* The variable this task increments to show it is still running is passed in
|
||||
as the parameter. */
|
||||
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;
|
||||
pusTaskCheckVariable = ( unsigned short * ) pvParameters;
|
||||
|
||||
/* Keep performing a calculation and checking the result against a constant. */
|
||||
for( ;; )
|
||||
|
@ -259,14 +260,14 @@ portSHORT sError = pdFALSE;
|
|||
static portTASK_FUNCTION( vCompetingMathTask3, pvParameters )
|
||||
{
|
||||
volatile portFLOAT *pfArray, fTotal1, fTotal2, fDifference;
|
||||
volatile unsigned portSHORT *pusTaskCheckVariable;
|
||||
volatile unsigned short *pusTaskCheckVariable;
|
||||
const size_t xArraySize = 10;
|
||||
size_t xPosition;
|
||||
portSHORT sError = pdFALSE;
|
||||
short sError = pdFALSE;
|
||||
|
||||
/* The variable this task increments to show it is still running is passed in
|
||||
as the parameter. */
|
||||
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;
|
||||
pusTaskCheckVariable = ( unsigned short * ) pvParameters;
|
||||
|
||||
pfArray = ( portFLOAT * ) pvPortMalloc( xArraySize * sizeof( portFLOAT ) );
|
||||
|
||||
|
@ -316,14 +317,14 @@ portSHORT sError = pdFALSE;
|
|||
static portTASK_FUNCTION( vCompetingMathTask4, pvParameters )
|
||||
{
|
||||
volatile portFLOAT *pfArray, fTotal1, fTotal2, fDifference;
|
||||
volatile unsigned portSHORT *pusTaskCheckVariable;
|
||||
volatile unsigned short *pusTaskCheckVariable;
|
||||
const size_t xArraySize = 10;
|
||||
size_t xPosition;
|
||||
portSHORT sError = pdFALSE;
|
||||
short sError = pdFALSE;
|
||||
|
||||
/* The variable this task increments to show it is still running is passed in
|
||||
as the parameter. */
|
||||
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;
|
||||
pusTaskCheckVariable = ( unsigned short * ) pvParameters;
|
||||
|
||||
pfArray = ( portFLOAT * ) pvPortMalloc( xArraySize * sizeof( portFLOAT ) );
|
||||
|
||||
|
@ -375,7 +376,7 @@ portBASE_TYPE xAreMathsTaskStillRunning( void )
|
|||
{
|
||||
/* Keep a history of the check variables so we know if they have been incremented
|
||||
since the last call. */
|
||||
static unsigned portSHORT usLastTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned portSHORT ) 0 };
|
||||
static unsigned short usLastTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned short ) 0 };
|
||||
portBASE_TYPE xReturn = pdTRUE, xTask;
|
||||
|
||||
/* Check the maths tasks are still running by ensuring their check variables
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
@ -149,7 +150,7 @@ discover an unexpected value. */
|
|||
static volatile unsigned portBASE_TYPE xRegTestStatus = pdPASS;
|
||||
|
||||
/* Counters used to ensure the regtest tasks are still running. */
|
||||
static volatile unsigned portLONG ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;
|
||||
static volatile unsigned long ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -190,9 +191,9 @@ int main( void )
|
|||
#endif
|
||||
|
||||
/* Create the tasks defined within this file. */
|
||||
xTaskCreate( prvRegTestTask1, ( signed portCHAR * ) "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||
xTaskCreate( prvRegTestTask2, ( signed portCHAR * ) "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||
xTaskCreate( prvErrorChecks, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( prvRegTestTask1, ( signed char * ) "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||
xTaskCreate( prvRegTestTask2, ( signed char * ) "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||
xTaskCreate( prvErrorChecks, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* The suicide tasks must be started last as they record the number of other
|
||||
tasks that exist within the system. The value is then used to ensure at run
|
||||
|
@ -214,7 +215,7 @@ int main( void )
|
|||
static portBASE_TYPE prvCheckOtherTasksAreStillRunning( void )
|
||||
{
|
||||
portBASE_TYPE lReturn = pdPASS;
|
||||
static unsigned portLONG ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL;
|
||||
static unsigned long ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL;
|
||||
|
||||
/* The demo tasks maintain a count that increments every cycle of the task
|
||||
provided that the task has never encountered an error. This function
|
||||
|
@ -679,12 +680,12 @@ static void prvRegTestTask2( void *pvParameters )
|
|||
/* This hook function will get called if there is a suspected stack overflow.
|
||||
An overflow can cause the task name to be corrupted, in which case the task
|
||||
handle needs to be used to determine the offending task. */
|
||||
void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName );
|
||||
void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName )
|
||||
void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName );
|
||||
void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName )
|
||||
{
|
||||
/* To prevent the optimiser removing the variables. */
|
||||
volatile xTaskHandle xTaskIn = xTask;
|
||||
volatile signed portCHAR *pcTaskNameIn = pcTaskName;
|
||||
volatile signed char *pcTaskNameIn = pcTaskName;
|
||||
|
||||
/* Remove compiler warnings. */
|
||||
( void ) xTaskIn;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
|||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Looking for a quick start? Then check out the FreeRTOS eBook! *
|
||||
* See http://www.FreeRTOS.org/Documentation for details *
|
||||
* The FreeRTOS eBook and reference manual are available to purchase for a *
|
||||
* small fee. Help yourself get started quickly while also helping the *
|
||||
* FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue