Remove unnecessary use of portLONG, portCHAR and portSHORT.

Change version number in headers.
This commit is contained in:
Richard Barry 2009-10-05 10:23:06 +00:00
parent 7f0c4ef656
commit 64c701aff7
96 changed files with 3668 additions and 3576 deletions

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef FREERTOS_CONFIG_H #ifndef FREERTOS_CONFIG_H
@ -63,9 +64,9 @@
#define configUSE_PREEMPTION 1 #define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0 #define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 1 #define configUSE_TICK_HOOK 1
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 48000000 ) #define configCPU_CLOCK_HZ ( ( unsigned long ) 48000000 )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 70 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24000 ) ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24000 ) )
#define configMAX_TASK_NAME_LEN ( 12 ) #define configMAX_TASK_NAME_LEN ( 12 )
#define configUSE_TRACE_FACILITY 1 #define configUSE_TRACE_FACILITY 1

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/*----------------------------------------------------------- /*-----------------------------------------------------------

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef LCD_MESSAGE_H #ifndef LCD_MESSAGE_H

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*
@ -207,7 +208,7 @@ void prvSetupHardware( void )
void vApplicationTickHook( void ) void vApplicationTickHook( void )
{ {
static xLCDMessage xMessage = { "PASS" }; static xLCDMessage xMessage = { "PASS" };
static unsigned portLONG ulTicksSinceLastDisplay = 0; static unsigned long ulTicksSinceLastDisplay = 0;
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* Called from every tick interrupt. Have enough ticks passed to make it /* Called from every tick interrupt. Have enough ticks passed to make it
@ -262,7 +263,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName ) void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )
{ {
( void ) pxTask; ( void ) pxTask;
( void ) pcTaskName; ( void ) pcTaskName;

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*
@ -76,8 +77,8 @@
#define serINVALID_QUEUE ( ( xQueueHandle ) 0 ) #define serINVALID_QUEUE ( ( xQueueHandle ) 0 )
#define serHANDLE ( ( xComPortHandle ) 1 ) #define serHANDLE ( ( xComPortHandle ) 1 )
#define serNO_BLOCK ( ( portTickType ) 0 ) #define serNO_BLOCK ( ( portTickType ) 0 )
#define serNO_TIMEGUARD ( ( unsigned portLONG ) 0 ) #define serNO_TIMEGUARD ( ( unsigned long ) 0 )
#define serNO_PERIPHERAL_B_SETUP ( ( unsigned portLONG ) 0 ) #define serNO_PERIPHERAL_B_SETUP ( ( unsigned long ) 0 )
/* Queues used to hold received characters, and characters waiting to be /* Queues used to hold received characters, and characters waiting to be
@ -95,7 +96,7 @@ void vSerialISR( void );
/* /*
* See the serial2.h header file. * See the serial2.h header file.
*/ */
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ) xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
{ {
xComPortHandle xReturn = serHANDLE; xComPortHandle xReturn = serHANDLE;
extern void ( vUART_ISR )( void ); extern void ( vUART_ISR )( void );
@ -103,8 +104,8 @@ const Pin xUSART_Pins[] = { BOARD_PIN_USART_RXD, BOARD_PIN_USART_TXD };
/* Create the queues used to hold Rx and Tx characters. */ /* Create the queues used to hold Rx and Tx characters. */
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) ); xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) ); xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
/* If the queues were created correctly then setup the serial port /* If the queues were created correctly then setup the serial port
hardware. */ hardware. */
@ -143,7 +144,7 @@ const Pin xUSART_Pins[] = { BOARD_PIN_USART_RXD, BOARD_PIN_USART_TXD };
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
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 port. */ /* The port handle is not required as this driver only supports one port. */
( void ) pxPort; ( void ) pxPort;
@ -161,9 +162,9 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcR
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
void vSerialPutString( xComPortHandle pxPort, const signed portCHAR * const pcString, unsigned portSHORT usStringLength ) void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )
{ {
signed portCHAR *pxNext; signed char *pxNext;
/* A couple of parameters that this port does not use. */ /* A couple of parameters that this port does not use. */
( void ) usStringLength; ( void ) usStringLength;
@ -176,7 +177,7 @@ signed portCHAR *pxNext;
( void ) pxPort; ( void ) pxPort;
/* Send each character in the string, one at a time. */ /* Send each character in the string, one at a time. */
pxNext = ( signed portCHAR * ) pcString; pxNext = ( signed char * ) pcString;
while( *pxNext ) while( *pxNext )
{ {
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK ); xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );
@ -185,7 +186,7 @@ signed portCHAR *pxNext;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime ) signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )
{ {
/* Place the character in the queue of characters to be transmitted. */ /* Place the character in the queue of characters to be transmitted. */
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS ) if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )
@ -211,8 +212,8 @@ void vSerialClose( xComPortHandle xPort )
void vSerialISR( void ) void vSerialISR( void )
{ {
unsigned portLONG ulStatus; unsigned long ulStatus;
signed portCHAR cChar; signed char cChar;
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* What caused the interrupt? */ /* What caused the interrupt? */

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef FREERTOS_CONFIG_H #ifndef FREERTOS_CONFIG_H
@ -63,9 +64,9 @@
#define configUSE_PREEMPTION 1 #define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 1 #define configUSE_IDLE_HOOK 1
#define configUSE_TICK_HOOK 0 #define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 20000000 ) #define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 59 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 59 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1468 ) ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1468 ) )
#define configMAX_TASK_NAME_LEN ( 3 ) #define configMAX_TASK_NAME_LEN ( 3 )
#define configUSE_TRACE_FACILITY 0 #define configUSE_TRACE_FACILITY 0

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*
@ -154,8 +155,8 @@ characters from mainFIRST_TX_CHAR to mainLAST_TX_CHAR. */
/* Just used to walk through the program memory in order that some random data /* Just used to walk through the program memory in order that some random data
can be generated. */ can be generated. */
#define mainTOTAL_PROGRAM_MEMORY ( ( unsigned portLONG * ) ( 8 * 1024 ) ) #define mainTOTAL_PROGRAM_MEMORY ( ( unsigned long * ) ( 8 * 1024 ) )
#define mainFIRST_PROGRAM_BYTES ( ( unsigned portLONG * ) 4 ) #define mainFIRST_PROGRAM_BYTES ( ( unsigned long * ) 4 )
/* The error routine that is called if the driver library encounters an error. */ /* The error routine that is called if the driver library encounters an error. */
#ifdef DEBUG #ifdef DEBUG
@ -186,7 +187,7 @@ static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE
/* /*
* Writes a string the the LCD. * Writes a string the the LCD.
*/ */
static void prvWriteString( const portCHAR *pcString ); static void prvWriteString( const char *pcString );
/* /*
* Initialisation routine for the UART. * Initialisation routine for the UART.
@ -196,7 +197,7 @@ static void vSerialInit( void );
/* /*
* Thread safe write to the PDC. * Thread safe write to the PDC.
*/ */
static void prvPDCWrite( portCHAR cAddress, portCHAR cData ); static void prvPDCWrite( char cAddress, char cData );
/* /*
* Function to simply set a known value into the general purpose registers * Function to simply set a known value into the general purpose registers
@ -222,7 +223,7 @@ defined within this file. */
unsigned portBASE_TYPE uxErrorStatus = pdPASS; unsigned portBASE_TYPE uxErrorStatus = pdPASS;
/* The next character to transmit. */ /* The next character to transmit. */
static portCHAR cNextChar; static char cNextChar;
/* The queue used to transmit characters from the interrupt to the Comms Rx /* The queue used to transmit characters from the interrupt to the Comms Rx
task. */ task. */
@ -234,7 +235,7 @@ void Main( void )
{ {
/* Create the queue used to communicate between the UART ISR and the Comms /* Create the queue used to communicate between the UART ISR and the Comms
Rx task. */ Rx task. */
xCommsQueue = xQueueCreate( mainRX_QUEUE_LEN, sizeof( portCHAR ) ); xCommsQueue = xQueueCreate( mainRX_QUEUE_LEN, sizeof( char ) );
/* Setup the ports used by the demo and the clock. */ /* Setup the ports used by the demo and the clock. */
prvSetupHardware(); prvSetupHardware();
@ -286,7 +287,7 @@ void vApplicationIdleHook( void )
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static void prvWriteString( const portCHAR *pcString ) static void prvWriteString( const char *pcString )
{ {
/* Write pcString to the LED, pausing between each character. */ /* Write pcString to the LED, pausing between each character. */
prvPDCWrite(PDC_LCD_CSR, LCD_CLEAR); prvPDCWrite(PDC_LCD_CSR, LCD_CLEAR);
@ -302,7 +303,7 @@ static void prvWriteString( const portCHAR *pcString )
void vLCDTask( void * pvParameters ) void vLCDTask( void * pvParameters )
{ {
unsigned portBASE_TYPE uxIndex; unsigned portBASE_TYPE uxIndex;
const unsigned portCHAR ucCFGData[] = { const unsigned char ucCFGData[] = {
0x30, /* Set data bus to 8-bits. */ 0x30, /* Set data bus to 8-bits. */
0x30, 0x30,
0x30, 0x30,
@ -314,7 +315,7 @@ const unsigned portCHAR ucCFGData[] = {
}; };
/* The strings that are written to the LCD. */ /* The strings that are written to the LCD. */
const portCHAR *pcStringsToDisplay[] = { const char *pcStringsToDisplay[] = {
"Stellaris", "Stellaris",
"Demo", "Demo",
"One", "One",
@ -361,7 +362,7 @@ const portCHAR *pcStringsToDisplay[] = {
static void vCommsRxTask( void * pvParameters ) static void vCommsRxTask( void * pvParameters )
{ {
static portCHAR cRxedChar, cExpectedChar; static char cRxedChar, cExpectedChar;
/* Set the char we expect to receive to the start of the string. */ /* Set the char we expect to receive to the start of the string. */
cExpectedChar = mainFIRST_TX_CHAR; cExpectedChar = mainFIRST_TX_CHAR;
@ -413,7 +414,7 @@ static portCHAR cRxedChar, cExpectedChar;
static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex ) static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
{ {
portTickType xDelayPeriod; portTickType xDelayPeriod;
static unsigned portLONG *pulRandomBytes = mainFIRST_PROGRAM_BYTES; static unsigned long *pulRandomBytes = mainFIRST_PROGRAM_BYTES;
/* Co-routine MUST start with a call to crSTART. */ /* Co-routine MUST start with a call to crSTART. */
crSTART( xHandle ); crSTART( xHandle );
@ -499,8 +500,8 @@ static void vSerialInit( void )
void vUART_ISR(void) void vUART_ISR(void)
{ {
unsigned portLONG ulStatus; unsigned long ulStatus;
portCHAR cRxedChar; char cRxedChar;
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* What caused the interrupt. */ /* What caused the interrupt. */
@ -517,7 +518,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* Get the char from the buffer and post it onto the queue of /* Get the char from the buffer and post it onto the queue of
Rxed chars. Posting the character should wake the task that is Rxed chars. Posting the character should wake the task that is
blocked on the queue waiting for characters. */ blocked on the queue waiting for characters. */
cRxedChar = ( portCHAR ) HWREG( UART0_BASE + UART_O_DR ); cRxedChar = ( char ) HWREG( UART0_BASE + UART_O_DR );
xQueueSendFromISR( xCommsQueue, &cRxedChar, &xHigherPriorityTaskWoken ); xQueueSendFromISR( xCommsQueue, &cRxedChar, &xHigherPriorityTaskWoken );
} }
} }
@ -544,7 +545,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static void prvPDCWrite( portCHAR cAddress, portCHAR cData ) static void prvPDCWrite( char cAddress, char cData )
{ {
vTaskSuspendAll(); vTaskSuspendAll();
{ {

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef FREERTOS_CONFIG_H #ifndef FREERTOS_CONFIG_H
@ -63,9 +64,9 @@
#define configUSE_PREEMPTION 1 #define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 1 #define configUSE_IDLE_HOOK 1
#define configUSE_TICK_HOOK 0 #define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 20000000 ) #define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 59 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 59 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1240 ) ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1240 ) )
#define configMAX_TASK_NAME_LEN ( 3 ) #define configMAX_TASK_NAME_LEN ( 3 )
#define configUSE_TRACE_FACILITY 0 #define configUSE_TRACE_FACILITY 0

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*
@ -158,8 +159,8 @@ characters from mainFIRST_TX_CHAR to mainLAST_TX_CHAR. */
/* Just used to walk through the program memory in order that some random data /* Just used to walk through the program memory in order that some random data
can be generated. */ can be generated. */
#define mainTOTAL_PROGRAM_MEMORY ( ( unsigned portLONG * ) ( 8 * 1024 ) ) #define mainTOTAL_PROGRAM_MEMORY ( ( unsigned long * ) ( 8 * 1024 ) )
#define mainFIRST_PROGRAM_BYTES ( ( unsigned portLONG * ) 4 ) #define mainFIRST_PROGRAM_BYTES ( ( unsigned long * ) 4 )
/* The error routine that is called if the driver library encounters an error. */ /* The error routine that is called if the driver library encounters an error. */
#ifdef DEBUG #ifdef DEBUG
@ -190,7 +191,7 @@ static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE
/* /*
* Writes a string the the LCD. * Writes a string the the LCD.
*/ */
static void prvWriteString( const portCHAR *pcString ); static void prvWriteString( const char *pcString );
/* /*
* Initialisation routine for the UART. * Initialisation routine for the UART.
@ -200,7 +201,7 @@ static void vSerialInit( void );
/* /*
* Thread safe write to the PDC. * Thread safe write to the PDC.
*/ */
static void prvPDCWrite( portCHAR cAddress, portCHAR cData ); static void prvPDCWrite( char cAddress, char cData );
/* /*
* Function to simply set a known value into the general purpose registers * Function to simply set a known value into the general purpose registers
@ -226,7 +227,7 @@ defined within this file. */
unsigned portBASE_TYPE uxErrorStatus = pdPASS; unsigned portBASE_TYPE uxErrorStatus = pdPASS;
/* The next character to transmit. */ /* The next character to transmit. */
static portCHAR cNextChar; static char cNextChar;
/* The queue used to transmit characters from the interrupt to the Comms Rx /* The queue used to transmit characters from the interrupt to the Comms Rx
task. */ task. */
@ -238,7 +239,7 @@ void Main( void )
{ {
/* Create the queue used to communicate between the UART ISR and the Comms /* Create the queue used to communicate between the UART ISR and the Comms
Rx task. */ Rx task. */
xCommsQueue = xQueueCreate( mainRX_QUEUE_LEN, sizeof( portCHAR ) ); xCommsQueue = xQueueCreate( mainRX_QUEUE_LEN, sizeof( char ) );
/* Setup the ports used by the demo and the clock. */ /* Setup the ports used by the demo and the clock. */
prvSetupHardware(); prvSetupHardware();
@ -292,7 +293,7 @@ void vApplicationIdleHook( void )
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static void prvWriteString( const portCHAR *pcString ) static void prvWriteString( const char *pcString )
{ {
/* Write pcString to the LED, pausing between each character. */ /* Write pcString to the LED, pausing between each character. */
prvPDCWrite(PDC_LCD_CSR, LCD_CLEAR); prvPDCWrite(PDC_LCD_CSR, LCD_CLEAR);
@ -308,7 +309,7 @@ static void prvWriteString( const portCHAR *pcString )
void vLCDTask( void * pvParameters ) void vLCDTask( void * pvParameters )
{ {
unsigned portBASE_TYPE uxIndex; unsigned portBASE_TYPE uxIndex;
const unsigned portCHAR ucCFGData[] = { const unsigned char ucCFGData[] = {
0x30, /* Set data bus to 8-bits. */ 0x30, /* Set data bus to 8-bits. */
0x30, 0x30,
0x30, 0x30,
@ -320,7 +321,7 @@ const unsigned portCHAR ucCFGData[] = {
}; };
/* The strings that are written to the LCD. */ /* The strings that are written to the LCD. */
const portCHAR *pcStringsToDisplay[] = { const char *pcStringsToDisplay[] = {
"Stellaris", "Stellaris",
"Demo", "Demo",
"Two", "Two",
@ -367,7 +368,7 @@ const portCHAR *pcStringsToDisplay[] = {
static void vCommsRxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex ) static void vCommsRxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
{ {
static portCHAR cRxedChar, cExpectedChar = mainFIRST_TX_CHAR; static char cRxedChar, cExpectedChar = mainFIRST_TX_CHAR;
portBASE_TYPE xResult; portBASE_TYPE xResult;
crSTART( xHandle ); crSTART( xHandle );
@ -421,7 +422,7 @@ portBASE_TYPE xResult;
static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex ) static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
{ {
portTickType xDelayPeriod; portTickType xDelayPeriod;
static unsigned portLONG *pulRandomBytes = mainFIRST_PROGRAM_BYTES; static unsigned long *pulRandomBytes = mainFIRST_PROGRAM_BYTES;
/* Co-routine MUST start with a call to crSTART. */ /* Co-routine MUST start with a call to crSTART. */
crSTART( xHandle ); crSTART( xHandle );
@ -507,8 +508,8 @@ static void vSerialInit( void )
void vUART_ISR(void) void vUART_ISR(void)
{ {
unsigned portLONG ulStatus; unsigned long ulStatus;
portCHAR cRxedChar; char cRxedChar;
portBASE_TYPE xTaskWokenByPost = pdFALSE; portBASE_TYPE xTaskWokenByPost = pdFALSE;
/* What caused the interrupt. */ /* What caused the interrupt. */
@ -525,7 +526,7 @@ portBASE_TYPE xTaskWokenByPost = pdFALSE;
/* Get the char from the buffer and post it onto the queue of /* Get the char from the buffer and post it onto the queue of
Rxed chars. Posting the character should wake the task that is Rxed chars. Posting the character should wake the task that is
blocked on the queue waiting for characters. */ blocked on the queue waiting for characters. */
cRxedChar = ( portCHAR ) HWREG( UART0_BASE + UART_O_DR ); cRxedChar = ( char ) HWREG( UART0_BASE + UART_O_DR );
xTaskWokenByPost = crQUEUE_SEND_FROM_ISR( xCommsQueue, &cRxedChar, xTaskWokenByPost ); xTaskWokenByPost = crQUEUE_SEND_FROM_ISR( xCommsQueue, &cRxedChar, xTaskWokenByPost );
} }
} }
@ -552,7 +553,7 @@ portBASE_TYPE xTaskWokenByPost = pdFALSE;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static void prvPDCWrite( portCHAR cAddress, portCHAR cData ) static void prvPDCWrite( char cAddress, char cData )
{ {
vTaskSuspendAll(); vTaskSuspendAll();
{ {

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef FREERTOS_CONFIG_H #ifndef FREERTOS_CONFIG_H
@ -63,9 +64,9 @@
#define configUSE_PREEMPTION 1 #define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 1 #define configUSE_IDLE_HOOK 1
#define configUSE_TICK_HOOK 0 #define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 20000000 ) #define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 59 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 59 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1468 ) ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1468 ) )
#define configMAX_TASK_NAME_LEN ( 3 ) #define configMAX_TASK_NAME_LEN ( 3 )
#define configUSE_TRACE_FACILITY 0 #define configUSE_TRACE_FACILITY 0

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/*----------------------------------------------------------- /*-----------------------------------------------------------
@ -61,10 +62,10 @@
#define partstPINS (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 Z | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7) #define partstPINS (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 Z | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7)
#define partstALL_OUTPUTS_OFF ( ( unsigned portCHAR ) 0x00 ) #define partstALL_OUTPUTS_OFF ( ( unsigned char ) 0x00 )
#define partstMAX_OUTPUT_LED ( ( unsigned portCHAR ) 8 ) #define partstMAX_OUTPUT_LED ( ( unsigned char ) 8 )
static volatile unsigned portCHAR ucOutputValue = partstALL_OUTPUTS_OFF; static volatile unsigned char ucOutputValue = partstALL_OUTPUTS_OFF;
void vParTestInitialise( void ) void vParTestInitialise( void )
{ {
@ -75,17 +76,17 @@ void vParTestInitialise( void )
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue ) void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
{ {
unsigned portCHAR ucBit = ( unsigned portCHAR ) 1; unsigned char ucBit = ( unsigned char ) 1;
vTaskSuspendAll(); vTaskSuspendAll();
{ {
if( uxLED < partstMAX_OUTPUT_LED ) if( uxLED < partstMAX_OUTPUT_LED )
{ {
ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED; ucBit = ( ( unsigned char ) 1 ) << uxLED;
if( xValue == pdFALSE ) if( xValue == pdFALSE )
{ {
ucBit ^= ( unsigned portCHAR ) 0xff; ucBit ^= ( unsigned char ) 0xff;
ucOutputValue &= ucBit; ucOutputValue &= ucBit;
} }
else else
@ -102,13 +103,13 @@ unsigned portCHAR ucBit = ( unsigned portCHAR ) 1;
void vParTestToggleLED( unsigned portBASE_TYPE uxLED ) void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
{ {
unsigned portCHAR ucBit; unsigned char ucBit;
vTaskSuspendAll(); vTaskSuspendAll();
{ {
if( uxLED < partstMAX_OUTPUT_LED ) if( uxLED < partstMAX_OUTPUT_LED )
{ {
ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED; ucBit = ( ( unsigned char ) 1 ) << uxLED;
if( ucOutputValue & ucBit ) if( ucOutputValue & ucBit )
{ {

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*
@ -154,8 +155,8 @@ characters from mainFIRST_TX_CHAR to mainLAST_TX_CHAR. */
/* Just used to walk through the program memory in order that some random data /* Just used to walk through the program memory in order that some random data
can be generated. */ can be generated. */
#define mainTOTAL_PROGRAM_MEMORY ( ( unsigned portLONG * ) ( 8 * 1024 ) ) #define mainTOTAL_PROGRAM_MEMORY ( ( unsigned long * ) ( 8 * 1024 ) )
#define mainFIRST_PROGRAM_BYTES ( ( unsigned portLONG * ) 4 ) #define mainFIRST_PROGRAM_BYTES ( ( unsigned long * ) 4 )
/* The error routine that is called if the driver library encounters an error. */ /* The error routine that is called if the driver library encounters an error. */
#ifdef DEBUG #ifdef DEBUG
@ -186,7 +187,7 @@ static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE
/* /*
* Writes a string the the LCD. * Writes a string the the LCD.
*/ */
static void prvWriteString( const portCHAR *pcString ); static void prvWriteString( const char *pcString );
/* /*
* Initialisation routine for the UART. * Initialisation routine for the UART.
@ -196,7 +197,7 @@ static void vSerialInit( void );
/* /*
* Thread safe write to the PDC. * Thread safe write to the PDC.
*/ */
static void prvPDCWrite( portCHAR cAddress, portCHAR cData ); static void prvPDCWrite( char cAddress, char cData );
/* /*
* Function to simply set a known value into the general purpose registers * Function to simply set a known value into the general purpose registers
@ -222,7 +223,7 @@ defined within this file. */
unsigned portBASE_TYPE uxErrorStatus = pdPASS; unsigned portBASE_TYPE uxErrorStatus = pdPASS;
/* The next character to transmit. */ /* The next character to transmit. */
static portCHAR cNextChar; static char cNextChar;
/* The queue used to transmit characters from the interrupt to the Comms Rx /* The queue used to transmit characters from the interrupt to the Comms Rx
task. */ task. */
@ -234,7 +235,7 @@ void Main( void )
{ {
/* Create the queue used to communicate between the UART ISR and the Comms /* Create the queue used to communicate between the UART ISR and the Comms
Rx task. */ Rx task. */
xCommsQueue = xQueueCreate( mainRX_QUEUE_LEN, sizeof( portCHAR ) ); xCommsQueue = xQueueCreate( mainRX_QUEUE_LEN, sizeof( char ) );
/* Setup the ports used by the demo and the clock. */ /* Setup the ports used by the demo and the clock. */
prvSetupHardware(); prvSetupHardware();
@ -286,7 +287,7 @@ void vApplicationIdleHook( void )
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static void prvWriteString( const portCHAR *pcString ) static void prvWriteString( const char *pcString )
{ {
/* Write pcString to the LED, pausing between each character. */ /* Write pcString to the LED, pausing between each character. */
prvPDCWrite(PDC_LCD_CSR, LCD_CLEAR); prvPDCWrite(PDC_LCD_CSR, LCD_CLEAR);
@ -302,7 +303,7 @@ static void prvWriteString( const portCHAR *pcString )
void vLCDTask( void * pvParameters ) void vLCDTask( void * pvParameters )
{ {
unsigned portBASE_TYPE uxIndex; unsigned portBASE_TYPE uxIndex;
const unsigned portCHAR ucCFGData[] = { const unsigned char ucCFGData[] = {
0x30, /* Set data bus to 8-bits. */ 0x30, /* Set data bus to 8-bits. */
0x30, 0x30,
0x30, 0x30,
@ -314,7 +315,7 @@ const unsigned portCHAR ucCFGData[] = {
}; };
/* The strings that are written to the LCD. */ /* The strings that are written to the LCD. */
const portCHAR *pcStringsToDisplay[] = { const char *pcStringsToDisplay[] = {
"Stellaris", "Stellaris",
"Demo", "Demo",
"One", "One",
@ -361,7 +362,7 @@ const portCHAR *pcStringsToDisplay[] = {
static void vCommsRxTask( void * pvParameters ) static void vCommsRxTask( void * pvParameters )
{ {
static portCHAR cRxedChar, cExpectedChar; static char cRxedChar, cExpectedChar;
/* Set the char we expect to receive to the start of the string. */ /* Set the char we expect to receive to the start of the string. */
cExpectedChar = mainFIRST_TX_CHAR; cExpectedChar = mainFIRST_TX_CHAR;
@ -413,7 +414,7 @@ static portCHAR cRxedChar, cExpectedChar;
static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex ) static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
{ {
portTickType xDelayPeriod; portTickType xDelayPeriod;
static unsigned portLONG *pulRandomBytes = mainFIRST_PROGRAM_BYTES; static unsigned long *pulRandomBytes = mainFIRST_PROGRAM_BYTES;
/* Co-routine MUST start with a call to crSTART. */ /* Co-routine MUST start with a call to crSTART. */
crSTART( xHandle ); crSTART( xHandle );
@ -499,8 +500,8 @@ static void vSerialInit( void )
void vUART_ISR(void) void vUART_ISR(void)
{ {
unsigned portLONG ulStatus; unsigned long ulStatus;
portCHAR cRxedChar; char cRxedChar;
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* What caused the interrupt. */ /* What caused the interrupt. */
@ -517,7 +518,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* Get the char from the buffer and post it onto the queue of /* Get the char from the buffer and post it onto the queue of
Rxed chars. Posting the character should wake the task that is Rxed chars. Posting the character should wake the task that is
blocked on the queue waiting for characters. */ blocked on the queue waiting for characters. */
cRxedChar = ( portCHAR ) HWREG( UART0_BASE + UART_O_DR ); cRxedChar = ( char ) HWREG( UART0_BASE + UART_O_DR );
xQueueSendFromISR( xCommsQueue, &cRxedChar, &xHigherPriorityTaskWoken ); xQueueSendFromISR( xCommsQueue, &cRxedChar, &xHigherPriorityTaskWoken );
} }
} }
@ -544,7 +545,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static void prvPDCWrite( portCHAR cAddress, portCHAR cData ) static void prvPDCWrite( char cAddress, char cData )
{ {
vTaskSuspendAll(); vTaskSuspendAll();
{ {

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef FREERTOS_CONFIG_H #ifndef FREERTOS_CONFIG_H
@ -63,9 +64,9 @@
#define configUSE_PREEMPTION 1 #define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 1 #define configUSE_IDLE_HOOK 1
#define configUSE_TICK_HOOK 0 #define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 20000000 ) #define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 59 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 59 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1468 ) ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1468 ) )
#define configMAX_TASK_NAME_LEN ( 3 ) #define configMAX_TASK_NAME_LEN ( 3 )
#define configUSE_TRACE_FACILITY 0 #define configUSE_TRACE_FACILITY 0

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*
@ -155,8 +156,8 @@ characters from mainFIRST_TX_CHAR to mainLAST_TX_CHAR. */
/* Just used to walk through the program memory in order that some random data /* Just used to walk through the program memory in order that some random data
can be generated. */ can be generated. */
#define mainTOTAL_PROGRAM_MEMORY ( ( unsigned portLONG * ) ( 8 * 1024 ) ) #define mainTOTAL_PROGRAM_MEMORY ( ( unsigned long * ) ( 8 * 1024 ) )
#define mainFIRST_PROGRAM_BYTES ( ( unsigned portLONG * ) 4 ) #define mainFIRST_PROGRAM_BYTES ( ( unsigned long * ) 4 )
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -179,7 +180,7 @@ static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE
/* /*
* Writes a string the the LCD. * Writes a string the the LCD.
*/ */
static void prvWriteString( const portCHAR *pcString ); static void prvWriteString( const char *pcString );
/* /*
* Initialisation routine for the UART. * Initialisation routine for the UART.
@ -189,7 +190,7 @@ static void vSerialInit( void );
/* /*
* Thread safe write to the PDC. * Thread safe write to the PDC.
*/ */
static void prvPDCWrite( portCHAR cAddress, portCHAR cData ); static void prvPDCWrite( char cAddress, char cData );
/* /*
* Function to simply set a known value into the general purpose registers * Function to simply set a known value into the general purpose registers
@ -215,7 +216,7 @@ defined within this file. */
unsigned portBASE_TYPE uxErrorStatus = pdPASS; unsigned portBASE_TYPE uxErrorStatus = pdPASS;
/* The next character to transmit. */ /* The next character to transmit. */
static portCHAR cNextChar; static char cNextChar;
/* The queue used to transmit characters from the interrupt to the Comms Rx /* The queue used to transmit characters from the interrupt to the Comms Rx
task. */ task. */
@ -227,7 +228,7 @@ int main( void )
{ {
/* Create the queue used to communicate between the UART ISR and the Comms /* Create the queue used to communicate between the UART ISR and the Comms
Rx task. */ Rx task. */
xCommsQueue = xQueueCreate( mainRX_QUEUE_LEN, sizeof( portCHAR ) ); xCommsQueue = xQueueCreate( mainRX_QUEUE_LEN, sizeof( char ) );
/* Setup the ports used by the demo and the clock. */ /* Setup the ports used by the demo and the clock. */
prvSetupHardware(); prvSetupHardware();
@ -279,7 +280,7 @@ void vApplicationIdleHook( void )
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static void prvWriteString( const portCHAR *pcString ) static void prvWriteString( const char *pcString )
{ {
/* Write pcString to the LED, pausing between each character. */ /* Write pcString to the LED, pausing between each character. */
prvPDCWrite(PDC_LCD_CSR, LCD_CLEAR); prvPDCWrite(PDC_LCD_CSR, LCD_CLEAR);
@ -295,7 +296,7 @@ static void prvWriteString( const portCHAR *pcString )
void vLCDTask( void * pvParameters ) void vLCDTask( void * pvParameters )
{ {
unsigned portBASE_TYPE uxIndex; unsigned portBASE_TYPE uxIndex;
const unsigned portCHAR ucCFGData[] = { const unsigned char ucCFGData[] = {
0x30, /* Set data bus to 8-bits. */ 0x30, /* Set data bus to 8-bits. */
0x30, 0x30,
0x30, 0x30,
@ -307,7 +308,7 @@ const unsigned portCHAR ucCFGData[] = {
}; };
/* The strings that are written to the LCD. */ /* The strings that are written to the LCD. */
const portCHAR *pcStringsToDisplay[] = { const char *pcStringsToDisplay[] = {
"Stellaris", "Stellaris",
"Demo", "Demo",
"One", "One",
@ -354,7 +355,7 @@ const portCHAR *pcStringsToDisplay[] = {
static void vCommsRxTask( void * pvParameters ) static void vCommsRxTask( void * pvParameters )
{ {
static portCHAR cRxedChar, cExpectedChar; static char cRxedChar, cExpectedChar;
/* Set the char we expect to receive to the start of the string. */ /* Set the char we expect to receive to the start of the string. */
cExpectedChar = mainFIRST_TX_CHAR; cExpectedChar = mainFIRST_TX_CHAR;
@ -406,7 +407,7 @@ static portCHAR cRxedChar, cExpectedChar;
static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex ) static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
{ {
portTickType xDelayPeriod; portTickType xDelayPeriod;
static unsigned portLONG *pulRandomBytes = mainFIRST_PROGRAM_BYTES; static unsigned long *pulRandomBytes = mainFIRST_PROGRAM_BYTES;
/* Co-routine MUST start with a call to crSTART. */ /* Co-routine MUST start with a call to crSTART. */
crSTART( xHandle ); crSTART( xHandle );
@ -492,8 +493,8 @@ static void vSerialInit( void )
void vUART_ISR(void) void vUART_ISR(void)
{ {
unsigned portLONG ulStatus; unsigned long ulStatus;
portCHAR cRxedChar; char cRxedChar;
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* What caused the interrupt. */ /* What caused the interrupt. */
@ -510,7 +511,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* Get the char from the buffer and post it onto the queue of /* Get the char from the buffer and post it onto the queue of
Rxed chars. Posting the character should wake the task that is Rxed chars. Posting the character should wake the task that is
blocked on the queue waiting for characters. */ blocked on the queue waiting for characters. */
cRxedChar = ( portCHAR ) HWREG( UART0_BASE + UART_O_DR ); cRxedChar = ( char ) HWREG( UART0_BASE + UART_O_DR );
xQueueSendFromISR( xCommsQueue, &cRxedChar, &xHigherPriorityTaskWoken ); xQueueSendFromISR( xCommsQueue, &cRxedChar, &xHigherPriorityTaskWoken );
} }
} }
@ -537,7 +538,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static void prvPDCWrite( portCHAR cAddress, portCHAR cData ) static void prvPDCWrite( char cAddress, char cData )
{ {
vTaskSuspendAll(); vTaskSuspendAll();
{ {

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef FREERTOS_CONFIG_H #ifndef FREERTOS_CONFIG_H
@ -63,9 +64,9 @@
#define configUSE_PREEMPTION 1 #define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 1 #define configUSE_IDLE_HOOK 1
#define configUSE_TICK_HOOK 0 #define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 20000000 ) #define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 59 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 59 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1240 ) ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1240 ) )
#define configMAX_TASK_NAME_LEN ( 3 ) #define configMAX_TASK_NAME_LEN ( 3 )
#define configUSE_TRACE_FACILITY 0 #define configUSE_TRACE_FACILITY 0

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*
@ -159,8 +160,8 @@ characters from mainFIRST_TX_CHAR to mainLAST_TX_CHAR. */
/* Just used to walk through the program memory in order that some random data /* Just used to walk through the program memory in order that some random data
can be generated. */ can be generated. */
#define mainTOTAL_PROGRAM_MEMORY ( ( unsigned portLONG * ) ( 8 * 1024 ) ) #define mainTOTAL_PROGRAM_MEMORY ( ( unsigned long * ) ( 8 * 1024 ) )
#define mainFIRST_PROGRAM_BYTES ( ( unsigned portLONG * ) 4 ) #define mainFIRST_PROGRAM_BYTES ( ( unsigned long * ) 4 )
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -183,7 +184,7 @@ static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE
/* /*
* Writes a string the the LCD. * Writes a string the the LCD.
*/ */
static void prvWriteString( const portCHAR *pcString ); static void prvWriteString( const char *pcString );
/* /*
* Initialisation routine for the UART. * Initialisation routine for the UART.
@ -193,7 +194,7 @@ static void vSerialInit( void );
/* /*
* Thread safe write to the PDC. * Thread safe write to the PDC.
*/ */
static void prvPDCWrite( portCHAR cAddress, portCHAR cData ); static void prvPDCWrite( char cAddress, char cData );
/* /*
* Function to simply set a known value into the general purpose registers * Function to simply set a known value into the general purpose registers
@ -219,7 +220,7 @@ defined within this file. */
unsigned portBASE_TYPE uxErrorStatus = pdPASS; unsigned portBASE_TYPE uxErrorStatus = pdPASS;
/* The next character to transmit. */ /* The next character to transmit. */
static portCHAR cNextChar; static char cNextChar;
/* The queue used to transmit characters from the interrupt to the Comms Rx /* The queue used to transmit characters from the interrupt to the Comms Rx
task. */ task. */
@ -231,7 +232,7 @@ int main( void )
{ {
/* Create the queue used to communicate between the UART ISR and the Comms /* Create the queue used to communicate between the UART ISR and the Comms
Rx task. */ Rx task. */
xCommsQueue = xQueueCreate( mainRX_QUEUE_LEN, sizeof( portCHAR ) ); xCommsQueue = xQueueCreate( mainRX_QUEUE_LEN, sizeof( char ) );
/* Setup the ports used by the demo and the clock. */ /* Setup the ports used by the demo and the clock. */
prvSetupHardware(); prvSetupHardware();
@ -285,7 +286,7 @@ void vApplicationIdleHook( void )
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static void prvWriteString( const portCHAR *pcString ) static void prvWriteString( const char *pcString )
{ {
/* Write pcString to the LED, pausing between each character. */ /* Write pcString to the LED, pausing between each character. */
prvPDCWrite(PDC_LCD_CSR, LCD_CLEAR); prvPDCWrite(PDC_LCD_CSR, LCD_CLEAR);
@ -301,7 +302,7 @@ static void prvWriteString( const portCHAR *pcString )
void vLCDTask( void * pvParameters ) void vLCDTask( void * pvParameters )
{ {
unsigned portBASE_TYPE uxIndex; unsigned portBASE_TYPE uxIndex;
const unsigned portCHAR ucCFGData[] = { const unsigned char ucCFGData[] = {
0x30, /* Set data bus to 8-bits. */ 0x30, /* Set data bus to 8-bits. */
0x30, 0x30,
0x30, 0x30,
@ -313,7 +314,7 @@ const unsigned portCHAR ucCFGData[] = {
}; };
/* The strings that are written to the LCD. */ /* The strings that are written to the LCD. */
const portCHAR *pcStringsToDisplay[] = { const char *pcStringsToDisplay[] = {
"Stellaris", "Stellaris",
"Demo", "Demo",
"Two", "Two",
@ -360,7 +361,7 @@ const portCHAR *pcStringsToDisplay[] = {
static void vCommsRxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex ) static void vCommsRxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
{ {
static portCHAR cRxedChar, cExpectedChar = mainFIRST_TX_CHAR; static char cRxedChar, cExpectedChar = mainFIRST_TX_CHAR;
portBASE_TYPE xResult; portBASE_TYPE xResult;
crSTART( xHandle ); crSTART( xHandle );
@ -414,7 +415,7 @@ portBASE_TYPE xResult;
static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex ) static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
{ {
portTickType xDelayPeriod; portTickType xDelayPeriod;
static unsigned portLONG *pulRandomBytes = mainFIRST_PROGRAM_BYTES; static unsigned long *pulRandomBytes = mainFIRST_PROGRAM_BYTES;
/* Co-routine MUST start with a call to crSTART. */ /* Co-routine MUST start with a call to crSTART. */
crSTART( xHandle ); crSTART( xHandle );
@ -500,8 +501,8 @@ static void vSerialInit( void )
void vUART_ISR(void) void vUART_ISR(void)
{ {
unsigned portLONG ulStatus; unsigned long ulStatus;
portCHAR cRxedChar; char cRxedChar;
portBASE_TYPE xTaskWokenByPost = pdFALSE; portBASE_TYPE xTaskWokenByPost = pdFALSE;
/* What caused the interrupt. */ /* What caused the interrupt. */
@ -518,7 +519,7 @@ portBASE_TYPE xTaskWokenByPost = pdFALSE;
/* Get the char from the buffer and post it onto the queue of /* Get the char from the buffer and post it onto the queue of
Rxed chars. Posting the character should wake the task that is Rxed chars. Posting the character should wake the task that is
blocked on the queue waiting for characters. */ blocked on the queue waiting for characters. */
cRxedChar = ( portCHAR ) HWREG( UART0_BASE + UART_O_DR ); cRxedChar = ( char ) HWREG( UART0_BASE + UART_O_DR );
xTaskWokenByPost = crQUEUE_SEND_FROM_ISR( xCommsQueue, &cRxedChar, xTaskWokenByPost ); xTaskWokenByPost = crQUEUE_SEND_FROM_ISR( xCommsQueue, &cRxedChar, xTaskWokenByPost );
} }
} }
@ -545,7 +546,7 @@ portBASE_TYPE xTaskWokenByPost = pdFALSE;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static void prvPDCWrite( portCHAR cAddress, portCHAR cData ) static void prvPDCWrite( char cAddress, char cData )
{ {
vTaskSuspendAll(); vTaskSuspendAll();
{ {

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef FREERTOS_CONFIG_H #ifndef FREERTOS_CONFIG_H
@ -63,9 +64,9 @@
#define configUSE_PREEMPTION 1 #define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 1 #define configUSE_IDLE_HOOK 1
#define configUSE_TICK_HOOK 0 #define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 20000000 ) #define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 59 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 59 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1468 ) ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1468 ) )
#define configMAX_TASK_NAME_LEN ( 3 ) #define configMAX_TASK_NAME_LEN ( 3 )
#define configUSE_TRACE_FACILITY 0 #define configUSE_TRACE_FACILITY 0

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/*----------------------------------------------------------- /*-----------------------------------------------------------
@ -61,10 +62,10 @@
#define partstPINS (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 Z | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7) #define partstPINS (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 Z | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7)
#define partstALL_OUTPUTS_OFF ( ( unsigned portCHAR ) 0x00 ) #define partstALL_OUTPUTS_OFF ( ( unsigned char ) 0x00 )
#define partstMAX_OUTPUT_LED ( ( unsigned portCHAR ) 8 ) #define partstMAX_OUTPUT_LED ( ( unsigned char ) 8 )
static volatile unsigned portCHAR ucOutputValue = partstALL_OUTPUTS_OFF; static volatile unsigned char ucOutputValue = partstALL_OUTPUTS_OFF;
void vParTestInitialise( void ) void vParTestInitialise( void )
{ {
@ -75,17 +76,17 @@ void vParTestInitialise( void )
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue ) void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
{ {
unsigned portCHAR ucBit = ( unsigned portCHAR ) 1; unsigned char ucBit = ( unsigned char ) 1;
vTaskSuspendAll(); vTaskSuspendAll();
{ {
if( uxLED < partstMAX_OUTPUT_LED ) if( uxLED < partstMAX_OUTPUT_LED )
{ {
ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED; ucBit = ( ( unsigned char ) 1 ) << uxLED;
if( xValue == pdFALSE ) if( xValue == pdFALSE )
{ {
ucBit ^= ( unsigned portCHAR ) 0xff; ucBit ^= ( unsigned char ) 0xff;
ucOutputValue &= ucBit; ucOutputValue &= ucBit;
} }
else else
@ -102,13 +103,13 @@ unsigned portCHAR ucBit = ( unsigned portCHAR ) 1;
void vParTestToggleLED( unsigned portBASE_TYPE uxLED ) void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
{ {
unsigned portCHAR ucBit; unsigned char ucBit;
vTaskSuspendAll(); vTaskSuspendAll();
{ {
if( uxLED < partstMAX_OUTPUT_LED ) if( uxLED < partstMAX_OUTPUT_LED )
{ {
ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED; ucBit = ( ( unsigned char ) 1 ) << uxLED;
if( ucOutputValue & ucBit ) if( ucOutputValue & ucBit )
{ {

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*
@ -155,8 +156,8 @@ characters from mainFIRST_TX_CHAR to mainLAST_TX_CHAR. */
/* Just used to walk through the program memory in order that some random data /* Just used to walk through the program memory in order that some random data
can be generated. */ can be generated. */
#define mainTOTAL_PROGRAM_MEMORY ( ( unsigned portLONG * ) ( 8 * 1024 ) ) #define mainTOTAL_PROGRAM_MEMORY ( ( unsigned long * ) ( 8 * 1024 ) )
#define mainFIRST_PROGRAM_BYTES ( ( unsigned portLONG * ) 4 ) #define mainFIRST_PROGRAM_BYTES ( ( unsigned long * ) 4 )
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -179,7 +180,7 @@ static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE
/* /*
* Writes a string the the LCD. * Writes a string the the LCD.
*/ */
static void prvWriteString( const portCHAR *pcString ); static void prvWriteString( const char *pcString );
/* /*
* Initialisation routine for the UART. * Initialisation routine for the UART.
@ -189,7 +190,7 @@ static void vSerialInit( void );
/* /*
* Thread safe write to the PDC. * Thread safe write to the PDC.
*/ */
static void prvPDCWrite( portCHAR cAddress, portCHAR cData ); static void prvPDCWrite( char cAddress, char cData );
/* /*
* Function to simply set a known value into the general purpose registers * Function to simply set a known value into the general purpose registers
@ -215,7 +216,7 @@ defined within this file. */
unsigned portBASE_TYPE uxErrorStatus = pdPASS; unsigned portBASE_TYPE uxErrorStatus = pdPASS;
/* The next character to transmit. */ /* The next character to transmit. */
static portCHAR cNextChar; static char cNextChar;
/* The queue used to transmit characters from the interrupt to the Comms Rx /* The queue used to transmit characters from the interrupt to the Comms Rx
task. */ task. */
@ -227,7 +228,7 @@ int main( void )
{ {
/* Create the queue used to communicate between the UART ISR and the Comms /* Create the queue used to communicate between the UART ISR and the Comms
Rx task. */ Rx task. */
xCommsQueue = xQueueCreate( mainRX_QUEUE_LEN, sizeof( portCHAR ) ); xCommsQueue = xQueueCreate( mainRX_QUEUE_LEN, sizeof( char ) );
/* Setup the ports used by the demo and the clock. */ /* Setup the ports used by the demo and the clock. */
prvSetupHardware(); prvSetupHardware();
@ -279,7 +280,7 @@ void vApplicationIdleHook( void )
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static void prvWriteString( const portCHAR *pcString ) static void prvWriteString( const char *pcString )
{ {
/* Write pcString to the LED, pausing between each character. */ /* Write pcString to the LED, pausing between each character. */
prvPDCWrite(PDC_LCD_CSR, LCD_CLEAR); prvPDCWrite(PDC_LCD_CSR, LCD_CLEAR);
@ -295,7 +296,7 @@ static void prvWriteString( const portCHAR *pcString )
void vLCDTask( void * pvParameters ) void vLCDTask( void * pvParameters )
{ {
unsigned portBASE_TYPE uxIndex; unsigned portBASE_TYPE uxIndex;
const unsigned portCHAR ucCFGData[] = { const unsigned char ucCFGData[] = {
0x30, /* Set data bus to 8-bits. */ 0x30, /* Set data bus to 8-bits. */
0x30, 0x30,
0x30, 0x30,
@ -307,7 +308,7 @@ const unsigned portCHAR ucCFGData[] = {
}; };
/* The strings that are written to the LCD. */ /* The strings that are written to the LCD. */
const portCHAR *pcStringsToDisplay[] = { const char *pcStringsToDisplay[] = {
"Stellaris", "Stellaris",
"Demo", "Demo",
"One", "One",
@ -354,7 +355,7 @@ const portCHAR *pcStringsToDisplay[] = {
static void vCommsRxTask( void * pvParameters ) static void vCommsRxTask( void * pvParameters )
{ {
static portCHAR cRxedChar, cExpectedChar; static char cRxedChar, cExpectedChar;
/* Set the char we expect to receive to the start of the string. */ /* Set the char we expect to receive to the start of the string. */
cExpectedChar = mainFIRST_TX_CHAR; cExpectedChar = mainFIRST_TX_CHAR;
@ -406,7 +407,7 @@ static portCHAR cRxedChar, cExpectedChar;
static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex ) static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
{ {
portTickType xDelayPeriod; portTickType xDelayPeriod;
static unsigned portLONG *pulRandomBytes = mainFIRST_PROGRAM_BYTES; static unsigned long *pulRandomBytes = mainFIRST_PROGRAM_BYTES;
/* Co-routine MUST start with a call to crSTART. */ /* Co-routine MUST start with a call to crSTART. */
crSTART( xHandle ); crSTART( xHandle );
@ -492,8 +493,8 @@ static void vSerialInit( void )
void vUART_ISR(void) void vUART_ISR(void)
{ {
unsigned portLONG ulStatus; unsigned long ulStatus;
portCHAR cRxedChar; char cRxedChar;
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* What caused the interrupt. */ /* What caused the interrupt. */
@ -510,7 +511,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* Get the char from the buffer and post it onto the queue of /* Get the char from the buffer and post it onto the queue of
Rxed chars. Posting the character should wake the task that is Rxed chars. Posting the character should wake the task that is
blocked on the queue waiting for characters. */ blocked on the queue waiting for characters. */
cRxedChar = ( portCHAR ) HWREG( UART0_BASE + UART_O_DR ); cRxedChar = ( char ) HWREG( UART0_BASE + UART_O_DR );
xQueueSendFromISR( xCommsQueue, &cRxedChar, &xHigherPriorityTaskWoken ); xQueueSendFromISR( xCommsQueue, &cRxedChar, &xHigherPriorityTaskWoken );
} }
} }
@ -537,7 +538,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static void prvPDCWrite( portCHAR cAddress, portCHAR cData ) static void prvPDCWrite( char cAddress, char cData )
{ {
vTaskSuspendAll(); vTaskSuspendAll();
{ {

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef FREERTOS_CONFIG_H #ifndef FREERTOS_CONFIG_H
@ -63,9 +64,9 @@
#define configUSE_PREEMPTION 1 #define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 1 #define configUSE_IDLE_HOOK 1
#define configUSE_TICK_HOOK 0 #define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 20000000 ) #define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 59 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 59 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1468 ) ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1468 ) )
#define configMAX_TASK_NAME_LEN ( 3 ) #define configMAX_TASK_NAME_LEN ( 3 )
#define configUSE_TRACE_FACILITY 0 #define configUSE_TRACE_FACILITY 0

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/*----------------------------------------------------------- /*-----------------------------------------------------------
@ -61,10 +62,10 @@
#define partstPINS (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 Z | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7) #define partstPINS (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 Z | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7)
#define partstALL_OUTPUTS_OFF ( ( unsigned portCHAR ) 0x00 ) #define partstALL_OUTPUTS_OFF ( ( unsigned char ) 0x00 )
#define partstMAX_OUTPUT_LED ( ( unsigned portCHAR ) 8 ) #define partstMAX_OUTPUT_LED ( ( unsigned char ) 8 )
static volatile unsigned portCHAR ucOutputValue = partstALL_OUTPUTS_OFF; static volatile unsigned char ucOutputValue = partstALL_OUTPUTS_OFF;
void vParTestInitialise( void ) void vParTestInitialise( void )
{ {
@ -75,17 +76,17 @@ void vParTestInitialise( void )
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue ) void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
{ {
unsigned portCHAR ucBit = ( unsigned portCHAR ) 1; unsigned char ucBit = ( unsigned char ) 1;
vTaskSuspendAll(); vTaskSuspendAll();
{ {
if( uxLED < partstMAX_OUTPUT_LED ) if( uxLED < partstMAX_OUTPUT_LED )
{ {
ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED; ucBit = ( ( unsigned char ) 1 ) << uxLED;
if( xValue == pdFALSE ) if( xValue == pdFALSE )
{ {
ucBit ^= ( unsigned portCHAR ) 0xff; ucBit ^= ( unsigned char ) 0xff;
ucOutputValue &= ucBit; ucOutputValue &= ucBit;
} }
else else
@ -102,13 +103,13 @@ unsigned portCHAR ucBit = ( unsigned portCHAR ) 1;
void vParTestToggleLED( unsigned portBASE_TYPE uxLED ) void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
{ {
unsigned portCHAR ucBit; unsigned char ucBit;
vTaskSuspendAll(); vTaskSuspendAll();
{ {
if( uxLED < partstMAX_OUTPUT_LED ) if( uxLED < partstMAX_OUTPUT_LED )
{ {
ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED; ucBit = ( ( unsigned char ) 1 ) << uxLED;
if( ucOutputValue & ucBit ) if( ucOutputValue & ucBit )
{ {

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*
@ -154,8 +155,8 @@ characters from mainFIRST_TX_CHAR to mainLAST_TX_CHAR. */
/* Just used to walk through the program memory in order that some random data /* Just used to walk through the program memory in order that some random data
can be generated. */ can be generated. */
#define mainTOTAL_PROGRAM_MEMORY ( ( unsigned portLONG * ) ( 8 * 1024 ) ) #define mainTOTAL_PROGRAM_MEMORY ( ( unsigned long * ) ( 8 * 1024 ) )
#define mainFIRST_PROGRAM_BYTES ( ( unsigned portLONG * ) 4 ) #define mainFIRST_PROGRAM_BYTES ( ( unsigned long * ) 4 )
/* The error routine that is called if the driver library encounters an error. */ /* The error routine that is called if the driver library encounters an error. */
#ifdef DEBUG #ifdef DEBUG
@ -186,7 +187,7 @@ static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE
/* /*
* Writes a string the the LCD. * Writes a string the the LCD.
*/ */
static void prvWriteString( const portCHAR *pcString ); static void prvWriteString( const char *pcString );
/* /*
* Initialisation routine for the UART. * Initialisation routine for the UART.
@ -196,7 +197,7 @@ static void vSerialInit( void );
/* /*
* Thread safe write to the PDC. * Thread safe write to the PDC.
*/ */
static void prvPDCWrite( portCHAR cAddress, portCHAR cData ); static void prvPDCWrite( char cAddress, char cData );
/* /*
* Function to simply set a known value into the general purpose registers * Function to simply set a known value into the general purpose registers
@ -222,7 +223,7 @@ defined within this file. */
unsigned portBASE_TYPE uxErrorStatus = pdPASS; unsigned portBASE_TYPE uxErrorStatus = pdPASS;
/* The next character to transmit. */ /* The next character to transmit. */
static portCHAR cNextChar; static char cNextChar;
/* The queue used to transmit characters from the interrupt to the Comms Rx /* The queue used to transmit characters from the interrupt to the Comms Rx
task. */ task. */
@ -234,7 +235,7 @@ int main( void )
{ {
/* Create the queue used to communicate between the UART ISR and the Comms /* Create the queue used to communicate between the UART ISR and the Comms
Rx task. */ Rx task. */
xCommsQueue = xQueueCreate( mainRX_QUEUE_LEN, sizeof( portCHAR ) ); xCommsQueue = xQueueCreate( mainRX_QUEUE_LEN, sizeof( char ) );
/* Setup the ports used by the demo and the clock. */ /* Setup the ports used by the demo and the clock. */
prvSetupHardware(); prvSetupHardware();
@ -287,7 +288,7 @@ void vApplicationIdleHook( void )
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static void prvWriteString( const portCHAR *pcString ) static void prvWriteString( const char *pcString )
{ {
/* Write pcString to the LED, pausing between each character. */ /* Write pcString to the LED, pausing between each character. */
prvPDCWrite(PDC_LCD_CSR, LCD_CLEAR); prvPDCWrite(PDC_LCD_CSR, LCD_CLEAR);
@ -303,7 +304,7 @@ static void prvWriteString( const portCHAR *pcString )
void vLCDTask( void * pvParameters ) void vLCDTask( void * pvParameters )
{ {
unsigned portBASE_TYPE uxIndex; unsigned portBASE_TYPE uxIndex;
const unsigned portCHAR ucCFGData[] = { const unsigned char ucCFGData[] = {
0x30, /* Set data bus to 8-bits. */ 0x30, /* Set data bus to 8-bits. */
0x30, 0x30,
0x30, 0x30,
@ -315,7 +316,7 @@ const unsigned portCHAR ucCFGData[] = {
}; };
/* The strings that are written to the LCD. */ /* The strings that are written to the LCD. */
const portCHAR *pcStringsToDisplay[] = { const char *pcStringsToDisplay[] = {
"Stellaris", "Stellaris",
"Demo", "Demo",
"One", "One",
@ -362,7 +363,7 @@ const portCHAR *pcStringsToDisplay[] = {
static void vCommsRxTask( void * pvParameters ) static void vCommsRxTask( void * pvParameters )
{ {
static portCHAR cRxedChar, cExpectedChar; static char cRxedChar, cExpectedChar;
/* Set the char we expect to receive to the start of the string. */ /* Set the char we expect to receive to the start of the string. */
cExpectedChar = mainFIRST_TX_CHAR; cExpectedChar = mainFIRST_TX_CHAR;
@ -414,7 +415,7 @@ static portCHAR cRxedChar, cExpectedChar;
static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex ) static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
{ {
portTickType xDelayPeriod; portTickType xDelayPeriod;
static unsigned portLONG *pulRandomBytes = mainFIRST_PROGRAM_BYTES; static unsigned long *pulRandomBytes = mainFIRST_PROGRAM_BYTES;
/* Co-routine MUST start with a call to crSTART. */ /* Co-routine MUST start with a call to crSTART. */
crSTART( xHandle ); crSTART( xHandle );
@ -500,8 +501,8 @@ static void vSerialInit( void )
void vUART_ISR(void) void vUART_ISR(void)
{ {
unsigned portLONG ulStatus; unsigned long ulStatus;
portCHAR cRxedChar; char cRxedChar;
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* What caused the interrupt. */ /* What caused the interrupt. */
@ -518,7 +519,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* Get the char from the buffer and post it onto the queue of /* Get the char from the buffer and post it onto the queue of
Rxed chars. Posting the character should wake the task that is Rxed chars. Posting the character should wake the task that is
blocked on the queue waiting for characters. */ blocked on the queue waiting for characters. */
cRxedChar = ( portCHAR ) HWREG( UART0_BASE + UART_O_DR ); cRxedChar = ( char ) HWREG( UART0_BASE + UART_O_DR );
xQueueSendFromISR( xCommsQueue, &cRxedChar, &xHigherPriorityTaskWoken ); xQueueSendFromISR( xCommsQueue, &cRxedChar, &xHigherPriorityTaskWoken );
} }
} }
@ -545,7 +546,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static void prvPDCWrite( portCHAR cAddress, portCHAR cData ) static void prvPDCWrite( char cAddress, char cData )
{ {
vTaskSuspendAll(); vTaskSuspendAll();
{ {

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef FREERTOS_CONFIG_H #ifndef FREERTOS_CONFIG_H
@ -63,9 +64,9 @@
#define configUSE_PREEMPTION 1 #define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 1 #define configUSE_IDLE_HOOK 1
#define configUSE_TICK_HOOK 0 #define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 20000000 ) #define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 59 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 59 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1240 ) ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1240 ) )
#define configMAX_TASK_NAME_LEN ( 3 ) #define configMAX_TASK_NAME_LEN ( 3 )
#define configUSE_TRACE_FACILITY 0 #define configUSE_TRACE_FACILITY 0

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/*----------------------------------------------------------- /*-----------------------------------------------------------
@ -61,10 +62,10 @@
#define partstPINS (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 Z | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7) #define partstPINS (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 Z | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7)
#define partstALL_OUTPUTS_OFF ( ( unsigned portCHAR ) 0x00 ) #define partstALL_OUTPUTS_OFF ( ( unsigned char ) 0x00 )
#define partstMAX_OUTPUT_LED ( ( unsigned portCHAR ) 8 ) #define partstMAX_OUTPUT_LED ( ( unsigned char ) 8 )
static volatile unsigned portCHAR ucOutputValue = partstALL_OUTPUTS_OFF; static volatile unsigned char ucOutputValue = partstALL_OUTPUTS_OFF;
void vParTestInitialise( void ) void vParTestInitialise( void )
{ {
@ -75,17 +76,17 @@ void vParTestInitialise( void )
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue ) void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
{ {
unsigned portCHAR ucBit = ( unsigned portCHAR ) 1; unsigned char ucBit = ( unsigned char ) 1;
vTaskSuspendAll(); vTaskSuspendAll();
{ {
if( uxLED < partstMAX_OUTPUT_LED ) if( uxLED < partstMAX_OUTPUT_LED )
{ {
ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED; ucBit = ( ( unsigned char ) 1 ) << uxLED;
if( xValue == pdFALSE ) if( xValue == pdFALSE )
{ {
ucBit ^= ( unsigned portCHAR ) 0xff; ucBit ^= ( unsigned char ) 0xff;
ucOutputValue &= ucBit; ucOutputValue &= ucBit;
} }
else else
@ -102,13 +103,13 @@ unsigned portCHAR ucBit = ( unsigned portCHAR ) 1;
void vParTestToggleLED( unsigned portBASE_TYPE uxLED ) void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
{ {
unsigned portCHAR ucBit; unsigned char ucBit;
vTaskSuspendAll(); vTaskSuspendAll();
{ {
if( uxLED < partstMAX_OUTPUT_LED ) if( uxLED < partstMAX_OUTPUT_LED )
{ {
ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED; ucBit = ( ( unsigned char ) 1 ) << uxLED;
if( ucOutputValue & ucBit ) if( ucOutputValue & ucBit )
{ {

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*
@ -158,8 +159,8 @@ characters from mainFIRST_TX_CHAR to mainLAST_TX_CHAR. */
/* Just used to walk through the program memory in order that some random data /* Just used to walk through the program memory in order that some random data
can be generated. */ can be generated. */
#define mainTOTAL_PROGRAM_MEMORY ( ( unsigned portLONG * ) ( 8 * 1024 ) ) #define mainTOTAL_PROGRAM_MEMORY ( ( unsigned long * ) ( 8 * 1024 ) )
#define mainFIRST_PROGRAM_BYTES ( ( unsigned portLONG * ) 4 ) #define mainFIRST_PROGRAM_BYTES ( ( unsigned long * ) 4 )
/* The error routine that is called if the driver library encounters an error. */ /* The error routine that is called if the driver library encounters an error. */
#ifdef DEBUG #ifdef DEBUG
@ -190,7 +191,7 @@ static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE
/* /*
* Writes a string the the LCD. * Writes a string the the LCD.
*/ */
static void prvWriteString( const portCHAR *pcString ); static void prvWriteString( const char *pcString );
/* /*
* Initialisation routine for the UART. * Initialisation routine for the UART.
@ -200,7 +201,7 @@ static void vSerialInit( void );
/* /*
* Thread safe write to the PDC. * Thread safe write to the PDC.
*/ */
static void prvPDCWrite( portCHAR cAddress, portCHAR cData ); static void prvPDCWrite( char cAddress, char cData );
/* /*
* Function to simply set a known value into the general purpose registers * Function to simply set a known value into the general purpose registers
@ -226,7 +227,7 @@ defined within this file. */
unsigned portBASE_TYPE uxErrorStatus = pdPASS; unsigned portBASE_TYPE uxErrorStatus = pdPASS;
/* The next character to transmit. */ /* The next character to transmit. */
static portCHAR cNextChar; static char cNextChar;
/* The queue used to transmit characters from the interrupt to the Comms Rx /* The queue used to transmit characters from the interrupt to the Comms Rx
task. */ task. */
@ -238,7 +239,7 @@ int main( void )
{ {
/* Create the queue used to communicate between the UART ISR and the Comms /* Create the queue used to communicate between the UART ISR and the Comms
Rx task. */ Rx task. */
xCommsQueue = xQueueCreate( mainRX_QUEUE_LEN, sizeof( portCHAR ) ); xCommsQueue = xQueueCreate( mainRX_QUEUE_LEN, sizeof( char ) );
/* Setup the ports used by the demo and the clock. */ /* Setup the ports used by the demo and the clock. */
prvSetupHardware(); prvSetupHardware();
@ -293,7 +294,7 @@ void vApplicationIdleHook( void )
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static void prvWriteString( const portCHAR *pcString ) static void prvWriteString( const char *pcString )
{ {
/* Write pcString to the LED, pausing between each character. */ /* Write pcString to the LED, pausing between each character. */
prvPDCWrite(PDC_LCD_CSR, LCD_CLEAR); prvPDCWrite(PDC_LCD_CSR, LCD_CLEAR);
@ -309,7 +310,7 @@ static void prvWriteString( const portCHAR *pcString )
void vLCDTask( void * pvParameters ) void vLCDTask( void * pvParameters )
{ {
unsigned portBASE_TYPE uxIndex; unsigned portBASE_TYPE uxIndex;
const unsigned portCHAR ucCFGData[] = { const unsigned char ucCFGData[] = {
0x30, /* Set data bus to 8-bits. */ 0x30, /* Set data bus to 8-bits. */
0x30, 0x30,
0x30, 0x30,
@ -321,7 +322,7 @@ const unsigned portCHAR ucCFGData[] = {
}; };
/* The strings that are written to the LCD. */ /* The strings that are written to the LCD. */
const portCHAR *pcStringsToDisplay[] = { const char *pcStringsToDisplay[] = {
"Stellaris", "Stellaris",
"Demo", "Demo",
"Two", "Two",
@ -368,7 +369,7 @@ const portCHAR *pcStringsToDisplay[] = {
static void vCommsRxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex ) static void vCommsRxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
{ {
static portCHAR cRxedChar, cExpectedChar = mainFIRST_TX_CHAR; static char cRxedChar, cExpectedChar = mainFIRST_TX_CHAR;
portBASE_TYPE xResult; portBASE_TYPE xResult;
crSTART( xHandle ); crSTART( xHandle );
@ -422,7 +423,7 @@ portBASE_TYPE xResult;
static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex ) static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
{ {
portTickType xDelayPeriod; portTickType xDelayPeriod;
static unsigned portLONG *pulRandomBytes = mainFIRST_PROGRAM_BYTES; static unsigned long *pulRandomBytes = mainFIRST_PROGRAM_BYTES;
/* Co-routine MUST start with a call to crSTART. */ /* Co-routine MUST start with a call to crSTART. */
crSTART( xHandle ); crSTART( xHandle );
@ -508,8 +509,8 @@ static void vSerialInit( void )
void vUART_ISR(void) void vUART_ISR(void)
{ {
unsigned portLONG ulStatus; unsigned long ulStatus;
portCHAR cRxedChar; char cRxedChar;
portBASE_TYPE xTaskWokenByPost = pdFALSE; portBASE_TYPE xTaskWokenByPost = pdFALSE;
/* What caused the interrupt. */ /* What caused the interrupt. */
@ -526,7 +527,7 @@ portBASE_TYPE xTaskWokenByPost = pdFALSE;
/* Get the char from the buffer and post it onto the queue of /* Get the char from the buffer and post it onto the queue of
Rxed chars. Posting the character should wake the task that is Rxed chars. Posting the character should wake the task that is
blocked on the queue waiting for characters. */ blocked on the queue waiting for characters. */
cRxedChar = ( portCHAR ) HWREG( UART0_BASE + UART_O_DR ); cRxedChar = ( char ) HWREG( UART0_BASE + UART_O_DR );
xTaskWokenByPost = crQUEUE_SEND_FROM_ISR( xCommsQueue, &cRxedChar, xTaskWokenByPost ); xTaskWokenByPost = crQUEUE_SEND_FROM_ISR( xCommsQueue, &cRxedChar, xTaskWokenByPost );
} }
} }
@ -553,7 +554,7 @@ portBASE_TYPE xTaskWokenByPost = pdFALSE;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static void prvPDCWrite( portCHAR cAddress, portCHAR cData ) static void prvPDCWrite( char cAddress, char cData )
{ {
vTaskSuspendAll(); vTaskSuspendAll();
{ {

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef FREERTOS_CONFIG_H #ifndef FREERTOS_CONFIG_H
@ -63,9 +64,9 @@
#define configUSE_PREEMPTION 0 #define configUSE_PREEMPTION 0
#define configUSE_IDLE_HOOK 1 #define configUSE_IDLE_HOOK 1
#define configUSE_TICK_HOOK 0 #define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 20000000 ) #define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 59 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 59 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1240 ) ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1240 ) )
#define configMAX_TASK_NAME_LEN ( 3 ) #define configMAX_TASK_NAME_LEN ( 3 )
#define configUSE_TRACE_FACILITY 0 #define configUSE_TRACE_FACILITY 0

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/*----------------------------------------------------------- /*-----------------------------------------------------------
@ -60,14 +61,14 @@
/* Hardware specific include files. */ /* Hardware specific include files. */
#include "DriverLib.h" #include "DriverLib.h"
static const unsigned portLONG ulLEDs[] = static const unsigned long ulLEDs[] =
{ {
GPIO_PIN_6, GPIO_PIN_1, GPIO_PIN_0 GPIO_PIN_6, GPIO_PIN_1, GPIO_PIN_0
}; };
#define partstLED_PINS ( GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_6 ) #define partstLED_PINS ( GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_6 )
#define partstMAX_OUTPUT_LED ( ( unsigned portCHAR ) 3 ) #define partstMAX_OUTPUT_LED ( ( unsigned char ) 3 )
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
void vParTestInitialise( void ) void vParTestInitialise( void )

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef FREERTOS_CONFIG_H #ifndef FREERTOS_CONFIG_H
@ -63,9 +64,9 @@
#define configUSE_PREEMPTION 1 #define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 1 #define configUSE_IDLE_HOOK 1
#define configUSE_TICK_HOOK 0 #define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 20000000 ) #define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 80 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 3000 ) ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 3000 ) )
#define configMAX_TASK_NAME_LEN ( 3 ) #define configMAX_TASK_NAME_LEN ( 3 )
#define configUSE_TRACE_FACILITY 0 #define configUSE_TRACE_FACILITY 0

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/*----------------------------------------------------------- /*-----------------------------------------------------------
@ -61,10 +62,10 @@
#define partstPINS (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 Z | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7) #define partstPINS (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 Z | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7)
#define partstALL_OUTPUTS_OFF ( ( unsigned portCHAR ) 0x00 ) #define partstALL_OUTPUTS_OFF ( ( unsigned char ) 0x00 )
#define partstMAX_OUTPUT_LED ( ( unsigned portCHAR ) 8 ) #define partstMAX_OUTPUT_LED ( ( unsigned char ) 8 )
static volatile unsigned portCHAR ucOutputValue = partstALL_OUTPUTS_OFF; static volatile unsigned char ucOutputValue = partstALL_OUTPUTS_OFF;
void vParTestInitialise( void ) void vParTestInitialise( void )
{ {
@ -75,17 +76,17 @@ void vParTestInitialise( void )
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue ) void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
{ {
unsigned portCHAR ucBit = ( unsigned portCHAR ) 1; unsigned char ucBit = ( unsigned char ) 1;
vTaskSuspendAll(); vTaskSuspendAll();
{ {
if( uxLED < partstMAX_OUTPUT_LED ) if( uxLED < partstMAX_OUTPUT_LED )
{ {
ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED; ucBit = ( ( unsigned char ) 1 ) << uxLED;
if( xValue == pdFALSE ) if( xValue == pdFALSE )
{ {
ucBit ^= ( unsigned portCHAR ) 0xff; ucBit ^= ( unsigned char ) 0xff;
ucOutputValue &= ucBit; ucOutputValue &= ucBit;
} }
else else
@ -102,13 +103,13 @@ unsigned portCHAR ucBit = ( unsigned portCHAR ) 1;
void vParTestToggleLED( unsigned portBASE_TYPE uxLED ) void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
{ {
unsigned portCHAR ucBit; unsigned char ucBit;
vTaskSuspendAll(); vTaskSuspendAll();
{ {
if( uxLED < partstMAX_OUTPUT_LED ) if( uxLED < partstMAX_OUTPUT_LED )
{ {
ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED; ucBit = ( ( unsigned char ) 1 ) << uxLED;
if( ucOutputValue & ucBit ) if( ucOutputValue & ucBit )
{ {

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*
@ -85,8 +86,8 @@ characters from commsFIRST_TX_CHAR to commsLAST_TX_CHAR. */
/* Just used to walk through the program memory in order that some random data /* Just used to walk through the program memory in order that some random data
can be generated. */ can be generated. */
#define commsTOTAL_PROGRAM_MEMORY ( ( unsigned portLONG * ) ( 8 * 1024 ) ) #define commsTOTAL_PROGRAM_MEMORY ( ( unsigned long * ) ( 8 * 1024 ) )
#define commsFIRST_PROGRAM_BYTES ( ( unsigned portLONG * ) 4 ) #define commsFIRST_PROGRAM_BYTES ( ( unsigned long * ) 4 )
/* The time between transmissions of the string on UART 0. This is pseudo /* The time between transmissions of the string on UART 0. This is pseudo
random in order to generate a bit or randomness to when the interrupts occur.*/ random in order to generate a bit or randomness to when the interrupts occur.*/
@ -107,7 +108,7 @@ static unsigned portBASE_TYPE uxCommsErrorStatus = pdPASS;
static xQueueHandle xCommsQueue; static xQueueHandle xCommsQueue;
/* The next character to transmit. */ /* The next character to transmit. */
static portCHAR cNextChar; static char cNextChar;
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -115,7 +116,7 @@ void vSerialInit( void )
{ {
/* Create the queue used to communicate between the UART ISR and the Comms /* Create the queue used to communicate between the UART ISR and the Comms
Rx task. */ Rx task. */
xCommsQueue = xQueueCreate( commsRX_QUEUE_LEN, sizeof( portCHAR ) ); xCommsQueue = xQueueCreate( commsRX_QUEUE_LEN, sizeof( char ) );
/* Enable the UART. GPIOA has already been initialised. */ /* Enable the UART. GPIOA has already been initialised. */
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0); SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
@ -141,7 +142,7 @@ void vSerialInit( void )
void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex ) void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
{ {
portTickType xDelayPeriod; portTickType xDelayPeriod;
static unsigned portLONG *pulRandomBytes = commsFIRST_PROGRAM_BYTES; static unsigned long *pulRandomBytes = commsFIRST_PROGRAM_BYTES;
/* Co-routine MUST start with a call to crSTART. */ /* Co-routine MUST start with a call to crSTART. */
crSTART( xHandle ); crSTART( xHandle );
@ -205,8 +206,8 @@ static unsigned portLONG *pulRandomBytes = commsFIRST_PROGRAM_BYTES;
void vUART_ISR( void ) void vUART_ISR( void )
{ {
unsigned portLONG ulStatus; unsigned long ulStatus;
portCHAR cRxedChar; char cRxedChar;
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* What caused the interrupt. */ /* What caused the interrupt. */
@ -223,7 +224,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* Get the char from the buffer and post it onto the queue of /* Get the char from the buffer and post it onto the queue of
Rxed chars. Posting the character should wake the task that is Rxed chars. Posting the character should wake the task that is
blocked on the queue waiting for characters. */ blocked on the queue waiting for characters. */
cRxedChar = ( portCHAR ) HWREG( UART0_BASE + UART_O_DR ); cRxedChar = ( char ) HWREG( UART0_BASE + UART_O_DR );
xQueueSendFromISR( xCommsQueue, &cRxedChar, &xHigherPriorityTaskWoken ); xQueueSendFromISR( xCommsQueue, &cRxedChar, &xHigherPriorityTaskWoken );
} }
} }
@ -252,7 +253,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
void vCommsRxTask( void * pvParameters ) void vCommsRxTask( void * pvParameters )
{ {
static portCHAR cRxedChar, cExpectedChar; static char cRxedChar, cExpectedChar;
/* Set the char we expect to receive to the start of the string. */ /* Set the char we expect to receive to the start of the string. */
cExpectedChar = commsFIRST_TX_CHAR; cExpectedChar = commsFIRST_TX_CHAR;

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef COMMS_TEST_H #ifndef COMMS_TEST_H

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*
@ -187,7 +188,7 @@ void vSetErrorLED( void );
/* /*
* Thread safe write to the PDC. * Thread safe write to the PDC.
*/ */
static void prvPDCWrite( portCHAR cAddress, portCHAR cData ); static void prvPDCWrite( char cAddress, char cData );
/* /*
* Sets up the hardware used by the demo. * Sets up the hardware used by the demo.
@ -200,7 +201,7 @@ static void prvSetupHardware( void );
/* The structure that is passed on the LCD message queue. */ /* The structure that is passed on the LCD message queue. */
typedef struct typedef struct
{ {
portCHAR **ppcMessageToDisplay; /*<< Points to a char* pointing to the message to display. */ char **ppcMessageToDisplay; /*<< Points to a char* pointing to the message to display. */
portBASE_TYPE xRow; /*<< The row on which the message should be displayed. */ portBASE_TYPE xRow; /*<< The row on which the message should be displayed. */
} xLCDMessage; } xLCDMessage;
@ -252,7 +253,7 @@ void main( void )
static void prvLCDMessageTask( void * pvParameters ) static void prvLCDMessageTask( void * pvParameters )
{ {
/* The strings that are written to the LCD. */ /* The strings that are written to the LCD. */
portCHAR *pcStringsToDisplay[] = { char *pcStringsToDisplay[] = {
"IAR ", "IAR ",
"Stellaris ", "Stellaris ",
"Demo ", "Demo ",
@ -302,8 +303,8 @@ void prvLCDTask( void * pvParameters )
unsigned portBASE_TYPE uxIndex; unsigned portBASE_TYPE uxIndex;
xQueueHandle *pxLCDQueue; xQueueHandle *pxLCDQueue;
xLCDMessage xReceivedMessage; xLCDMessage xReceivedMessage;
portCHAR *pcString; char *pcString;
const unsigned portCHAR ucCFGData[] = { const unsigned char ucCFGData[] = {
0x30, /* Set data bus to 8-bits. */ 0x30, /* Set data bus to 8-bits. */
0x30, 0x30,
0x30, 0x30,
@ -362,9 +363,9 @@ const unsigned portCHAR ucCFGData[] = {
static void prvADCCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex ) static void prvADCCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
{ {
static unsigned portLONG ulADCValue; static unsigned long ulADCValue;
static portCHAR cMessageBuffer[ mainMAX_ADC_STRING_LEN ]; static char cMessageBuffer[ mainMAX_ADC_STRING_LEN ];
static portCHAR *pcMessage; static char *pcMessage;
static xLCDMessage xMessageToSend; static xLCDMessage xMessageToSend;
/* Co-routines MUST start with a call to crSTART(). */ /* Co-routines MUST start with a call to crSTART(). */
@ -386,7 +387,7 @@ static xLCDMessage xMessageToSend;
pcMessage = cMessageBuffer; pcMessage = cMessageBuffer;
/* Configure the message we are going to send for display. */ /* Configure the message we are going to send for display. */
xMessageToSend.ppcMessageToDisplay = ( portCHAR** ) &pcMessage; xMessageToSend.ppcMessageToDisplay = ( char** ) &pcMessage;
xMessageToSend.xRow = mainBOTTOM_ROW; xMessageToSend.xRow = mainBOTTOM_ROW;
/* Send the string to the LCD task for display. We are sending /* Send the string to the LCD task for display. We are sending
@ -421,7 +422,7 @@ static void prvSetupHardware( void )
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static void prvPDCWrite( portCHAR cAddress, portCHAR cData ) static void prvPDCWrite( char cAddress, char cData )
{ {
vTaskSuspendAll(); vTaskSuspendAll();
{ {

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/** /**
@ -81,7 +82,7 @@ Changes from V1.00:
Changes from V2.0.0 Changes from V2.0.0
+ Delay periods are now specified using variables and constants of + Delay periods are now specified using variables and constants of
portTickType rather than unsigned portLONG. portTickType rather than unsigned long.
Changes from V4.0.2 Changes from V4.0.2
@ -101,7 +102,7 @@ Changes from V4.0.2
#include "BlockQ.h" #include "BlockQ.h"
#include "print.h" #include "print.h"
#define blckqSTACK_SIZE ( ( unsigned portSHORT ) configMINIMAL_STACK_SIZE ) #define blckqSTACK_SIZE ( ( unsigned short ) configMINIMAL_STACK_SIZE )
#define blckqNUM_TASK_SETS ( 3 ) #define blckqNUM_TASK_SETS ( 3 )
/* Structure used to pass parameters to the blocking queue tasks. */ /* Structure used to pass parameters to the blocking queue tasks. */
@ -109,7 +110,7 @@ typedef struct BLOCKING_QUEUE_PARAMETERS
{ {
xQueueHandle xQueue; /*< The queue to be used by the task. */ xQueueHandle xQueue; /*< The queue to be used by the task. */
portTickType xBlockTime; /*< The block time to use on queue reads/writes. */ portTickType xBlockTime; /*< The block time to use on queue reads/writes. */
volatile portSHORT *psCheckVariable; /*< Incremented on each successful cycle to check the task is still running. */ volatile short *psCheckVariable; /*< Incremented on each successful cycle to check the task is still running. */
} xBlockingQueueParameters; } xBlockingQueueParameters;
/* Task function that creates an incrementing number and posts it on a queue. */ /* Task function that creates an incrementing number and posts it on a queue. */
@ -122,11 +123,11 @@ static void vBlockingQueueConsumer( void *pvParameters );
/* Variables which are incremented each time an item is removed from a queue, and /* Variables which are incremented each time an item is removed from a queue, and
found to be the expected value. found to be the expected value.
These are used to check that the tasks are still running. */ These are used to check that the tasks are still running. */
static volatile portSHORT sBlockingConsumerCount[ blckqNUM_TASK_SETS ] = { ( portSHORT ) 0, ( portSHORT ) 0, ( portSHORT ) 0 }; static volatile short sBlockingConsumerCount[ blckqNUM_TASK_SETS ] = { ( short ) 0, ( short ) 0, ( short ) 0 };
/* Variable which are incremented each time an item is posted on a queue. These /* Variable which are incremented each time an item is posted on a queue. These
are used to check that the tasks are still running. */ are used to check that the tasks are still running. */
static volatile portSHORT sBlockingProducerCount[ blckqNUM_TASK_SETS ] = { ( portSHORT ) 0, ( portSHORT ) 0, ( portSHORT ) 0 }; static volatile short sBlockingProducerCount[ blckqNUM_TASK_SETS ] = { ( short ) 0, ( short ) 0, ( short ) 0 };
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -146,7 +147,7 @@ const portTickType xDontBlock = ( portTickType ) 0;
/* Create the queue used by the first two tasks to pass the incrementing number. /* Create the queue used by the first two tasks to pass the incrementing number.
Pass a pointer to the queue in the parameter structure. */ Pass a pointer to the queue in the parameter structure. */
pxQueueParameters1->xQueue = xQueueCreate( uxQueueSize1, ( unsigned portBASE_TYPE ) sizeof( unsigned portSHORT ) ); pxQueueParameters1->xQueue = xQueueCreate( uxQueueSize1, ( unsigned portBASE_TYPE ) sizeof( unsigned short ) );
/* The consumer is created first so gets a block time as described above. */ /* The consumer is created first so gets a block time as described above. */
pxQueueParameters1->xBlockTime = xBlockTime; pxQueueParameters1->xBlockTime = xBlockTime;
@ -181,7 +182,7 @@ const portTickType xDontBlock = ( portTickType ) 0;
the same mechanism but reverses the task priorities. */ the same mechanism but reverses the task priorities. */
pxQueueParameters3 = ( xBlockingQueueParameters * ) pvPortMalloc( sizeof( xBlockingQueueParameters ) ); pxQueueParameters3 = ( xBlockingQueueParameters * ) pvPortMalloc( sizeof( xBlockingQueueParameters ) );
pxQueueParameters3->xQueue = xQueueCreate( uxQueueSize1, ( unsigned portBASE_TYPE ) sizeof( unsigned portSHORT ) ); pxQueueParameters3->xQueue = xQueueCreate( uxQueueSize1, ( unsigned portBASE_TYPE ) sizeof( unsigned short ) );
pxQueueParameters3->xBlockTime = xDontBlock; pxQueueParameters3->xBlockTime = xDontBlock;
pxQueueParameters3->psCheckVariable = &( sBlockingProducerCount[ 1 ] ); pxQueueParameters3->psCheckVariable = &( sBlockingProducerCount[ 1 ] );
@ -198,7 +199,7 @@ const portTickType xDontBlock = ( portTickType ) 0;
/* Create the last two tasks as described above. The mechanism is again just /* Create the last two tasks as described above. The mechanism is again just
the same. This time both parameter structures are given a block time. */ the same. This time both parameter structures are given a block time. */
pxQueueParameters5 = ( xBlockingQueueParameters * ) pvPortMalloc( sizeof( xBlockingQueueParameters ) ); pxQueueParameters5 = ( xBlockingQueueParameters * ) pvPortMalloc( sizeof( xBlockingQueueParameters ) );
pxQueueParameters5->xQueue = xQueueCreate( uxQueueSize5, ( unsigned portBASE_TYPE ) sizeof( unsigned portSHORT ) ); pxQueueParameters5->xQueue = xQueueCreate( uxQueueSize5, ( unsigned portBASE_TYPE ) sizeof( unsigned short ) );
pxQueueParameters5->xBlockTime = xBlockTime; pxQueueParameters5->xBlockTime = xBlockTime;
pxQueueParameters5->psCheckVariable = &( sBlockingProducerCount[ 2 ] ); pxQueueParameters5->psCheckVariable = &( sBlockingProducerCount[ 2 ] );
@ -214,11 +215,11 @@ const portTickType xDontBlock = ( portTickType ) 0;
static void vBlockingQueueProducer( void *pvParameters ) static void vBlockingQueueProducer( void *pvParameters )
{ {
unsigned portSHORT usValue = 0; unsigned short usValue = 0;
xBlockingQueueParameters *pxQueueParameters; xBlockingQueueParameters *pxQueueParameters;
const portCHAR * const pcTaskStartMsg = "Blocking queue producer started.\r\n"; const char * const pcTaskStartMsg = "Blocking queue producer started.\r\n";
const portCHAR * const pcTaskErrorMsg = "Could not post on blocking queue\r\n"; const char * const pcTaskErrorMsg = "Could not post on blocking queue\r\n";
portSHORT sErrorEverOccurred = pdFALSE; short sErrorEverOccurred = pdFALSE;
pxQueueParameters = ( xBlockingQueueParameters * ) pvParameters; pxQueueParameters = ( xBlockingQueueParameters * ) pvParameters;
@ -251,11 +252,11 @@ portSHORT sErrorEverOccurred = pdFALSE;
static void vBlockingQueueConsumer( void *pvParameters ) static void vBlockingQueueConsumer( void *pvParameters )
{ {
unsigned portSHORT usData, usExpectedValue = 0; unsigned short usData, usExpectedValue = 0;
xBlockingQueueParameters *pxQueueParameters; xBlockingQueueParameters *pxQueueParameters;
const portCHAR * const pcTaskStartMsg = "Blocking queue consumer started.\r\n"; const char * const pcTaskStartMsg = "Blocking queue consumer started.\r\n";
const portCHAR * const pcTaskErrorMsg = "Incorrect value received on blocking queue.\r\n"; const char * const pcTaskErrorMsg = "Incorrect value received on blocking queue.\r\n";
portSHORT sErrorEverOccurred = pdFALSE; short sErrorEverOccurred = pdFALSE;
/* Queue a message for printing to say the task has started. */ /* Queue a message for printing to say the task has started. */
vPrintDisplayMessage( &pcTaskStartMsg ); vPrintDisplayMessage( &pcTaskStartMsg );
@ -296,8 +297,8 @@ portSHORT sErrorEverOccurred = pdFALSE;
/* This is called to check that all the created tasks are still running. */ /* This is called to check that all the created tasks are still running. */
portBASE_TYPE xAreBlockingQueuesStillRunning( void ) portBASE_TYPE xAreBlockingQueuesStillRunning( void )
{ {
static portSHORT sLastBlockingConsumerCount[ blckqNUM_TASK_SETS ] = { ( portSHORT ) 0, ( portSHORT ) 0, ( portSHORT ) 0 }; static short sLastBlockingConsumerCount[ blckqNUM_TASK_SETS ] = { ( short ) 0, ( short ) 0, ( short ) 0 };
static portSHORT sLastBlockingProducerCount[ blckqNUM_TASK_SETS ] = { ( portSHORT ) 0, ( portSHORT ) 0, ( portSHORT ) 0 }; static short sLastBlockingProducerCount[ blckqNUM_TASK_SETS ] = { ( short ) 0, ( short ) 0, ( short ) 0 };
portBASE_TYPE xReturn = pdPASS, xTasks; portBASE_TYPE xReturn = pdPASS, xTasks;
/* Not too worried about mutual exclusion on these variables as they are 16 /* Not too worried about mutual exclusion on these variables as they are 16

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
@ -76,7 +77,7 @@
Changes from V2.0.0 Changes from V2.0.0
+ Delay periods are now specified using variables and constants of + Delay periods are now specified using variables and constants of
portTickType rather than unsigned portLONG. portTickType rather than unsigned long.
*/ */
#include <stdlib.h> #include <stdlib.h>
@ -90,7 +91,7 @@ Changes from V2.0.0
/* Demo program include files. */ /* Demo program include files. */
#include "PollQ.h" #include "PollQ.h"
#define pollqSTACK_SIZE ( ( unsigned portSHORT ) configMINIMAL_STACK_SIZE ) #define pollqSTACK_SIZE ( ( unsigned short ) configMINIMAL_STACK_SIZE )
/* The task that posts the incrementing number onto the queue. */ /* The task that posts the incrementing number onto the queue. */
static void vPolledQueueProducer( void *pvParameters ); static void vPolledQueueProducer( void *pvParameters );
@ -99,7 +100,7 @@ static void vPolledQueueProducer( void *pvParameters );
static void vPolledQueueConsumer( void *pvParameters ); static void vPolledQueueConsumer( void *pvParameters );
/* Variables that are used to check that the tasks are still running with no errors. */ /* Variables that are used to check that the tasks are still running with no errors. */
static volatile portSHORT sPollingConsumerCount = 0, sPollingProducerCount = 0; static volatile short sPollingConsumerCount = 0, sPollingProducerCount = 0;
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
void vStartPolledQueueTasks( unsigned portBASE_TYPE uxPriority ) void vStartPolledQueueTasks( unsigned portBASE_TYPE uxPriority )
@ -108,7 +109,7 @@ static xQueueHandle xPolledQueue;
const unsigned portBASE_TYPE uxQueueSize = 10; const unsigned portBASE_TYPE uxQueueSize = 10;
/* Create the queue used by the producer and consumer. */ /* Create the queue used by the producer and consumer. */
xPolledQueue = xQueueCreate( uxQueueSize, ( unsigned portBASE_TYPE ) sizeof( unsigned portSHORT ) ); xPolledQueue = xQueueCreate( uxQueueSize, ( unsigned portBASE_TYPE ) sizeof( unsigned short ) );
/* Spawn the producer and consumer. */ /* Spawn the producer and consumer. */
xTaskCreate( vPolledQueueConsumer, "QConsNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, NULL ); xTaskCreate( vPolledQueueConsumer, "QConsNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, NULL );
@ -118,13 +119,13 @@ const unsigned portBASE_TYPE uxQueueSize = 10;
static void vPolledQueueProducer( void *pvParameters ) static void vPolledQueueProducer( void *pvParameters )
{ {
unsigned portSHORT usValue = 0, usLoop; unsigned short usValue = 0, usLoop;
xQueueHandle *pxQueue; xQueueHandle *pxQueue;
const portTickType xDelay = ( portTickType ) 200 / portTICK_RATE_MS; const portTickType xDelay = ( portTickType ) 200 / portTICK_RATE_MS;
const unsigned portSHORT usNumToProduce = 3; const unsigned short usNumToProduce = 3;
const portCHAR * const pcTaskStartMsg = "Polled queue producer started.\r\n"; const char * const pcTaskStartMsg = "Polled queue producer started.\r\n";
const portCHAR * const pcTaskErrorMsg = "Could not post on polled queue.\r\n"; const char * const pcTaskErrorMsg = "Could not post on polled queue.\r\n";
portSHORT sError = pdFALSE; short sError = pdFALSE;
/* Queue a message for printing to say the task has started. */ /* Queue a message for printing to say the task has started. */
vPrintDisplayMessage( &pcTaskStartMsg ); vPrintDisplayMessage( &pcTaskStartMsg );
@ -166,12 +167,12 @@ portSHORT sError = pdFALSE;
static void vPolledQueueConsumer( void *pvParameters ) static void vPolledQueueConsumer( void *pvParameters )
{ {
unsigned portSHORT usData, usExpectedValue = 0; unsigned short usData, usExpectedValue = 0;
xQueueHandle *pxQueue; xQueueHandle *pxQueue;
const portTickType xDelay = ( portTickType ) 200 / portTICK_RATE_MS; const portTickType xDelay = ( portTickType ) 200 / portTICK_RATE_MS;
const portCHAR * const pcTaskStartMsg = "Polled queue consumer started.\r\n"; const char * const pcTaskStartMsg = "Polled queue consumer started.\r\n";
const portCHAR * const pcTaskErrorMsg = "Incorrect value received on polled queue.\r\n"; const char * const pcTaskErrorMsg = "Incorrect value received on polled queue.\r\n";
portSHORT sError = pdFALSE; short sError = pdFALSE;
/* Queue a message for printing to say the task has started. */ /* Queue a message for printing to say the task has started. */
vPrintDisplayMessage( &pcTaskStartMsg ); vPrintDisplayMessage( &pcTaskStartMsg );
@ -219,7 +220,7 @@ portSHORT sError = pdFALSE;
/* This is called to check that all the created tasks are still running with no errors. */ /* This is called to check that all the created tasks are still running with no errors. */
portBASE_TYPE xArePollingQueuesStillRunning( void ) portBASE_TYPE xArePollingQueuesStillRunning( void )
{ {
static portSHORT sLastPollingConsumerCount = 0, sLastPollingProducerCount = 0; static short sLastPollingConsumerCount = 0, sLastPollingProducerCount = 0;
portBASE_TYPE xReturn; portBASE_TYPE xReturn;
if( ( sLastPollingConsumerCount == sPollingConsumerCount ) || if( ( sLastPollingConsumerCount == sPollingConsumerCount ) ||

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/** /**
@ -102,7 +103,7 @@ Changed from V1.2.5
Changes from V2.0.0 Changes from V2.0.0
+ Delay periods are now specified using variables and constants of + Delay periods are now specified using variables and constants of
portTickType rather than unsigned portLONG. portTickType rather than unsigned long.
+ Slight modification to task priorities. + Slight modification to task priorities.
*/ */
@ -126,7 +127,7 @@ interval. This is the maximum and minimum block time between sends. */
#define comMAX_CONSECUTIVE_ERRORS ( 2 ) #define comMAX_CONSECUTIVE_ERRORS ( 2 )
#define comSTACK_SIZE ( ( unsigned portSHORT ) 256 ) #define comSTACK_SIZE ( ( unsigned short ) 256 )
#define comRX_RELATIVE_PRIORITY ( 1 ) #define comRX_RELATIVE_PRIORITY ( 1 )
@ -143,12 +144,12 @@ static void vComRxTask( void *pvParameters );
static void vSemTestTask( void * pvParameters ); static void vSemTestTask( void * pvParameters );
/* The string that is repeatedly transmitted. */ /* The string that is repeatedly transmitted. */
const portCHAR * const pcMessageToExchange = "Send this message over and over again to check communications interrupts. " const char * const pcMessageToExchange = "Send this message over and over again to check communications interrupts. "
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n"; "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n";
/* Variables that are incremented on each cycle of each task. These are used to /* Variables that are incremented on each cycle of each task. These are used to
check that both tasks are still executing. */ check that both tasks are still executing. */
volatile portSHORT sTxCount = 0, sRxCount = 0, sSemCount = 0; volatile short sTxCount = 0, sRxCount = 0, sSemCount = 0;
/* The handle to the semaphore test task. */ /* The handle to the semaphore test task. */
static xTaskHandle xSemTestTaskHandle = NULL; static xTaskHandle xSemTestTaskHandle = NULL;
@ -169,7 +170,7 @@ const unsigned portBASE_TYPE uxBufferLength = 255;
static void vComTxTask( void *pvParameters ) static void vComTxTask( void *pvParameters )
{ {
const portCHAR * const pcTaskStartMsg = "COM Tx task started.\r\n"; const char * const pcTaskStartMsg = "COM Tx task started.\r\n";
portTickType xTimeToWait; portTickType xTimeToWait;
/* Stop warnings. */ /* Stop warnings. */
@ -206,15 +207,15 @@ portTickType xTimeToWait;
static void vComRxTask( void *pvParameters ) static void vComRxTask( void *pvParameters )
{ {
const portCHAR * const pcTaskStartMsg = "COM Rx task started.\r\n"; const char * const pcTaskStartMsg = "COM Rx task started.\r\n";
const portCHAR * const pcTaskErrorMsg = "COM read error\r\n"; const char * const pcTaskErrorMsg = "COM read error\r\n";
const portCHAR * const pcTaskRestartMsg = "COM resynced\r\n"; const char * const pcTaskRestartMsg = "COM resynced\r\n";
const portCHAR * const pcTaskTimeoutMsg = "COM Rx timed out\r\n"; const char * const pcTaskTimeoutMsg = "COM Rx timed out\r\n";
const portTickType xBlockTime = ( portTickType ) 0xffff / portTICK_RATE_MS; const portTickType xBlockTime = ( portTickType ) 0xffff / portTICK_RATE_MS;
const portCHAR *pcExpectedChar; const char *pcExpectedChar;
portBASE_TYPE xGotChar; portBASE_TYPE xGotChar;
portCHAR cRxedChar; char cRxedChar;
portSHORT sResyncRequired, sConsecutiveErrors, sLatchedError; short sResyncRequired, sConsecutiveErrors, sLatchedError;
/* Stop warnings. */ /* Stop warnings. */
( void ) pvParameters; ( void ) pvParameters;
@ -303,7 +304,7 @@ portSHORT sResyncRequired, sConsecutiveErrors, sLatchedError;
static void vSemTestTask( void * pvParameters ) static void vSemTestTask( void * pvParameters )
{ {
const portCHAR * const pcTaskStartMsg = "ISR Semaphore test started.\r\n"; const char * const pcTaskStartMsg = "ISR Semaphore test started.\r\n";
portBASE_TYPE xError = pdFALSE; portBASE_TYPE xError = pdFALSE;
/* Stop warnings. */ /* Stop warnings. */
@ -332,7 +333,7 @@ portBASE_TYPE xError = pdFALSE;
/* This is called to check that all the created tasks are still running. */ /* This is called to check that all the created tasks are still running. */
portBASE_TYPE xAreComTestTasksStillRunning( void ) portBASE_TYPE xAreComTestTasksStillRunning( void )
{ {
static portSHORT sLastTxCount = 0, sLastRxCount = 0, sLastSemCount = 0; static short sLastTxCount = 0, sLastRxCount = 0, sLastSemCount = 0;
portBASE_TYPE xReturn; portBASE_TYPE xReturn;
/* Not too worried about mutual exclusion on these variables as they are 16 /* Not too worried about mutual exclusion on these variables as they are 16

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/** /**
@ -68,7 +69,7 @@
Changes from V2.0.0 Changes from V2.0.0
+ Delay periods are now specified using variables and constants of + Delay periods are now specified using variables and constants of
portTickType rather than unsigned portLONG. portTickType rather than unsigned long.
*/ */
#include <stdlib.h> #include <stdlib.h>
@ -81,7 +82,7 @@ Changes from V2.0.0
#include "death.h" #include "death.h"
#include "print.h" #include "print.h"
#define deathSTACK_SIZE ( ( unsigned portSHORT ) 512 ) #define deathSTACK_SIZE ( ( unsigned short ) 512 )
/* The task originally created which is responsible for periodically dynamically /* The task originally created which is responsible for periodically dynamically
creating another four tasks. */ creating another four tasks. */
@ -92,7 +93,7 @@ static void vSuicidalTask( void *pvParameters );
/* A variable which is incremented every time the dynamic tasks are created. This /* A variable which is incremented every time the dynamic tasks are created. This
is used to check that the task is still running. */ is used to check that the task is still running. */
static volatile portSHORT sCreationCount = 0; static volatile short sCreationCount = 0;
/* Used to store the number of tasks that were originally running so the creator /* Used to store the number of tasks that were originally running so the creator
task can tell if any of the suicidal tasks have failed to die. */ task can tell if any of the suicidal tasks have failed to die. */
@ -165,7 +166,7 @@ static void vCreateTasks( void *pvParameters )
{ {
const portTickType xDelay = ( portTickType ) 1000 / portTICK_RATE_MS; const portTickType xDelay = ( portTickType ) 1000 / portTICK_RATE_MS;
unsigned portBASE_TYPE uxPriority; unsigned portBASE_TYPE uxPriority;
const portCHAR * const pcTaskStartMsg = "Create task started.\r\n"; const char * const pcTaskStartMsg = "Create task started.\r\n";
/* Queue a message for printing to say the task has started. */ /* Queue a message for printing to say the task has started. */
vPrintDisplayMessage( &pcTaskStartMsg ); vPrintDisplayMessage( &pcTaskStartMsg );
@ -193,8 +194,8 @@ const portCHAR * const pcTaskStartMsg = "Create task started.\r\n";
are not any more than four extra tasks. */ are not any more than four extra tasks. */
portBASE_TYPE xIsCreateTaskStillRunning( void ) portBASE_TYPE xIsCreateTaskStillRunning( void )
{ {
static portSHORT sLastCreationCount = 0; static short sLastCreationCount = 0;
portSHORT sReturn = pdTRUE; short sReturn = pdTRUE;
unsigned portBASE_TYPE uxTasksRunningNow; unsigned portBASE_TYPE uxTasksRunningNow;
if( sLastCreationCount == sCreationCount ) if( sLastCreationCount == sCreationCount )

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/** /**
@ -114,7 +115,7 @@
Changes from V2.0.0 Changes from V2.0.0
+ Delay periods are now specified using variables and constants of + Delay periods are now specified using variables and constants of
portTickType rather than unsigned portLONG. portTickType rather than unsigned long.
+ Added a second, simple test that uses the functions + Added a second, simple test that uses the functions
vQueueReceiveWhenSuspendedTask() and vQueueSendWhenSuspendedTask(). vQueueReceiveWhenSuspendedTask() and vQueueSendWhenSuspendedTask().
@ -158,10 +159,10 @@ static void prvChangePriorityHelperTask( void *pvParameters );
/* Demo task specific constants. */ /* Demo task specific constants. */
#define priSTACK_SIZE ( ( unsigned portSHORT ) configMINIMAL_STACK_SIZE ) #define priSTACK_SIZE ( ( unsigned short ) configMINIMAL_STACK_SIZE )
#define priSLEEP_TIME ( ( portTickType ) 50 ) #define priSLEEP_TIME ( ( portTickType ) 50 )
#define priLOOPS ( 5 ) #define priLOOPS ( 5 )
#define priMAX_COUNT ( ( unsigned portLONG ) 0xff ) #define priMAX_COUNT ( ( unsigned long ) 0xff )
#define priNO_BLOCK ( ( portTickType ) 0 ) #define priNO_BLOCK ( ( portTickType ) 0 )
#define priSUSPENDED_QUEUE_LENGTH ( 1 ) #define priSUSPENDED_QUEUE_LENGTH ( 1 )
@ -173,17 +174,17 @@ static xTaskHandle xContinuousIncrementHandle, xLimitedIncrementHandle, xChangeP
/* The shared counter variable. This is passed in as a parameter to the two /* The shared counter variable. This is passed in as a parameter to the two
counter variables for demonstration purposes. */ counter variables for demonstration purposes. */
static unsigned portLONG ulCounter; static unsigned long ulCounter;
/* Variable used in a similar way by the test that checks the raising and /* Variable used in a similar way by the test that checks the raising and
lowering of task priorities while the scheduler is suspended. */ lowering of task priorities while the scheduler is suspended. */
static unsigned portLONG ulPrioritySetCounter; static unsigned long ulPrioritySetCounter;
/* Variables used to check that the tasks are still operating without error. /* Variables used to check that the tasks are still operating without error.
Each complete iteration of the controller task increments this variable Each complete iteration of the controller task increments this variable
provided no errors have been found. The variable maintaining the same value provided no errors have been found. The variable maintaining the same value
is therefore indication of an error. */ is therefore indication of an error. */
static unsigned portSHORT usCheckVariable = ( unsigned portSHORT ) 0; static unsigned short usCheckVariable = ( unsigned short ) 0;
static portBASE_TYPE xSuspendedQueueSendError = pdFALSE; static portBASE_TYPE xSuspendedQueueSendError = pdFALSE;
static portBASE_TYPE xSuspendedQueueReceiveError = pdFALSE; static portBASE_TYPE xSuspendedQueueReceiveError = pdFALSE;
static portBASE_TYPE xPriorityRaiseWhenSuspendedError = pdFALSE; static portBASE_TYPE xPriorityRaiseWhenSuspendedError = pdFALSE;
@ -198,7 +199,7 @@ xQueueHandle xSuspendedTestQueue;
*/ */
void vStartDynamicPriorityTasks( void ) void vStartDynamicPriorityTasks( void )
{ {
xSuspendedTestQueue = xQueueCreate( priSUSPENDED_QUEUE_LENGTH, sizeof( unsigned portLONG ) ); xSuspendedTestQueue = xQueueCreate( priSUSPENDED_QUEUE_LENGTH, sizeof( unsigned long ) );
xTaskCreate( vContinuousIncrementTask, "CONT_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY, &xContinuousIncrementHandle ); xTaskCreate( vContinuousIncrementTask, "CONT_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY, &xContinuousIncrementHandle );
xTaskCreate( vLimitedIncrementTask, "LIM_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY + 1, &xLimitedIncrementHandle ); xTaskCreate( vLimitedIncrementTask, "LIM_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY + 1, &xLimitedIncrementHandle );
xTaskCreate( vCounterControlTask, "C_CTRL", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); xTaskCreate( vCounterControlTask, "C_CTRL", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
@ -215,11 +216,11 @@ void vStartDynamicPriorityTasks( void )
*/ */
static void vLimitedIncrementTask( void * pvParameters ) static void vLimitedIncrementTask( void * pvParameters )
{ {
unsigned portLONG *pulCounter; unsigned long *pulCounter;
/* Take a pointer to the shared variable from the parameters passed into /* Take a pointer to the shared variable from the parameters passed into
the task. */ the task. */
pulCounter = ( unsigned portLONG * ) pvParameters; pulCounter = ( unsigned long * ) pvParameters;
/* This will run before the control task, so the first thing it does is /* This will run before the control task, so the first thing it does is
suspend - the control task will resume it when ready. */ suspend - the control task will resume it when ready. */
@ -244,12 +245,12 @@ unsigned portLONG *pulCounter;
*/ */
static void vContinuousIncrementTask( void * pvParameters ) static void vContinuousIncrementTask( void * pvParameters )
{ {
unsigned portLONG *pulCounter; unsigned long *pulCounter;
unsigned portBASE_TYPE uxOurPriority; unsigned portBASE_TYPE uxOurPriority;
/* Take a pointer to the shared variable from the parameters passed into /* Take a pointer to the shared variable from the parameters passed into
the task. */ the task. */
pulCounter = ( unsigned portLONG * ) pvParameters; pulCounter = ( unsigned long * ) pvParameters;
/* Query our priority so we can raise it when exclusive access to the /* Query our priority so we can raise it when exclusive access to the
shared variable is required. */ shared variable is required. */
@ -275,11 +276,11 @@ unsigned portBASE_TYPE uxOurPriority;
*/ */
static void vCounterControlTask( void * pvParameters ) static void vCounterControlTask( void * pvParameters )
{ {
unsigned portLONG ulLastCounter; unsigned long ulLastCounter;
portSHORT sLoops; short sLoops;
portSHORT sError = pdFALSE; short sError = pdFALSE;
const portCHAR * const pcTaskStartMsg = "Priority manipulation tasks started.\r\n"; const char * const pcTaskStartMsg = "Priority manipulation tasks started.\r\n";
const portCHAR * const pcTaskFailMsg = "Priority manipulation Task Failed\r\n"; const char * const pcTaskFailMsg = "Priority manipulation Task Failed\r\n";
/* Just to stop warning messages. */ /* Just to stop warning messages. */
( void ) pvParameters; ( void ) pvParameters;
@ -290,7 +291,7 @@ const portCHAR * const pcTaskFailMsg = "Priority manipulation Task Failed\r\n";
for( ;; ) for( ;; )
{ {
/* Start with the counter at zero. */ /* Start with the counter at zero. */
ulCounter = ( unsigned portLONG ) 0; ulCounter = ( unsigned long ) 0;
/* First section : */ /* First section : */
@ -331,7 +332,7 @@ const portCHAR * const pcTaskFailMsg = "Priority manipulation Task Failed\r\n";
vTaskSuspend( xContinuousIncrementHandle ); vTaskSuspend( xContinuousIncrementHandle );
/* Reset the variable. */ /* Reset the variable. */
ulCounter = ( unsigned portLONG ) 0; ulCounter = ( unsigned long ) 0;
/* Resume the limited count task which has a higher priority than us. /* Resume the limited count task which has a higher priority than us.
We should therefore not return from this call until the limited count We should therefore not return from this call until the limited count
@ -369,9 +370,9 @@ const portCHAR * const pcTaskFailMsg = "Priority manipulation Task Failed\r\n";
static void vQueueSendWhenSuspendedTask( void *pvParameters ) static void vQueueSendWhenSuspendedTask( void *pvParameters )
{ {
static unsigned portLONG ulValueToSend = ( unsigned portLONG ) 0; static unsigned long ulValueToSend = ( unsigned long ) 0;
const portCHAR * const pcTaskStartMsg = "Queue send while suspended task started.\r\n"; const char * const pcTaskStartMsg = "Queue send while suspended task started.\r\n";
const portCHAR * const pcTaskFailMsg = "Queue send while suspended failed.\r\n"; const char * const pcTaskFailMsg = "Queue send while suspended failed.\r\n";
/* Just to stop warning messages. */ /* Just to stop warning messages. */
( void ) pvParameters; ( void ) pvParameters;
@ -407,9 +408,9 @@ const portCHAR * const pcTaskFailMsg = "Queue send while suspended failed.\r\n";
static void vQueueReceiveWhenSuspendedTask( void *pvParameters ) static void vQueueReceiveWhenSuspendedTask( void *pvParameters )
{ {
static unsigned portLONG ulExpectedValue = ( unsigned portLONG ) 0, ulReceivedValue; static unsigned long ulExpectedValue = ( unsigned long ) 0, ulReceivedValue;
const portCHAR * const pcTaskStartMsg = "Queue receive while suspended task started.\r\n"; const char * const pcTaskStartMsg = "Queue receive while suspended task started.\r\n";
const portCHAR * const pcTaskFailMsg = "Queue receive while suspended failed.\r\n"; const char * const pcTaskFailMsg = "Queue receive while suspended failed.\r\n";
portBASE_TYPE xGotValue; portBASE_TYPE xGotValue;
/* Just to stop warning messages. */ /* Just to stop warning messages. */
@ -462,8 +463,8 @@ portBASE_TYPE xGotValue;
static void prvChangePriorityWhenSuspendedTask( void *pvParameters ) static void prvChangePriorityWhenSuspendedTask( void *pvParameters )
{ {
const portCHAR * const pcTaskStartMsg = "Priority change when suspended task started.\r\n"; const char * const pcTaskStartMsg = "Priority change when suspended task started.\r\n";
const portCHAR * const pcTaskFailMsg = "Priority change when suspended task failed.\r\n"; const char * const pcTaskFailMsg = "Priority change when suspended task failed.\r\n";
/* Just to stop warning messages. */ /* Just to stop warning messages. */
( void ) pvParameters; ( void ) pvParameters;
@ -475,7 +476,7 @@ const portCHAR * const pcTaskFailMsg = "Priority change when suspended task fail
{ {
/* Start with the counter at 0 so we know what the counter should be /* Start with the counter at 0 so we know what the counter should be
when we check it next. */ when we check it next. */
ulPrioritySetCounter = ( unsigned portLONG ) 0; ulPrioritySetCounter = ( unsigned long ) 0;
/* Resume the helper task. At this time it has a priority lower than /* Resume the helper task. At this time it has a priority lower than
ours so no context switch should occur. */ ours so no context switch should occur. */
@ -484,7 +485,7 @@ const portCHAR * const pcTaskFailMsg = "Priority change when suspended task fail
/* Check to ensure the task just resumed has not executed. */ /* Check to ensure the task just resumed has not executed. */
portENTER_CRITICAL(); portENTER_CRITICAL();
{ {
if( ulPrioritySetCounter != ( unsigned portLONG ) 0 ) if( ulPrioritySetCounter != ( unsigned long ) 0 )
{ {
xPriorityRaiseWhenSuspendedError = pdTRUE; xPriorityRaiseWhenSuspendedError = pdTRUE;
vPrintDisplayMessage( &pcTaskFailMsg ); vPrintDisplayMessage( &pcTaskFailMsg );
@ -502,7 +503,7 @@ const portCHAR * const pcTaskFailMsg = "Priority change when suspended task fail
suspended. */ suspended. */
portENTER_CRITICAL(); portENTER_CRITICAL();
{ {
if( ulPrioritySetCounter != ( unsigned portLONG ) 0 ) if( ulPrioritySetCounter != ( unsigned long ) 0 )
{ {
xPriorityRaiseWhenSuspendedError = pdTRUE; xPriorityRaiseWhenSuspendedError = pdTRUE;
vPrintDisplayMessage( &pcTaskFailMsg ); vPrintDisplayMessage( &pcTaskFailMsg );
@ -519,7 +520,7 @@ const portCHAR * const pcTaskFailMsg = "Priority change when suspended task fail
We should now always find the counter set to 1. */ We should now always find the counter set to 1. */
portENTER_CRITICAL(); portENTER_CRITICAL();
{ {
if( ulPrioritySetCounter != ( unsigned portLONG ) 1 ) if( ulPrioritySetCounter != ( unsigned long ) 1 )
{ {
xPriorityRaiseWhenSuspendedError = pdTRUE; xPriorityRaiseWhenSuspendedError = pdTRUE;
vPrintDisplayMessage( &pcTaskFailMsg ); vPrintDisplayMessage( &pcTaskFailMsg );
@ -562,7 +563,7 @@ portBASE_TYPE xAreDynamicPriorityTasksStillRunning( void )
{ {
/* Keep a history of the check variables so we know if it has been incremented /* Keep a history of the check variables so we know if it has been incremented
since the last call. */ since the last call. */
static unsigned portSHORT usLastTaskCheck = ( unsigned portSHORT ) 0; static unsigned short usLastTaskCheck = ( unsigned short ) 0;
portBASE_TYPE xReturn = pdTRUE; portBASE_TYPE xReturn = pdTRUE;
/* Check the tasks are still running by ensuring the check variable /* Check the tasks are still running by ensuring the check variable

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/** /**
@ -171,7 +172,7 @@ static void prvMultiEventTask( void *pvParameters )
{ {
portBASE_TYPE *pxCounter; portBASE_TYPE *pxCounter;
unsigned portBASE_TYPE uxDummy; unsigned portBASE_TYPE uxDummy;
const portCHAR * const pcTaskStartMsg = "Multi event task started.\r\n"; const char * const pcTaskStartMsg = "Multi event task started.\r\n";
/* The variable this task will increment is passed in as a parameter. */ /* The variable this task will increment is passed in as a parameter. */
pxCounter = ( portBASE_TYPE * ) pvParameters; pxCounter = ( portBASE_TYPE * ) pvParameters;
@ -197,7 +198,7 @@ const portCHAR * const pcTaskStartMsg = "Multi event task started.\r\n";
static void prvEventControllerTask( void *pvParameters ) static void prvEventControllerTask( void *pvParameters )
{ {
const portCHAR * const pcTaskStartMsg = "Multi event controller task started.\r\n"; const char * const pcTaskStartMsg = "Multi event controller task started.\r\n";
portBASE_TYPE xDummy = 0; portBASE_TYPE xDummy = 0;
/* Just to stop warnings. */ /* Just to stop warnings. */

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
@ -65,7 +66,7 @@
Changes from V2.0.0 Changes from V2.0.0
+ Delay periods are now specified using variables and constants of + Delay periods are now specified using variables and constants of
portTickType rather than unsigned portLONG. portTickType rather than unsigned long.
Changes from V2.1.1 Changes from V2.1.1
@ -98,7 +99,7 @@ structure passed in as the parameter. */
static void vLEDFlashTask( void *pvParameters ); static void vLEDFlashTask( void *pvParameters );
/* String to print if USE_STDIO is defined. */ /* String to print if USE_STDIO is defined. */
const portCHAR * const pcTaskStartMsg = "LED flash task started.\r\n"; const char * const pcTaskStartMsg = "LED flash task started.\r\n";
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*
@ -80,7 +81,7 @@ Changes from V1.2.3
/* Demo program include files. */ /* Demo program include files. */
#include "flop.h" #include "flop.h"
#define mathSTACK_SIZE ( ( unsigned portSHORT ) 512 ) #define mathSTACK_SIZE ( ( unsigned short ) 512 )
#define mathNUMBER_OF_TASKS ( 8 ) #define mathNUMBER_OF_TASKS ( 8 )
/* Four tasks, each of which performs a different floating point calculation. /* Four tasks, each of which performs a different floating point calculation.
@ -93,7 +94,7 @@ static void vCompetingMathTask4( void *pvParameters );
/* These variables are used to check that all the tasks are still running. If a /* These variables are used to check that all the tasks are still running. If a
task gets a calculation wrong it will task gets a calculation wrong it will
stop incrementing its check variable. */ 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 };
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -113,18 +114,18 @@ void vStartMathTasks( unsigned portBASE_TYPE uxPriority )
static void vCompetingMathTask1( void *pvParameters ) static void vCompetingMathTask1( void *pvParameters )
{ {
portDOUBLE d1, d2, d3, d4; portDOUBLE d1, d2, d3, d4;
volatile unsigned portSHORT *pusTaskCheckVariable; volatile unsigned short *pusTaskCheckVariable;
const portDOUBLE dAnswer = ( 123.4567 + 2345.6789 ) * -918.222; const portDOUBLE dAnswer = ( 123.4567 + 2345.6789 ) * -918.222;
const portCHAR * const pcTaskStartMsg = "Math task 1 started.\r\n"; const char * const pcTaskStartMsg = "Math task 1 started.\r\n";
const portCHAR * const pcTaskFailMsg = "Math task 1 failed.\r\n"; const char * const pcTaskFailMsg = "Math task 1 failed.\r\n";
portSHORT sError = pdFALSE; short sError = pdFALSE;
/* Queue a message for printing to say the task has started. */ /* Queue a message for printing to say the task has started. */
vPrintDisplayMessage( &pcTaskStartMsg ); vPrintDisplayMessage( &pcTaskStartMsg );
/* The variable this task increments to show it is still running is passed in /* The variable this task increments to show it is still running is passed in
as the parameter. */ as the parameter. */
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters; pusTaskCheckVariable = ( unsigned short * ) pvParameters;
/* Keep performing a calculation and checking the result against a constant. */ /* Keep performing a calculation and checking the result against a constant. */
for(;;) for(;;)
@ -160,18 +161,18 @@ portSHORT sError = pdFALSE;
static void vCompetingMathTask2( void *pvParameters ) static void vCompetingMathTask2( void *pvParameters )
{ {
portDOUBLE d1, d2, d3, d4; portDOUBLE d1, d2, d3, d4;
volatile unsigned portSHORT *pusTaskCheckVariable; volatile unsigned short *pusTaskCheckVariable;
const portDOUBLE dAnswer = ( -389.38 / 32498.2 ) * -2.0001; const portDOUBLE dAnswer = ( -389.38 / 32498.2 ) * -2.0001;
const portCHAR * const pcTaskStartMsg = "Math task 2 started.\r\n"; const char * const pcTaskStartMsg = "Math task 2 started.\r\n";
const portCHAR * const pcTaskFailMsg = "Math task 2 failed.\r\n"; const char * const pcTaskFailMsg = "Math task 2 failed.\r\n";
portSHORT sError = pdFALSE; short sError = pdFALSE;
/* Queue a message for printing to say the task has started. */ /* Queue a message for printing to say the task has started. */
vPrintDisplayMessage( &pcTaskStartMsg ); vPrintDisplayMessage( &pcTaskStartMsg );
/* The variable this task increments to show it is still running is passed in /* The variable this task increments to show it is still running is passed in
as the parameter. */ as the parameter. */
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters; pusTaskCheckVariable = ( unsigned short * ) pvParameters;
/* Keep performing a calculation and checking the result against a constant. */ /* Keep performing a calculation and checking the result against a constant. */
for( ;; ) for( ;; )
@ -208,19 +209,19 @@ portSHORT sError = pdFALSE;
static void vCompetingMathTask3( void *pvParameters ) static void vCompetingMathTask3( void *pvParameters )
{ {
portDOUBLE *pdArray, dTotal1, dTotal2, dDifference; portDOUBLE *pdArray, dTotal1, dTotal2, dDifference;
volatile unsigned portSHORT *pusTaskCheckVariable; volatile unsigned short *pusTaskCheckVariable;
const unsigned portSHORT usArraySize = 250; const unsigned short usArraySize = 250;
unsigned portSHORT usPosition; unsigned short usPosition;
const portCHAR * const pcTaskStartMsg = "Math task 3 started.\r\n"; const char * const pcTaskStartMsg = "Math task 3 started.\r\n";
const portCHAR * const pcTaskFailMsg = "Math task 3 failed.\r\n"; const char * const pcTaskFailMsg = "Math task 3 failed.\r\n";
portSHORT sError = pdFALSE; short sError = pdFALSE;
/* Queue a message for printing to say the task has started. */ /* Queue a message for printing to say the task has started. */
vPrintDisplayMessage( &pcTaskStartMsg ); vPrintDisplayMessage( &pcTaskStartMsg );
/* The variable this task increments to show it is still running is passed in /* The variable this task increments to show it is still running is passed in
as the parameter. */ as the parameter. */
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters; pusTaskCheckVariable = ( unsigned short * ) pvParameters;
pdArray = ( portDOUBLE * ) pvPortMalloc( ( size_t ) 250 * sizeof( portDOUBLE ) ); pdArray = ( portDOUBLE * ) pvPortMalloc( ( size_t ) 250 * sizeof( portDOUBLE ) );
@ -267,19 +268,19 @@ portSHORT sError = pdFALSE;
static void vCompetingMathTask4( void *pvParameters ) static void vCompetingMathTask4( void *pvParameters )
{ {
portDOUBLE *pdArray, dTotal1, dTotal2, dDifference; portDOUBLE *pdArray, dTotal1, dTotal2, dDifference;
volatile unsigned portSHORT *pusTaskCheckVariable; volatile unsigned short *pusTaskCheckVariable;
const unsigned portSHORT usArraySize = 250; const unsigned short usArraySize = 250;
unsigned portSHORT usPosition; unsigned short usPosition;
const portCHAR * const pcTaskStartMsg = "Math task 4 started.\r\n"; const char * const pcTaskStartMsg = "Math task 4 started.\r\n";
const portCHAR * const pcTaskFailMsg = "Math task 4 failed.\r\n"; const char * const pcTaskFailMsg = "Math task 4 failed.\r\n";
portSHORT sError = pdFALSE; short sError = pdFALSE;
/* Queue a message for printing to say the task has started. */ /* Queue a message for printing to say the task has started. */
vPrintDisplayMessage( &pcTaskStartMsg ); vPrintDisplayMessage( &pcTaskStartMsg );
/* The variable this task increments to show it is still running is passed in /* The variable this task increments to show it is still running is passed in
as the parameter. */ as the parameter. */
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters; pusTaskCheckVariable = ( unsigned short * ) pvParameters;
pdArray = ( portDOUBLE * ) pvPortMalloc( ( size_t ) 250 * sizeof( portDOUBLE ) ); pdArray = ( portDOUBLE * ) pvPortMalloc( ( size_t ) 250 * sizeof( portDOUBLE ) );
@ -328,7 +329,7 @@ portBASE_TYPE xAreMathsTaskStillRunning( void )
{ {
/* Keep a history of the check variables so we know if they have been incremented /* Keep a history of the check variables so we know if they have been incremented
since the last call. */ 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; portBASE_TYPE xReturn = pdTRUE, xTask;
/* Check the maths tasks are still running by ensuring their check variables /* Check the maths tasks are still running by ensuring their check variables

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*
@ -85,7 +86,7 @@ Changes from V1.2.1
/* Demo program include files. */ /* Demo program include files. */
#include "integer.h" #include "integer.h"
#define intgSTACK_SIZE ( ( unsigned portSHORT ) 256 ) #define intgSTACK_SIZE ( ( unsigned short ) 256 )
#define intgNUMBER_OF_TASKS ( 8 ) #define intgNUMBER_OF_TASKS ( 8 )
/* Four tasks, each of which performs a different calculation on four byte /* Four tasks, each of which performs a different calculation on four byte
@ -97,7 +98,7 @@ static void vCompeteingIntMathTask4( void *pvParameters );
/* These variables are used to check that all the tasks are still running. If a /* 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. */ task gets a calculation wrong it will stop incrementing its check variable. */
static volatile unsigned portSHORT usTaskCheck[ intgNUMBER_OF_TASKS ] = { ( unsigned portSHORT ) 0 }; static volatile unsigned short usTaskCheck[ intgNUMBER_OF_TASKS ] = { ( unsigned short ) 0 };
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
void vStartIntegerMathTasks( unsigned portBASE_TYPE uxPriority ) void vStartIntegerMathTasks( unsigned portBASE_TYPE uxPriority )
@ -115,26 +116,26 @@ void vStartIntegerMathTasks( unsigned portBASE_TYPE uxPriority )
static void vCompeteingIntMathTask1( void *pvParameters ) static void vCompeteingIntMathTask1( void *pvParameters )
{ {
portLONG l1, l2, l3, l4; long l1, l2, l3, l4;
portSHORT sError = pdFALSE; short sError = pdFALSE;
volatile unsigned portSHORT *pusTaskCheckVariable; volatile unsigned short *pusTaskCheckVariable;
const portLONG lAnswer = ( ( portLONG ) 74565L + ( portLONG ) 1234567L ) * ( portLONG ) -918L; const long lAnswer = ( ( long ) 74565L + ( long ) 1234567L ) * ( long ) -918L;
const portCHAR * const pcTaskStartMsg = "Integer math task 1 started.\r\n"; const char * const pcTaskStartMsg = "Integer math task 1 started.\r\n";
const portCHAR * const pcTaskFailMsg = "Integer math task 1 failed.\r\n"; const char * const pcTaskFailMsg = "Integer math task 1 failed.\r\n";
/* Queue a message for printing to say the task has started. */ /* Queue a message for printing to say the task has started. */
vPrintDisplayMessage( &pcTaskStartMsg ); vPrintDisplayMessage( &pcTaskStartMsg );
/* The variable this task increments to show it is still running is passed in /* The variable this task increments to show it is still running is passed in
as the parameter. */ as the parameter. */
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters; pusTaskCheckVariable = ( unsigned short * ) pvParameters;
/* Keep performing a calculation and checking the result against a constant. */ /* Keep performing a calculation and checking the result against a constant. */
for(;;) for(;;)
{ {
l1 = ( portLONG ) 74565L; l1 = ( long ) 74565L;
l2 = ( portLONG ) 1234567L; l2 = ( long ) 1234567L;
l3 = ( portLONG ) -918L; l3 = ( long ) -918L;
l4 = ( l1 + l2 ) * l3; l4 = ( l1 + l2 ) * l3;
@ -160,19 +161,19 @@ const portCHAR * const pcTaskFailMsg = "Integer math task 1 failed.\r\n";
static void vCompeteingIntMathTask2( void *pvParameters ) static void vCompeteingIntMathTask2( void *pvParameters )
{ {
portLONG l1, l2, l3, l4; long l1, l2, l3, l4;
portSHORT sError = pdFALSE; short sError = pdFALSE;
volatile unsigned portSHORT *pusTaskCheckVariable; volatile unsigned short *pusTaskCheckVariable;
const portLONG lAnswer = ( ( portLONG ) -389000L / ( portLONG ) 329999L ) * ( portLONG ) -89L; const long lAnswer = ( ( long ) -389000L / ( long ) 329999L ) * ( long ) -89L;
const portCHAR * const pcTaskStartMsg = "Integer math task 2 started.\r\n"; const char * const pcTaskStartMsg = "Integer math task 2 started.\r\n";
const portCHAR * const pcTaskFailMsg = "Integer math task 2 failed.\r\n"; const char * const pcTaskFailMsg = "Integer math task 2 failed.\r\n";
/* Queue a message for printing to say the task has started. */ /* Queue a message for printing to say the task has started. */
vPrintDisplayMessage( &pcTaskStartMsg ); vPrintDisplayMessage( &pcTaskStartMsg );
/* The variable this task increments to show it is still running is passed in /* The variable this task increments to show it is still running is passed in
as the parameter. */ as the parameter. */
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters; pusTaskCheckVariable = ( unsigned short * ) pvParameters;
/* Keep performing a calculation and checking the result against a constant. */ /* Keep performing a calculation and checking the result against a constant. */
for( ;; ) for( ;; )
@ -205,36 +206,36 @@ const portCHAR * const pcTaskFailMsg = "Integer math task 2 failed.\r\n";
static void vCompeteingIntMathTask3( void *pvParameters ) static void vCompeteingIntMathTask3( void *pvParameters )
{ {
portLONG *plArray, lTotal1, lTotal2; long *plArray, lTotal1, lTotal2;
portSHORT sError = pdFALSE; short sError = pdFALSE;
volatile unsigned portSHORT *pusTaskCheckVariable; volatile unsigned short *pusTaskCheckVariable;
const unsigned portSHORT usArraySize = ( unsigned portSHORT ) 250; const unsigned short usArraySize = ( unsigned short ) 250;
unsigned portSHORT usPosition; unsigned short usPosition;
const portCHAR * const pcTaskStartMsg = "Integer math task 3 started.\r\n"; const char * const pcTaskStartMsg = "Integer math task 3 started.\r\n";
const portCHAR * const pcTaskFailMsg = "Integer math task 3 failed.\r\n"; const char * const pcTaskFailMsg = "Integer math task 3 failed.\r\n";
/* Queue a message for printing to say the task has started. */ /* Queue a message for printing to say the task has started. */
vPrintDisplayMessage( &pcTaskStartMsg ); vPrintDisplayMessage( &pcTaskStartMsg );
/* The variable this task increments to show it is still running is passed in /* The variable this task increments to show it is still running is passed in
as the parameter. */ as the parameter. */
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters; pusTaskCheckVariable = ( unsigned short * ) pvParameters;
/* Create the array we are going to use for our check calculation. */ /* Create the array we are going to use for our check calculation. */
plArray = ( portLONG * ) pvPortMalloc( ( size_t ) 250 * sizeof( portLONG ) ); plArray = ( long * ) pvPortMalloc( ( size_t ) 250 * sizeof( long ) );
/* Keep filling the array, keeping a running total of the values placed in the /* Keep filling the array, keeping a running total of the values placed in the
array. Then run through the array adding up all the values. If the two totals array. Then run through the array adding up all the values. If the two totals
do not match, stop the check variable from incrementing. */ do not match, stop the check variable from incrementing. */
for( ;; ) for( ;; )
{ {
lTotal1 = ( portLONG ) 0; lTotal1 = ( long ) 0;
lTotal2 = ( portLONG ) 0; lTotal2 = ( long ) 0;
for( usPosition = 0; usPosition < usArraySize; usPosition++ ) for( usPosition = 0; usPosition < usArraySize; usPosition++ )
{ {
plArray[ usPosition ] = ( portLONG ) usPosition + ( portLONG ) 5; plArray[ usPosition ] = ( long ) usPosition + ( long ) 5;
lTotal1 += ( portLONG ) usPosition + ( portLONG ) 5; lTotal1 += ( long ) usPosition + ( long ) 5;
} }
taskYIELD(); taskYIELD();
@ -264,36 +265,36 @@ const portCHAR * const pcTaskFailMsg = "Integer math task 3 failed.\r\n";
static void vCompeteingIntMathTask4( void *pvParameters ) static void vCompeteingIntMathTask4( void *pvParameters )
{ {
portLONG *plArray, lTotal1, lTotal2; long *plArray, lTotal1, lTotal2;
portSHORT sError = pdFALSE; short sError = pdFALSE;
volatile unsigned portSHORT *pusTaskCheckVariable; volatile unsigned short *pusTaskCheckVariable;
const unsigned portSHORT usArraySize = 250; const unsigned short usArraySize = 250;
unsigned portSHORT usPosition; unsigned short usPosition;
const portCHAR * const pcTaskStartMsg = "Integer math task 4 started.\r\n"; const char * const pcTaskStartMsg = "Integer math task 4 started.\r\n";
const portCHAR * const pcTaskFailMsg = "Integer math task 4 failed.\r\n"; const char * const pcTaskFailMsg = "Integer math task 4 failed.\r\n";
/* Queue a message for printing to say the task has started. */ /* Queue a message for printing to say the task has started. */
vPrintDisplayMessage( &pcTaskStartMsg ); vPrintDisplayMessage( &pcTaskStartMsg );
/* The variable this task increments to show it is still running is passed in /* The variable this task increments to show it is still running is passed in
as the parameter. */ as the parameter. */
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters; pusTaskCheckVariable = ( unsigned short * ) pvParameters;
/* Create the array we are going to use for our check calculation. */ /* Create the array we are going to use for our check calculation. */
plArray = ( portLONG * ) pvPortMalloc( ( size_t ) 250 * sizeof( portLONG ) ); plArray = ( long * ) pvPortMalloc( ( size_t ) 250 * sizeof( long ) );
/* Keep filling the array, keeping a running total of the values placed in the /* Keep filling the array, keeping a running total of the values placed in the
array. Then run through the array adding up all the values. If the two totals array. Then run through the array adding up all the values. If the two totals
do not match, stop the check variable from incrementing. */ do not match, stop the check variable from incrementing. */
for( ;; ) for( ;; )
{ {
lTotal1 = ( portLONG ) 0; lTotal1 = ( long ) 0;
lTotal2 = ( portLONG ) 0; lTotal2 = ( long ) 0;
for( usPosition = 0; usPosition < usArraySize; usPosition++ ) for( usPosition = 0; usPosition < usArraySize; usPosition++ )
{ {
plArray[ usPosition ] = ( portLONG ) usPosition * ( portLONG ) 12; plArray[ usPosition ] = ( long ) usPosition * ( long ) 12;
lTotal1 += ( portLONG ) usPosition * ( portLONG ) 12; lTotal1 += ( long ) usPosition * ( long ) 12;
} }
taskYIELD(); taskYIELD();
@ -327,7 +328,7 @@ portBASE_TYPE xAreIntegerMathsTaskStillRunning( void )
{ {
/* Keep a history of the check variables so we know if they have been incremented /* Keep a history of the check variables so we know if they have been incremented
since the last call. */ since the last call. */
static unsigned portSHORT usLastTaskCheck[ intgNUMBER_OF_TASKS ] = { ( unsigned portSHORT ) 0 }; static unsigned short usLastTaskCheck[ intgNUMBER_OF_TASKS ] = { ( unsigned short ) 0 };
portBASE_TYPE xReturn = pdTRUE, xTask; portBASE_TYPE xReturn = pdTRUE, xTask;
/* Check the maths tasks are still running by ensuring their check variables /* Check the maths tasks are still running by ensuring their check variables

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/** /**
@ -73,7 +74,7 @@
Changes from V2.0.0 Changes from V2.0.0
+ Delay periods are now specified using variables and constants of + Delay periods are now specified using variables and constants of
portTickType rather than unsigned portLONG. portTickType rather than unsigned long.
*/ */
#include <stdlib.h> #include <stdlib.h>
@ -94,11 +95,11 @@ void vPrintInitialise( void )
const unsigned portBASE_TYPE uxQueueSize = 20; const unsigned portBASE_TYPE uxQueueSize = 20;
/* Create the queue on which errors will be reported. */ /* Create the queue on which errors will be reported. */
xPrintQueue = xQueueCreate( uxQueueSize, ( unsigned portBASE_TYPE ) sizeof( portCHAR * ) ); xPrintQueue = xQueueCreate( uxQueueSize, ( unsigned portBASE_TYPE ) sizeof( char * ) );
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
void vPrintDisplayMessage( const portCHAR * const * ppcMessageToSend ) void vPrintDisplayMessage( const char * const * ppcMessageToSend )
{ {
#ifdef USE_STDIO #ifdef USE_STDIO
xQueueSend( xPrintQueue, ( void * ) ppcMessageToSend, ( portTickType ) 0 ); xQueueSend( xPrintQueue, ( void * ) ppcMessageToSend, ( portTickType ) 0 );
@ -109,9 +110,9 @@ void vPrintDisplayMessage( const portCHAR * const * ppcMessageToSend )
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
const portCHAR *pcPrintGetNextMessage( portTickType xPrintRate ) const char *pcPrintGetNextMessage( portTickType xPrintRate )
{ {
portCHAR *pcMessage; char *pcMessage;
if( xQueueReceive( xPrintQueue, &pcMessage, xPrintRate ) == pdPASS ) if( xQueueReceive( xPrintQueue, &pcMessage, xPrintRate ) == pdPASS )
{ {

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/** /**
@ -83,7 +84,7 @@ Changes from V1.2.0:
Changes from V2.0.0 Changes from V2.0.0
+ Delay periods are now specified using variables and constants of + Delay periods are now specified using variables and constants of
portTickType rather than unsigned portLONG. portTickType rather than unsigned long.
Changes from V2.1.1 Changes from V2.1.1
@ -103,8 +104,8 @@ Changes from V2.1.1
#include "print.h" #include "print.h"
/* The value to which the shared variables are counted. */ /* The value to which the shared variables are counted. */
#define semtstBLOCKING_EXPECTED_VALUE ( ( unsigned portLONG ) 0xfff ) #define semtstBLOCKING_EXPECTED_VALUE ( ( unsigned long ) 0xfff )
#define semtstNON_BLOCKING_EXPECTED_VALUE ( ( unsigned portLONG ) 0xff ) #define semtstNON_BLOCKING_EXPECTED_VALUE ( ( unsigned long ) 0xff )
#define semtstSTACK_SIZE configMINIMAL_STACK_SIZE #define semtstSTACK_SIZE configMINIMAL_STACK_SIZE
@ -119,17 +120,17 @@ static void prvSemaphoreTest( void *pvParameters );
typedef struct SEMAPHORE_PARAMETERS typedef struct SEMAPHORE_PARAMETERS
{ {
xSemaphoreHandle xSemaphore; xSemaphoreHandle xSemaphore;
volatile unsigned portLONG *pulSharedVariable; volatile unsigned long *pulSharedVariable;
portTickType xBlockTime; portTickType xBlockTime;
} xSemaphoreParameters; } xSemaphoreParameters;
/* Variables used to check that all the tasks are still running without errors. */ /* Variables used to check that all the tasks are still running without errors. */
static volatile portSHORT sCheckVariables[ semtstNUM_TASKS ] = { 0 }; static volatile short sCheckVariables[ semtstNUM_TASKS ] = { 0 };
static volatile portSHORT sNextCheckVariable = 0; static volatile short sNextCheckVariable = 0;
/* Strings to print if USE_STDIO is defined. */ /* Strings to print if USE_STDIO is defined. */
const portCHAR * const pcPollingSemaphoreTaskError = "Guarded shared variable in unexpected state.\r\n"; const char * const pcPollingSemaphoreTaskError = "Guarded shared variable in unexpected state.\r\n";
const portCHAR * const pcSemaphoreTaskStart = "Guarded shared variable task started.\r\n"; const char * const pcSemaphoreTaskStart = "Guarded shared variable task started.\r\n";
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -149,7 +150,7 @@ const portTickType xBlockTime = ( portTickType ) 100;
if( pxFirstSemaphoreParameters->xSemaphore != NULL ) if( pxFirstSemaphoreParameters->xSemaphore != NULL )
{ {
/* Create the variable which is to be shared by the first two tasks. */ /* Create the variable which is to be shared by the first two tasks. */
pxFirstSemaphoreParameters->pulSharedVariable = ( unsigned portLONG * ) pvPortMalloc( sizeof( unsigned portLONG ) ); pxFirstSemaphoreParameters->pulSharedVariable = ( unsigned long * ) pvPortMalloc( sizeof( unsigned long ) );
/* Initialise the share variable to the value the tasks expect. */ /* Initialise the share variable to the value the tasks expect. */
*( pxFirstSemaphoreParameters->pulSharedVariable ) = semtstNON_BLOCKING_EXPECTED_VALUE; *( pxFirstSemaphoreParameters->pulSharedVariable ) = semtstNON_BLOCKING_EXPECTED_VALUE;
@ -172,7 +173,7 @@ const portTickType xBlockTime = ( portTickType ) 100;
if( pxSecondSemaphoreParameters->xSemaphore != NULL ) if( pxSecondSemaphoreParameters->xSemaphore != NULL )
{ {
pxSecondSemaphoreParameters->pulSharedVariable = ( unsigned portLONG * ) pvPortMalloc( sizeof( unsigned portLONG ) ); pxSecondSemaphoreParameters->pulSharedVariable = ( unsigned long * ) pvPortMalloc( sizeof( unsigned long ) );
*( pxSecondSemaphoreParameters->pulSharedVariable ) = semtstBLOCKING_EXPECTED_VALUE; *( pxSecondSemaphoreParameters->pulSharedVariable ) = semtstBLOCKING_EXPECTED_VALUE;
pxSecondSemaphoreParameters->xBlockTime = xBlockTime / portTICK_RATE_MS; pxSecondSemaphoreParameters->xBlockTime = xBlockTime / portTICK_RATE_MS;
@ -186,9 +187,9 @@ const portTickType xBlockTime = ( portTickType ) 100;
static void prvSemaphoreTest( void *pvParameters ) static void prvSemaphoreTest( void *pvParameters )
{ {
xSemaphoreParameters *pxParameters; xSemaphoreParameters *pxParameters;
volatile unsigned portLONG *pulSharedVariable, ulExpectedValue; volatile unsigned long *pulSharedVariable, ulExpectedValue;
unsigned portLONG ulCounter; unsigned long ulCounter;
portSHORT sError = pdFALSE, sCheckVariableToUse; short sError = pdFALSE, sCheckVariableToUse;
/* See which check variable to use. sNextCheckVariable is not semaphore /* See which check variable to use. sNextCheckVariable is not semaphore
protected! */ protected! */
@ -233,7 +234,7 @@ portSHORT sError = pdFALSE, sCheckVariableToUse;
/* Clear the variable, then count it back up to the expected value /* Clear the variable, then count it back up to the expected value
before releasing the semaphore. Would expect a context switch or before releasing the semaphore. Would expect a context switch or
two during this time. */ two during this time. */
for( ulCounter = ( unsigned portLONG ) 0; ulCounter <= ulExpectedValue; ulCounter++ ) for( ulCounter = ( unsigned long ) 0; ulCounter <= ulExpectedValue; ulCounter++ )
{ {
*pulSharedVariable = ulCounter; *pulSharedVariable = ulCounter;
if( *pulSharedVariable != ulCounter ) if( *pulSharedVariable != ulCounter )
@ -286,7 +287,7 @@ portSHORT sError = pdFALSE, sCheckVariableToUse;
/* This is called to check that all the created tasks are still running. */ /* This is called to check that all the created tasks are still running. */
portBASE_TYPE xAreSemaphoreTasksStillRunning( void ) portBASE_TYPE xAreSemaphoreTasksStillRunning( void )
{ {
static portSHORT sLastCheckVariables[ semtstNUM_TASKS ] = { 0 }; static short sLastCheckVariables[ semtstNUM_TASKS ] = { 0 };
portBASE_TYPE xTask, xReturn = pdTRUE; portBASE_TYPE xTask, xReturn = pdTRUE;
for( xTask = 0; xTask < semtstNUM_TASKS; xTask++ ) for( xTask = 0; xTask < semtstNUM_TASKS; xTask++ )

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*
@ -96,7 +97,7 @@ typedef struct BLOCKING_QUEUE_PARAMETERS
{ {
xQueueHandle xQueue; /*< The queue to be used by the task. */ xQueueHandle xQueue; /*< The queue to be used by the task. */
portTickType xBlockTime; /*< The block time to use on queue reads/writes. */ portTickType xBlockTime; /*< The block time to use on queue reads/writes. */
volatile portSHORT *psCheckVariable; /*< Incremented on each successful cycle to check the task is still running. */ volatile short *psCheckVariable; /*< Incremented on each successful cycle to check the task is still running. */
} xBlockingQueueParameters; } xBlockingQueueParameters;
/* Task function that creates an incrementing number and posts it on a queue. */ /* Task function that creates an incrementing number and posts it on a queue. */
@ -109,11 +110,11 @@ static portTASK_FUNCTION_PROTO( vBlockingQueueConsumer, pvParameters );
/* Variables which are incremented each time an item is removed from a queue, and /* Variables which are incremented each time an item is removed from a queue, and
found to be the expected value. found to be the expected value.
These are used to check that the tasks are still running. */ These are used to check that the tasks are still running. */
static volatile portSHORT sBlockingConsumerCount[ blckqNUM_TASK_SETS ] = { ( unsigned portSHORT ) 0, ( unsigned portSHORT ) 0, ( unsigned portSHORT ) 0 }; static volatile short sBlockingConsumerCount[ blckqNUM_TASK_SETS ] = { ( unsigned short ) 0, ( unsigned short ) 0, ( unsigned short ) 0 };
/* Variable which are incremented each time an item is posted on a queue. These /* Variable which are incremented each time an item is posted on a queue. These
are used to check that the tasks are still running. */ are used to check that the tasks are still running. */
static volatile portSHORT sBlockingProducerCount[ blckqNUM_TASK_SETS ] = { ( unsigned portSHORT ) 0, ( unsigned portSHORT ) 0, ( unsigned portSHORT ) 0 }; static volatile short sBlockingProducerCount[ blckqNUM_TASK_SETS ] = { ( unsigned short ) 0, ( unsigned short ) 0, ( unsigned short ) 0 };
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -133,7 +134,7 @@ const portTickType xDontBlock = ( portTickType ) 0;
/* Create the queue used by the first two tasks to pass the incrementing number. /* Create the queue used by the first two tasks to pass the incrementing number.
Pass a pointer to the queue in the parameter structure. */ Pass a pointer to the queue in the parameter structure. */
pxQueueParameters1->xQueue = xQueueCreate( uxQueueSize1, ( unsigned portBASE_TYPE ) sizeof( unsigned portSHORT ) ); pxQueueParameters1->xQueue = xQueueCreate( uxQueueSize1, ( unsigned portBASE_TYPE ) sizeof( unsigned short ) );
/* The consumer is created first so gets a block time as described above. */ /* The consumer is created first so gets a block time as described above. */
pxQueueParameters1->xBlockTime = xBlockTime; pxQueueParameters1->xBlockTime = xBlockTime;
@ -159,8 +160,8 @@ const portTickType xDontBlock = ( portTickType ) 0;
/* Note the producer has a lower priority than the consumer when the tasks are /* Note the producer has a lower priority than the consumer when the tasks are
spawned. */ spawned. */
xTaskCreate( vBlockingQueueConsumer, ( signed portCHAR * ) "QConsB1", blckqSTACK_SIZE, ( void * ) pxQueueParameters1, uxPriority, NULL ); xTaskCreate( vBlockingQueueConsumer, ( signed char * ) "QConsB1", blckqSTACK_SIZE, ( void * ) pxQueueParameters1, uxPriority, NULL );
xTaskCreate( vBlockingQueueProducer, ( signed portCHAR * ) "QProdB2", blckqSTACK_SIZE, ( void * ) pxQueueParameters2, tskIDLE_PRIORITY, NULL ); xTaskCreate( vBlockingQueueProducer, ( signed char * ) "QProdB2", blckqSTACK_SIZE, ( void * ) pxQueueParameters2, tskIDLE_PRIORITY, NULL );
@ -168,7 +169,7 @@ const portTickType xDontBlock = ( portTickType ) 0;
the same mechanism but reverses the task priorities. */ the same mechanism but reverses the task priorities. */
pxQueueParameters3 = ( xBlockingQueueParameters * ) pvPortMalloc( sizeof( xBlockingQueueParameters ) ); pxQueueParameters3 = ( xBlockingQueueParameters * ) pvPortMalloc( sizeof( xBlockingQueueParameters ) );
pxQueueParameters3->xQueue = xQueueCreate( uxQueueSize1, ( unsigned portBASE_TYPE ) sizeof( unsigned portSHORT ) ); pxQueueParameters3->xQueue = xQueueCreate( uxQueueSize1, ( unsigned portBASE_TYPE ) sizeof( unsigned short ) );
pxQueueParameters3->xBlockTime = xDontBlock; pxQueueParameters3->xBlockTime = xDontBlock;
pxQueueParameters3->psCheckVariable = &( sBlockingProducerCount[ 1 ] ); pxQueueParameters3->psCheckVariable = &( sBlockingProducerCount[ 1 ] );
@ -177,15 +178,15 @@ const portTickType xDontBlock = ( portTickType ) 0;
pxQueueParameters4->xBlockTime = xBlockTime; pxQueueParameters4->xBlockTime = xBlockTime;
pxQueueParameters4->psCheckVariable = &( sBlockingConsumerCount[ 1 ] ); pxQueueParameters4->psCheckVariable = &( sBlockingConsumerCount[ 1 ] );
xTaskCreate( vBlockingQueueConsumer, ( signed portCHAR * ) "QProdB3", blckqSTACK_SIZE, ( void * ) pxQueueParameters3, tskIDLE_PRIORITY, NULL ); xTaskCreate( vBlockingQueueConsumer, ( signed char * ) "QProdB3", blckqSTACK_SIZE, ( void * ) pxQueueParameters3, tskIDLE_PRIORITY, NULL );
xTaskCreate( vBlockingQueueProducer, ( signed portCHAR * ) "QConsB4", blckqSTACK_SIZE, ( void * ) pxQueueParameters4, uxPriority, NULL ); xTaskCreate( vBlockingQueueProducer, ( signed char * ) "QConsB4", blckqSTACK_SIZE, ( void * ) pxQueueParameters4, uxPriority, NULL );
/* Create the last two tasks as described above. The mechanism is again just /* Create the last two tasks as described above. The mechanism is again just
the same. This time both parameter structures are given a block time. */ the same. This time both parameter structures are given a block time. */
pxQueueParameters5 = ( xBlockingQueueParameters * ) pvPortMalloc( sizeof( xBlockingQueueParameters ) ); pxQueueParameters5 = ( xBlockingQueueParameters * ) pvPortMalloc( sizeof( xBlockingQueueParameters ) );
pxQueueParameters5->xQueue = xQueueCreate( uxQueueSize5, ( unsigned portBASE_TYPE ) sizeof( unsigned portSHORT ) ); pxQueueParameters5->xQueue = xQueueCreate( uxQueueSize5, ( unsigned portBASE_TYPE ) sizeof( unsigned short ) );
pxQueueParameters5->xBlockTime = xBlockTime; pxQueueParameters5->xBlockTime = xBlockTime;
pxQueueParameters5->psCheckVariable = &( sBlockingProducerCount[ 2 ] ); pxQueueParameters5->psCheckVariable = &( sBlockingProducerCount[ 2 ] );
@ -194,16 +195,16 @@ const portTickType xDontBlock = ( portTickType ) 0;
pxQueueParameters6->xBlockTime = xBlockTime; pxQueueParameters6->xBlockTime = xBlockTime;
pxQueueParameters6->psCheckVariable = &( sBlockingConsumerCount[ 2 ] ); pxQueueParameters6->psCheckVariable = &( sBlockingConsumerCount[ 2 ] );
xTaskCreate( vBlockingQueueProducer, ( signed portCHAR * ) "QProdB5", blckqSTACK_SIZE, ( void * ) pxQueueParameters5, tskIDLE_PRIORITY, NULL ); xTaskCreate( vBlockingQueueProducer, ( signed char * ) "QProdB5", blckqSTACK_SIZE, ( void * ) pxQueueParameters5, tskIDLE_PRIORITY, NULL );
xTaskCreate( vBlockingQueueConsumer, ( signed portCHAR * ) "QConsB6", blckqSTACK_SIZE, ( void * ) pxQueueParameters6, tskIDLE_PRIORITY, NULL ); xTaskCreate( vBlockingQueueConsumer, ( signed char * ) "QConsB6", blckqSTACK_SIZE, ( void * ) pxQueueParameters6, tskIDLE_PRIORITY, NULL );
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static portTASK_FUNCTION( vBlockingQueueProducer, pvParameters ) static portTASK_FUNCTION( vBlockingQueueProducer, pvParameters )
{ {
unsigned portSHORT usValue = 0; unsigned short usValue = 0;
xBlockingQueueParameters *pxQueueParameters; xBlockingQueueParameters *pxQueueParameters;
portSHORT sErrorEverOccurred = pdFALSE; short sErrorEverOccurred = pdFALSE;
pxQueueParameters = ( xBlockingQueueParameters * ) pvParameters; pxQueueParameters = ( xBlockingQueueParameters * ) pvParameters;
@ -232,9 +233,9 @@ portSHORT sErrorEverOccurred = pdFALSE;
static portTASK_FUNCTION( vBlockingQueueConsumer, pvParameters ) static portTASK_FUNCTION( vBlockingQueueConsumer, pvParameters )
{ {
unsigned portSHORT usData, usExpectedValue = 0; unsigned short usData, usExpectedValue = 0;
xBlockingQueueParameters *pxQueueParameters; xBlockingQueueParameters *pxQueueParameters;
portSHORT sErrorEverOccurred = pdFALSE; short sErrorEverOccurred = pdFALSE;
pxQueueParameters = ( xBlockingQueueParameters * ) pvParameters; pxQueueParameters = ( xBlockingQueueParameters * ) pvParameters;
@ -270,8 +271,8 @@ portSHORT sErrorEverOccurred = pdFALSE;
/* This is called to check that all the created tasks are still running. */ /* This is called to check that all the created tasks are still running. */
portBASE_TYPE xAreBlockingQueuesStillRunning( void ) portBASE_TYPE xAreBlockingQueuesStillRunning( void )
{ {
static portSHORT sLastBlockingConsumerCount[ blckqNUM_TASK_SETS ] = { ( unsigned portSHORT ) 0, ( unsigned portSHORT ) 0, ( unsigned portSHORT ) 0 }; static short sLastBlockingConsumerCount[ blckqNUM_TASK_SETS ] = { ( unsigned short ) 0, ( unsigned short ) 0, ( unsigned short ) 0 };
static portSHORT sLastBlockingProducerCount[ blckqNUM_TASK_SETS ] = { ( unsigned portSHORT ) 0, ( unsigned portSHORT ) 0, ( unsigned portSHORT ) 0 }; static short sLastBlockingProducerCount[ blckqNUM_TASK_SETS ] = { ( unsigned short ) 0, ( unsigned short ) 0, ( unsigned short ) 0 };
portBASE_TYPE xReturn = pdPASS, xTasks; portBASE_TYPE xReturn = pdPASS, xTasks;
/* Not too worried about mutual exclusion on these variables as they are 16 /* Not too worried about mutual exclusion on these variables as they are 16

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*
@ -72,7 +73,7 @@
Changes from V2.0.0 Changes from V2.0.0
+ Delay periods are now specified using variables and constants of + Delay periods are now specified using variables and constants of
portTickType rather than unsigned portLONG. portTickType rather than unsigned long.
*/ */
#include <stdlib.h> #include <stdlib.h>
@ -110,7 +111,7 @@ void vStartPolledQueueTasks( unsigned portBASE_TYPE uxPriority )
static xQueueHandle xPolledQueue; static xQueueHandle xPolledQueue;
/* Create the queue used by the producer and consumer. */ /* Create the queue used by the producer and consumer. */
xPolledQueue = xQueueCreate( pollqQUEUE_SIZE, ( unsigned portBASE_TYPE ) sizeof( unsigned portSHORT ) ); xPolledQueue = xQueueCreate( pollqQUEUE_SIZE, ( unsigned portBASE_TYPE ) sizeof( unsigned short ) );
/* vQueueAddToRegistry() adds the queue to the queue registry, if one is /* vQueueAddToRegistry() adds the queue to the queue registry, if one is
in use. The queue registry is provided as a means for kernel aware in use. The queue registry is provided as a means for kernel aware
@ -118,17 +119,17 @@ static xQueueHandle xPolledQueue;
is not being used. The call to vQueueAddToRegistry() will be removed is not being used. The call to vQueueAddToRegistry() will be removed
by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is
defined to be less than 1. */ defined to be less than 1. */
vQueueAddToRegistry( xPolledQueue, ( signed portCHAR * ) "Poll_Test_Queue" ); vQueueAddToRegistry( xPolledQueue, ( signed char * ) "Poll_Test_Queue" );
/* Spawn the producer and consumer. */ /* Spawn the producer and consumer. */
xTaskCreate( vPolledQueueConsumer, ( signed portCHAR * ) "QConsNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL ); xTaskCreate( vPolledQueueConsumer, ( signed char * ) "QConsNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL );
xTaskCreate( vPolledQueueProducer, ( signed portCHAR * ) "QProdNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL ); xTaskCreate( vPolledQueueProducer, ( signed char * ) "QProdNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL );
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static portTASK_FUNCTION( vPolledQueueProducer, pvParameters ) static portTASK_FUNCTION( vPolledQueueProducer, pvParameters )
{ {
unsigned portSHORT usValue = ( unsigned portSHORT ) 0; unsigned short usValue = ( unsigned short ) 0;
signed portBASE_TYPE xError = pdFALSE, xLoop; signed portBASE_TYPE xError = pdFALSE, xLoop;
for( ;; ) for( ;; )
@ -167,7 +168,7 @@ signed portBASE_TYPE xError = pdFALSE, xLoop;
static portTASK_FUNCTION( vPolledQueueConsumer, pvParameters ) static portTASK_FUNCTION( vPolledQueueConsumer, pvParameters )
{ {
unsigned portSHORT usData, usExpectedValue = ( unsigned portSHORT ) 0; unsigned short usData, usExpectedValue = ( unsigned short ) 0;
signed portBASE_TYPE xError = pdFALSE; signed portBASE_TYPE xError = pdFALSE;
for( ;; ) for( ;; )

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*
@ -109,11 +110,11 @@ void vCreateBlockTimeTasks( void )
is not being used. The call to vQueueAddToRegistry() will be removed is not being used. The call to vQueueAddToRegistry() will be removed
by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is
defined to be less than 1. */ defined to be less than 1. */
vQueueAddToRegistry( xTestQueue, ( signed portCHAR * ) "Block_Time_Queue" ); vQueueAddToRegistry( xTestQueue, ( signed char * ) "Block_Time_Queue" );
/* Create the two test tasks. */ /* Create the two test tasks. */
xTaskCreate( vPrimaryBlockTimeTestTask, ( signed portCHAR * )"BTest1", configMINIMAL_STACK_SIZE, NULL, bktPRIMARY_PRIORITY, NULL ); xTaskCreate( vPrimaryBlockTimeTestTask, ( signed char * )"BTest1", configMINIMAL_STACK_SIZE, NULL, bktPRIMARY_PRIORITY, NULL );
xTaskCreate( vSecondaryBlockTimeTestTask, ( signed portCHAR * )"BTest2", configMINIMAL_STACK_SIZE, NULL, bktSECONDARY_PRIORITY, &xSecondary ); xTaskCreate( vSecondaryBlockTimeTestTask, ( signed char * )"BTest2", configMINIMAL_STACK_SIZE, NULL, bktSECONDARY_PRIORITY, &xSecondary );
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
@ -133,21 +134,21 @@ static volatile unsigned portBASE_TYPE uxRxLoops = comINITIAL_RX_COUNT_VALUE;
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
void vAltStartComTestTasks( unsigned portBASE_TYPE uxPriority, unsigned portLONG ulBaudRate, unsigned portBASE_TYPE uxLED ) void vAltStartComTestTasks( unsigned portBASE_TYPE uxPriority, unsigned long ulBaudRate, unsigned portBASE_TYPE uxLED )
{ {
/* Initialise the com port then spawn the Rx and Tx tasks. */ /* Initialise the com port then spawn the Rx and Tx tasks. */
uxBaseLED = uxLED; uxBaseLED = uxLED;
xSerialPortInitMinimal( ulBaudRate, comBUFFER_LEN ); xSerialPortInitMinimal( ulBaudRate, comBUFFER_LEN );
/* The Tx task is spawned with a lower priority than the Rx task. */ /* The Tx task is spawned with a lower priority than the Rx task. */
xTaskCreate( vComTxTask, ( signed portCHAR * ) "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( xTaskHandle * ) NULL ); xTaskCreate( vComTxTask, ( signed char * ) "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( xTaskHandle * ) NULL );
xTaskCreate( vComRxTask, ( signed portCHAR * ) "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); xTaskCreate( vComRxTask, ( signed char * ) "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL );
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static portTASK_FUNCTION( vComTxTask, pvParameters ) static portTASK_FUNCTION( vComTxTask, pvParameters )
{ {
signed portCHAR cByteToSend; signed char cByteToSend;
portTickType xTimeToWait; portTickType xTimeToWait;
/* Just to stop compiler warnings. */ /* Just to stop compiler warnings. */
@ -189,7 +190,7 @@ portTickType xTimeToWait;
static portTASK_FUNCTION( vComRxTask, pvParameters ) static portTASK_FUNCTION( vComRxTask, pvParameters )
{ {
signed portCHAR cExpectedByte, cByteRxed; signed char cExpectedByte, cByteRxed;
portBASE_TYPE xResyncRequired = pdFALSE, xErrorOccurred = pdFALSE; portBASE_TYPE xResyncRequired = pdFALSE, xErrorOccurred = pdFALSE;
/* Just to stop compiler warnings. */ /* Just to stop compiler warnings. */

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/** /**
@ -67,7 +68,7 @@
/* /*
Changes from V3.0.0 Changes from V3.0.0
+ CreationCount sizes changed from unsigned portBASE_TYPE to + CreationCount sizes changed from unsigned portBASE_TYPE to
unsigned portSHORT to minimize the risk of overflowing. unsigned short to minimize the risk of overflowing.
+ Reset of usLastCreationCount added + Reset of usLastCreationCount added
@ -98,7 +99,7 @@ static portTASK_FUNCTION_PROTO( vSuicidalTask, pvParameters );
/* A variable which is incremented every time the dynamic tasks are created. This /* A variable which is incremented every time the dynamic tasks are created. This
is used to check that the task is still running. */ is used to check that the task is still running. */
static volatile unsigned portSHORT usCreationCount = 0; static volatile unsigned short usCreationCount = 0;
/* Used to store the number of tasks that were originally running so the creator /* Used to store the number of tasks that were originally running so the creator
task can tell if any of the suicidal tasks have failed to die. task can tell if any of the suicidal tasks have failed to die.
@ -125,7 +126,7 @@ unsigned portBASE_TYPE *puxPriority;
puxPriority = ( unsigned portBASE_TYPE * ) pvPortMalloc( sizeof( unsigned portBASE_TYPE ) ); puxPriority = ( unsigned portBASE_TYPE * ) pvPortMalloc( sizeof( unsigned portBASE_TYPE ) );
*puxPriority = uxPriority; *puxPriority = uxPriority;
xTaskCreate( vCreateTasks, ( signed portCHAR * ) "CREATOR", deathSTACK_SIZE, ( void * ) puxPriority, uxPriority, NULL ); xTaskCreate( vCreateTasks, ( signed char * ) "CREATOR", deathSTACK_SIZE, ( void * ) puxPriority, uxPriority, NULL );
/* Record the number of tasks that are running now so we know if any of the /* Record the number of tasks that are running now so we know if any of the
suicidal tasks have failed to be killed. */ suicidal tasks have failed to be killed. */
@ -142,7 +143,7 @@ unsigned portBASE_TYPE *puxPriority;
static portTASK_FUNCTION( vSuicidalTask, pvParameters ) static portTASK_FUNCTION( vSuicidalTask, pvParameters )
{ {
volatile portLONG l1, l2; volatile long l1, l2;
xTaskHandle xTaskToKill; xTaskHandle xTaskToKill;
const portTickType xDelay = ( portTickType ) 200 / portTICK_RATE_MS; const portTickType xDelay = ( portTickType ) 200 / portTICK_RATE_MS;
@ -196,8 +197,8 @@ unsigned portBASE_TYPE uxPriority;
xCreatedTask = NULL; xCreatedTask = NULL;
xTaskCreate( vSuicidalTask, ( signed portCHAR * ) "SUICID1", configMINIMAL_STACK_SIZE, NULL, uxPriority, &xCreatedTask ); xTaskCreate( vSuicidalTask, ( signed char * ) "SUICID1", configMINIMAL_STACK_SIZE, NULL, uxPriority, &xCreatedTask );
xTaskCreate( vSuicidalTask, ( signed portCHAR * ) "SUICID2", configMINIMAL_STACK_SIZE, &xCreatedTask, uxPriority, NULL ); xTaskCreate( vSuicidalTask, ( signed char * ) "SUICID2", configMINIMAL_STACK_SIZE, &xCreatedTask, uxPriority, NULL );
++usCreationCount; ++usCreationCount;
} }
@ -208,7 +209,7 @@ unsigned portBASE_TYPE uxPriority;
are not any more than four extra tasks. */ are not any more than four extra tasks. */
portBASE_TYPE xIsCreateTaskStillRunning( void ) portBASE_TYPE xIsCreateTaskStillRunning( void )
{ {
static unsigned portSHORT usLastCreationCount = 0xfff; static unsigned short usLastCreationCount = 0xfff;
portBASE_TYPE xReturn = pdTRUE; portBASE_TYPE xReturn = pdTRUE;
static unsigned portBASE_TYPE uxTasksRunningNow; static unsigned portBASE_TYPE uxTasksRunningNow;

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*
@ -128,7 +129,7 @@ static portTASK_FUNCTION_PROTO( vQueueSendWhenSuspendedTask, pvParameters );
#define priSTACK_SIZE ( configMINIMAL_STACK_SIZE ) #define priSTACK_SIZE ( configMINIMAL_STACK_SIZE )
#define priSLEEP_TIME ( ( portTickType ) 128 / portTICK_RATE_MS ) #define priSLEEP_TIME ( ( portTickType ) 128 / portTICK_RATE_MS )
#define priLOOPS ( 5 ) #define priLOOPS ( 5 )
#define priMAX_COUNT ( ( unsigned portLONG ) 0xff ) #define priMAX_COUNT ( ( unsigned long ) 0xff )
#define priNO_BLOCK ( ( portTickType ) 0 ) #define priNO_BLOCK ( ( portTickType ) 0 )
#define priSUSPENDED_QUEUE_LENGTH ( 1 ) #define priSUSPENDED_QUEUE_LENGTH ( 1 )
@ -140,13 +141,13 @@ static xTaskHandle xContinousIncrementHandle, xLimitedIncrementHandle;
/* The shared counter variable. This is passed in as a parameter to the two /* The shared counter variable. This is passed in as a parameter to the two
counter variables for demonstration purposes. */ counter variables for demonstration purposes. */
static unsigned portLONG ulCounter; static unsigned long ulCounter;
/* Variables used to check that the tasks are still operating without error. /* Variables used to check that the tasks are still operating without error.
Each complete iteration of the controller task increments this variable Each complete iteration of the controller task increments this variable
provided no errors have been found. The variable maintaining the same value provided no errors have been found. The variable maintaining the same value
is therefore indication of an error. */ is therefore indication of an error. */
static volatile unsigned portSHORT usCheckVariable = ( unsigned portSHORT ) 0; static volatile unsigned short usCheckVariable = ( unsigned short ) 0;
static volatile portBASE_TYPE xSuspendedQueueSendError = pdFALSE; static volatile portBASE_TYPE xSuspendedQueueSendError = pdFALSE;
static volatile portBASE_TYPE xSuspendedQueueReceiveError = pdFALSE; static volatile portBASE_TYPE xSuspendedQueueReceiveError = pdFALSE;
@ -160,7 +161,7 @@ xQueueHandle xSuspendedTestQueue;
*/ */
void vStartDynamicPriorityTasks( void ) void vStartDynamicPriorityTasks( void )
{ {
xSuspendedTestQueue = xQueueCreate( priSUSPENDED_QUEUE_LENGTH, sizeof( unsigned portLONG ) ); xSuspendedTestQueue = xQueueCreate( priSUSPENDED_QUEUE_LENGTH, sizeof( unsigned long ) );
/* vQueueAddToRegistry() adds the queue to the queue registry, if one is /* vQueueAddToRegistry() adds the queue to the queue registry, if one is
in use. The queue registry is provided as a means for kernel aware in use. The queue registry is provided as a means for kernel aware
@ -168,13 +169,13 @@ void vStartDynamicPriorityTasks( void )
is not being used. The call to vQueueAddToRegistry() will be removed is not being used. The call to vQueueAddToRegistry() will be removed
by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is
defined to be less than 1. */ defined to be less than 1. */
vQueueAddToRegistry( xSuspendedTestQueue, ( signed portCHAR * ) "Suspended_Test_Queue" ); vQueueAddToRegistry( xSuspendedTestQueue, ( signed char * ) "Suspended_Test_Queue" );
xTaskCreate( vContinuousIncrementTask, ( signed portCHAR * ) "CNT_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY, &xContinousIncrementHandle ); xTaskCreate( vContinuousIncrementTask, ( signed char * ) "CNT_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY, &xContinousIncrementHandle );
xTaskCreate( vLimitedIncrementTask, ( signed portCHAR * ) "LIM_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY + 1, &xLimitedIncrementHandle ); xTaskCreate( vLimitedIncrementTask, ( signed char * ) "LIM_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY + 1, &xLimitedIncrementHandle );
xTaskCreate( vCounterControlTask, ( signed portCHAR * ) "C_CTRL", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); xTaskCreate( vCounterControlTask, ( signed char * ) "C_CTRL", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
xTaskCreate( vQueueSendWhenSuspendedTask, ( signed portCHAR * ) "SUSP_TX", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); xTaskCreate( vQueueSendWhenSuspendedTask, ( signed char * ) "SUSP_TX", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
xTaskCreate( vQueueReceiveWhenSuspendedTask, ( signed portCHAR * ) "SUSP_RX", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); xTaskCreate( vQueueReceiveWhenSuspendedTask, ( signed char * ) "SUSP_RX", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -184,11 +185,11 @@ void vStartDynamicPriorityTasks( void )
*/ */
static portTASK_FUNCTION( vLimitedIncrementTask, pvParameters ) static portTASK_FUNCTION( vLimitedIncrementTask, pvParameters )
{ {
unsigned portLONG *pulCounter; unsigned long *pulCounter;
/* Take a pointer to the shared variable from the parameters passed into /* Take a pointer to the shared variable from the parameters passed into
the task. */ the task. */
pulCounter = ( unsigned portLONG * ) pvParameters; pulCounter = ( unsigned long * ) pvParameters;
/* This will run before the control task, so the first thing it does is /* This will run before the control task, so the first thing it does is
suspend - the control task will resume it when ready. */ suspend - the control task will resume it when ready. */
@ -213,12 +214,12 @@ unsigned portLONG *pulCounter;
*/ */
static portTASK_FUNCTION( vContinuousIncrementTask, pvParameters ) static portTASK_FUNCTION( vContinuousIncrementTask, pvParameters )
{ {
unsigned portLONG *pulCounter; unsigned long *pulCounter;
unsigned portBASE_TYPE uxOurPriority; unsigned portBASE_TYPE uxOurPriority;
/* Take a pointer to the shared variable from the parameters passed into /* Take a pointer to the shared variable from the parameters passed into
the task. */ the task. */
pulCounter = ( unsigned portLONG * ) pvParameters; pulCounter = ( unsigned long * ) pvParameters;
/* Query our priority so we can raise it when exclusive access to the /* Query our priority so we can raise it when exclusive access to the
shared variable is required. */ shared variable is required. */
@ -240,9 +241,9 @@ unsigned portBASE_TYPE uxOurPriority;
*/ */
static portTASK_FUNCTION( vCounterControlTask, pvParameters ) static portTASK_FUNCTION( vCounterControlTask, pvParameters )
{ {
unsigned portLONG ulLastCounter; unsigned long ulLastCounter;
portSHORT sLoops; short sLoops;
portSHORT sError = pdFALSE; short sError = pdFALSE;
/* Just to stop warning messages. */ /* Just to stop warning messages. */
( void ) pvParameters; ( void ) pvParameters;
@ -250,7 +251,7 @@ portSHORT sError = pdFALSE;
for( ;; ) for( ;; )
{ {
/* Start with the counter at zero. */ /* Start with the counter at zero. */
ulCounter = ( unsigned portLONG ) 0; ulCounter = ( unsigned long ) 0;
/* First section : */ /* First section : */
@ -288,7 +289,7 @@ portSHORT sError = pdFALSE;
vTaskSuspend( xContinousIncrementHandle ); vTaskSuspend( xContinousIncrementHandle );
/* Reset the variable. */ /* Reset the variable. */
ulCounter = ( unsigned portLONG ) 0; ulCounter = ( unsigned long ) 0;
/* Resume the limited count task which has a higher priority than us. /* Resume the limited count task which has a higher priority than us.
We should therefore not return from this call until the limited count We should therefore not return from this call until the limited count
@ -317,7 +318,7 @@ portSHORT sError = pdFALSE;
static portTASK_FUNCTION( vQueueSendWhenSuspendedTask, pvParameters ) static portTASK_FUNCTION( vQueueSendWhenSuspendedTask, pvParameters )
{ {
static unsigned portLONG ulValueToSend = ( unsigned portLONG ) 0; static unsigned long ulValueToSend = ( unsigned long ) 0;
/* Just to stop warning messages. */ /* Just to stop warning messages. */
( void ) pvParameters; ( void ) pvParameters;
@ -343,7 +344,7 @@ static unsigned portLONG ulValueToSend = ( unsigned portLONG ) 0;
static portTASK_FUNCTION( vQueueReceiveWhenSuspendedTask, pvParameters ) static portTASK_FUNCTION( vQueueReceiveWhenSuspendedTask, pvParameters )
{ {
static unsigned portLONG ulExpectedValue = ( unsigned portLONG ) 0, ulReceivedValue; static unsigned long ulExpectedValue = ( unsigned long ) 0, ulReceivedValue;
portBASE_TYPE xGotValue; portBASE_TYPE xGotValue;
/* Just to stop warning messages. */ /* Just to stop warning messages. */
@ -394,7 +395,7 @@ portBASE_TYPE xAreDynamicPriorityTasksStillRunning( void )
{ {
/* Keep a history of the check variables so we know if it has been incremented /* Keep a history of the check variables so we know if it has been incremented
since the last call. */ since the last call. */
static unsigned portSHORT usLastTaskCheck = ( unsigned portSHORT ) 0; static unsigned short usLastTaskCheck = ( unsigned short ) 0;
portBASE_TYPE xReturn = pdTRUE; portBASE_TYPE xReturn = pdTRUE;
/* Check the tasks are still running by ensuring the check variable /* Check the tasks are still running by ensuring the check variable

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/** /**
@ -90,7 +91,7 @@ signed portBASE_TYPE xLEDTask;
for( xLEDTask = 0; xLEDTask < ledNUMBER_OF_LEDS; ++xLEDTask ) for( xLEDTask = 0; xLEDTask < ledNUMBER_OF_LEDS; ++xLEDTask )
{ {
/* Spawn the task. */ /* Spawn the task. */
xTaskCreate( vLEDFlashTask, ( signed portCHAR * ) "LEDx", ledSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL ); xTaskCreate( vLEDFlashTask, ( signed char * ) "LEDx", ledSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL );
} }
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*
@ -81,29 +82,29 @@ static portTASK_FUNCTION_PROTO( vCompetingMathTask4, pvParameters );
/* These variables are used to check that all the tasks are still running. If a /* These variables are used to check that all the tasks are still running. If a
task gets a calculation wrong it will task gets a calculation wrong it will
stop incrementing its check variable. */ 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 };
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
void vStartMathTasks( unsigned portBASE_TYPE uxPriority ) void vStartMathTasks( unsigned portBASE_TYPE uxPriority )
{ {
xTaskCreate( vCompetingMathTask1, ( signed portCHAR * ) "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, NULL ); xTaskCreate( vCompetingMathTask1, ( signed char * ) "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, NULL );
xTaskCreate( vCompetingMathTask2, ( signed portCHAR * ) "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, NULL ); xTaskCreate( vCompetingMathTask2, ( signed char * ) "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, NULL );
xTaskCreate( vCompetingMathTask3, ( signed portCHAR * ) "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, NULL ); xTaskCreate( vCompetingMathTask3, ( signed char * ) "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, NULL );
xTaskCreate( vCompetingMathTask4, ( signed portCHAR * ) "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, NULL ); xTaskCreate( vCompetingMathTask4, ( signed char * ) "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, NULL );
xTaskCreate( vCompetingMathTask1, ( signed portCHAR * ) "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, NULL ); xTaskCreate( vCompetingMathTask1, ( signed char * ) "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, NULL );
xTaskCreate( vCompetingMathTask2, ( signed portCHAR * ) "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, NULL ); xTaskCreate( vCompetingMathTask2, ( signed char * ) "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, NULL );
xTaskCreate( vCompetingMathTask3, ( signed portCHAR * ) "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, NULL ); xTaskCreate( vCompetingMathTask3, ( signed char * ) "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, NULL );
xTaskCreate( vCompetingMathTask4, ( signed portCHAR * ) "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, NULL ); xTaskCreate( vCompetingMathTask4, ( signed char * ) "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, NULL );
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static portTASK_FUNCTION( vCompetingMathTask1, pvParameters ) static portTASK_FUNCTION( vCompetingMathTask1, pvParameters )
{ {
volatile portDOUBLE d1, d2, d3, d4; volatile portDOUBLE d1, d2, d3, d4;
volatile unsigned portSHORT *pusTaskCheckVariable; volatile unsigned short *pusTaskCheckVariable;
volatile portDOUBLE dAnswer; volatile portDOUBLE dAnswer;
portSHORT sError = pdFALSE; short sError = pdFALSE;
d1 = 123.4567; d1 = 123.4567;
d2 = 2345.6789; d2 = 2345.6789;
@ -113,7 +114,7 @@ portSHORT sError = pdFALSE;
/* The variable this task increments to show it is still running is passed in /* The variable this task increments to show it is still running is passed in
as the parameter. */ as the parameter. */
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters; pusTaskCheckVariable = ( unsigned short * ) pvParameters;
/* Keep performing a calculation and checking the result against a constant. */ /* Keep performing a calculation and checking the result against a constant. */
for(;;) for(;;)
@ -153,9 +154,9 @@ portSHORT sError = pdFALSE;
static portTASK_FUNCTION( vCompetingMathTask2, pvParameters ) static portTASK_FUNCTION( vCompetingMathTask2, pvParameters )
{ {
volatile portDOUBLE d1, d2, d3, d4; volatile portDOUBLE d1, d2, d3, d4;
volatile unsigned portSHORT *pusTaskCheckVariable; volatile unsigned short *pusTaskCheckVariable;
volatile portDOUBLE dAnswer; volatile portDOUBLE dAnswer;
portSHORT sError = pdFALSE; short sError = pdFALSE;
d1 = -389.38; d1 = -389.38;
d2 = 32498.2; d2 = 32498.2;
@ -166,7 +167,7 @@ portSHORT sError = pdFALSE;
/* The variable this task increments to show it is still running is passed in /* The variable this task increments to show it is still running is passed in
as the parameter. */ as the parameter. */
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters; pusTaskCheckVariable = ( unsigned short * ) pvParameters;
/* Keep performing a calculation and checking the result against a constant. */ /* Keep performing a calculation and checking the result against a constant. */
for( ;; ) for( ;; )
@ -206,14 +207,14 @@ portSHORT sError = pdFALSE;
static portTASK_FUNCTION( vCompetingMathTask3, pvParameters ) static portTASK_FUNCTION( vCompetingMathTask3, pvParameters )
{ {
volatile portDOUBLE *pdArray, dTotal1, dTotal2, dDifference; volatile portDOUBLE *pdArray, dTotal1, dTotal2, dDifference;
volatile unsigned portSHORT *pusTaskCheckVariable; volatile unsigned short *pusTaskCheckVariable;
const size_t xArraySize = 10; const size_t xArraySize = 10;
size_t xPosition; size_t xPosition;
portSHORT sError = pdFALSE; short sError = pdFALSE;
/* The variable this task increments to show it is still running is passed in /* The variable this task increments to show it is still running is passed in
as the parameter. */ as the parameter. */
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters; pusTaskCheckVariable = ( unsigned short * ) pvParameters;
pdArray = ( portDOUBLE * ) pvPortMalloc( xArraySize * sizeof( portDOUBLE ) ); pdArray = ( portDOUBLE * ) pvPortMalloc( xArraySize * sizeof( portDOUBLE ) );
@ -263,14 +264,14 @@ portSHORT sError = pdFALSE;
static portTASK_FUNCTION( vCompetingMathTask4, pvParameters ) static portTASK_FUNCTION( vCompetingMathTask4, pvParameters )
{ {
volatile portDOUBLE *pdArray, dTotal1, dTotal2, dDifference; volatile portDOUBLE *pdArray, dTotal1, dTotal2, dDifference;
volatile unsigned portSHORT *pusTaskCheckVariable; volatile unsigned short *pusTaskCheckVariable;
const size_t xArraySize = 10; const size_t xArraySize = 10;
size_t xPosition; size_t xPosition;
portSHORT sError = pdFALSE; short sError = pdFALSE;
/* The variable this task increments to show it is still running is passed in /* The variable this task increments to show it is still running is passed in
as the parameter. */ as the parameter. */
pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters; pusTaskCheckVariable = ( unsigned short * ) pvParameters;
pdArray = ( portDOUBLE * ) pvPortMalloc( xArraySize * sizeof( portDOUBLE ) ); pdArray = ( portDOUBLE * ) pvPortMalloc( xArraySize * sizeof( portDOUBLE ) );
@ -322,7 +323,7 @@ portBASE_TYPE xAreMathsTaskStillRunning( void )
{ {
/* Keep a history of the check variables so we know if they have been incremented /* Keep a history of the check variables so we know if they have been incremented
since the last call. */ 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; portBASE_TYPE xReturn = pdTRUE, xTask;
/* Check the maths tasks are still running by ensuring their check variables /* Check the maths tasks are still running by ensuring their check variables

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*
@ -85,10 +86,10 @@ Changes from V1.2.3
#include "integer.h" #include "integer.h"
/* The constants used in the calculation. */ /* The constants used in the calculation. */
#define intgCONST1 ( ( portLONG ) 123 ) #define intgCONST1 ( ( long ) 123 )
#define intgCONST2 ( ( portLONG ) 234567 ) #define intgCONST2 ( ( long ) 234567 )
#define intgCONST3 ( ( portLONG ) -3 ) #define intgCONST3 ( ( long ) -3 )
#define intgCONST4 ( ( portLONG ) 7 ) #define intgCONST4 ( ( long ) 7 )
#define intgEXPECTED_ANSWER ( ( ( intgCONST1 + intgCONST2 ) * intgCONST3 ) / intgCONST4 ) #define intgEXPECTED_ANSWER ( ( ( intgCONST1 + intgCONST2 ) * intgCONST3 ) / intgCONST4 )
#define intgSTACK_SIZE configMINIMAL_STACK_SIZE #define intgSTACK_SIZE configMINIMAL_STACK_SIZE
@ -111,11 +112,11 @@ static volatile signed portBASE_TYPE xTaskCheck[ intgNUMBER_OF_TASKS ] = { ( sig
void vStartIntegerMathTasks( unsigned portBASE_TYPE uxPriority ) void vStartIntegerMathTasks( unsigned portBASE_TYPE uxPriority )
{ {
portSHORT sTask; short sTask;
for( sTask = 0; sTask < intgNUMBER_OF_TASKS; sTask++ ) for( sTask = 0; sTask < intgNUMBER_OF_TASKS; sTask++ )
{ {
xTaskCreate( vCompeteingIntMathTask, ( signed portCHAR * ) "IntMath", intgSTACK_SIZE, ( void * ) &( xTaskCheck[ sTask ] ), uxPriority, ( xTaskHandle * ) NULL ); xTaskCreate( vCompeteingIntMathTask, ( signed char * ) "IntMath", intgSTACK_SIZE, ( void * ) &( xTaskCheck[ sTask ] ), uxPriority, ( xTaskHandle * ) NULL );
} }
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -124,8 +125,8 @@ static portTASK_FUNCTION( vCompeteingIntMathTask, pvParameters )
{ {
/* These variables are all effectively set to constants so they are volatile to /* These variables are all effectively set to constants so they are volatile to
ensure the compiler does not just get rid of them. */ ensure the compiler does not just get rid of them. */
volatile portLONG lValue; volatile long lValue;
portSHORT sError = pdFALSE; short sError = pdFALSE;
volatile signed portBASE_TYPE *pxTaskHasExecuted; volatile signed portBASE_TYPE *pxTaskHasExecuted;
/* Set a pointer to the variable we are going to set to true each /* Set a pointer to the variable we are going to set to true each
@ -184,7 +185,7 @@ volatile signed portBASE_TYPE *pxTaskHasExecuted;
portBASE_TYPE xAreIntegerMathsTaskStillRunning( void ) portBASE_TYPE xAreIntegerMathsTaskStillRunning( void )
{ {
portBASE_TYPE xReturn = pdTRUE; portBASE_TYPE xReturn = pdTRUE;
portSHORT sTask; short sTask;
/* Check the maths tasks are still running by ensuring their check variables /* Check the maths tasks are still running by ensuring their check variables
are still being set to true. */ are still being set to true. */

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
/* /*
@ -80,8 +81,8 @@
#include "semtest.h" #include "semtest.h"
/* The value to which the shared variables are counted. */ /* The value to which the shared variables are counted. */
#define semtstBLOCKING_EXPECTED_VALUE ( ( unsigned portLONG ) 0xfff ) #define semtstBLOCKING_EXPECTED_VALUE ( ( unsigned long ) 0xfff )
#define semtstNON_BLOCKING_EXPECTED_VALUE ( ( unsigned portLONG ) 0xff ) #define semtstNON_BLOCKING_EXPECTED_VALUE ( ( unsigned long ) 0xff )
#define semtstSTACK_SIZE configMINIMAL_STACK_SIZE #define semtstSTACK_SIZE configMINIMAL_STACK_SIZE
@ -96,13 +97,13 @@ static portTASK_FUNCTION_PROTO( prvSemaphoreTest, pvParameters );
typedef struct SEMAPHORE_PARAMETERS typedef struct SEMAPHORE_PARAMETERS
{ {
xSemaphoreHandle xSemaphore; xSemaphoreHandle xSemaphore;
volatile unsigned portLONG *pulSharedVariable; volatile unsigned long *pulSharedVariable;
portTickType xBlockTime; portTickType xBlockTime;
} xSemaphoreParameters; } xSemaphoreParameters;
/* Variables used to check that all the tasks are still running without errors. */ /* Variables used to check that all the tasks are still running without errors. */
static volatile portSHORT sCheckVariables[ semtstNUM_TASKS ] = { 0 }; static volatile short sCheckVariables[ semtstNUM_TASKS ] = { 0 };
static volatile portSHORT sNextCheckVariable = 0; static volatile short sNextCheckVariable = 0;
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -122,7 +123,7 @@ const portTickType xBlockTime = ( portTickType ) 100;
if( pxFirstSemaphoreParameters->xSemaphore != NULL ) if( pxFirstSemaphoreParameters->xSemaphore != NULL )
{ {
/* Create the variable which is to be shared by the first two tasks. */ /* Create the variable which is to be shared by the first two tasks. */
pxFirstSemaphoreParameters->pulSharedVariable = ( unsigned portLONG * ) pvPortMalloc( sizeof( unsigned portLONG ) ); pxFirstSemaphoreParameters->pulSharedVariable = ( unsigned long * ) pvPortMalloc( sizeof( unsigned long ) );
/* Initialise the share variable to the value the tasks expect. */ /* Initialise the share variable to the value the tasks expect. */
*( pxFirstSemaphoreParameters->pulSharedVariable ) = semtstNON_BLOCKING_EXPECTED_VALUE; *( pxFirstSemaphoreParameters->pulSharedVariable ) = semtstNON_BLOCKING_EXPECTED_VALUE;
@ -131,8 +132,8 @@ const portTickType xBlockTime = ( portTickType ) 100;
pxFirstSemaphoreParameters->xBlockTime = ( portTickType ) 0; pxFirstSemaphoreParameters->xBlockTime = ( portTickType ) 0;
/* Spawn the first two tasks. As they poll they operate at the idle priority. */ /* Spawn the first two tasks. As they poll they operate at the idle priority. */
xTaskCreate( prvSemaphoreTest, ( signed portCHAR * ) "PolSEM1", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL ); xTaskCreate( prvSemaphoreTest, ( signed char * ) "PolSEM1", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL );
xTaskCreate( prvSemaphoreTest, ( signed portCHAR * ) "PolSEM2", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL ); xTaskCreate( prvSemaphoreTest, ( signed char * ) "PolSEM2", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL );
} }
} }
@ -145,12 +146,12 @@ const portTickType xBlockTime = ( portTickType ) 100;
if( pxSecondSemaphoreParameters->xSemaphore != NULL ) if( pxSecondSemaphoreParameters->xSemaphore != NULL )
{ {
pxSecondSemaphoreParameters->pulSharedVariable = ( unsigned portLONG * ) pvPortMalloc( sizeof( unsigned portLONG ) ); pxSecondSemaphoreParameters->pulSharedVariable = ( unsigned long * ) pvPortMalloc( sizeof( unsigned long ) );
*( pxSecondSemaphoreParameters->pulSharedVariable ) = semtstBLOCKING_EXPECTED_VALUE; *( pxSecondSemaphoreParameters->pulSharedVariable ) = semtstBLOCKING_EXPECTED_VALUE;
pxSecondSemaphoreParameters->xBlockTime = xBlockTime / portTICK_RATE_MS; pxSecondSemaphoreParameters->xBlockTime = xBlockTime / portTICK_RATE_MS;
xTaskCreate( prvSemaphoreTest, ( signed portCHAR * ) "BlkSEM1", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( xTaskHandle * ) NULL ); xTaskCreate( prvSemaphoreTest, ( signed char * ) "BlkSEM1", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( xTaskHandle * ) NULL );
xTaskCreate( prvSemaphoreTest, ( signed portCHAR * ) "BlkSEM2", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( xTaskHandle * ) NULL ); xTaskCreate( prvSemaphoreTest, ( signed char * ) "BlkSEM2", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( xTaskHandle * ) NULL );
} }
} }
@ -160,17 +161,17 @@ const portTickType xBlockTime = ( portTickType ) 100;
is not being used. The call to vQueueAddToRegistry() will be removed is not being used. The call to vQueueAddToRegistry() will be removed
by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is
defined to be less than 1. */ defined to be less than 1. */
vQueueAddToRegistry( ( xQueueHandle ) pxFirstSemaphoreParameters->xSemaphore, ( signed portCHAR * ) "Counting_Sem_1" ); vQueueAddToRegistry( ( xQueueHandle ) pxFirstSemaphoreParameters->xSemaphore, ( signed char * ) "Counting_Sem_1" );
vQueueAddToRegistry( ( xQueueHandle ) pxSecondSemaphoreParameters->xSemaphore, ( signed portCHAR * ) "Counting_Sem_2" ); vQueueAddToRegistry( ( xQueueHandle ) pxSecondSemaphoreParameters->xSemaphore, ( signed char * ) "Counting_Sem_2" );
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static portTASK_FUNCTION( prvSemaphoreTest, pvParameters ) static portTASK_FUNCTION( prvSemaphoreTest, pvParameters )
{ {
xSemaphoreParameters *pxParameters; xSemaphoreParameters *pxParameters;
volatile unsigned portLONG *pulSharedVariable, ulExpectedValue; volatile unsigned long *pulSharedVariable, ulExpectedValue;
unsigned portLONG ulCounter; unsigned long ulCounter;
portSHORT sError = pdFALSE, sCheckVariableToUse; short sError = pdFALSE, sCheckVariableToUse;
/* See which check variable to use. sNextCheckVariable is not semaphore /* See which check variable to use. sNextCheckVariable is not semaphore
protected! */ protected! */
@ -211,7 +212,7 @@ portSHORT sError = pdFALSE, sCheckVariableToUse;
/* Clear the variable, then count it back up to the expected value /* Clear the variable, then count it back up to the expected value
before releasing the semaphore. Would expect a context switch or before releasing the semaphore. Would expect a context switch or
two during this time. */ two during this time. */
for( ulCounter = ( unsigned portLONG ) 0; ulCounter <= ulExpectedValue; ulCounter++ ) for( ulCounter = ( unsigned long ) 0; ulCounter <= ulExpectedValue; ulCounter++ )
{ {
*pulSharedVariable = ulCounter; *pulSharedVariable = ulCounter;
if( *pulSharedVariable != ulCounter ) if( *pulSharedVariable != ulCounter )
@ -259,7 +260,7 @@ portSHORT sError = pdFALSE, sCheckVariableToUse;
/* This is called to check that all the created tasks are still running. */ /* This is called to check that all the created tasks are still running. */
portBASE_TYPE xAreSemaphoreTasksStillRunning( void ) portBASE_TYPE xAreSemaphoreTasksStillRunning( void )
{ {
static portSHORT sLastCheckVariables[ semtstNUM_TASKS ] = { 0 }; static short sLastCheckVariables[ semtstNUM_TASKS ] = { 0 };
portBASE_TYPE xTask, xReturn = pdTRUE; portBASE_TYPE xTask, xReturn = pdTRUE;
for( xTask = 0; xTask < semtstNUM_TASKS; xTask++ ) for( xTask = 0; xTask < semtstNUM_TASKS; xTask++ )

View file

@ -74,14 +74,14 @@ infinite. */
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
/* The DMA descriptors. This is a char array to allow us to align it correctly. */ /* The DMA descriptors. This is a char array to allow us to align it correctly. */
static unsigned portCHAR xFECTxDescriptors_unaligned[ ( configNUM_FEC_TX_BUFFERS * sizeof( FECBD ) ) + 16 ]; static unsigned char xFECTxDescriptors_unaligned[ ( configNUM_FEC_TX_BUFFERS * sizeof( FECBD ) ) + 16 ];
static unsigned portCHAR xFECRxDescriptors_unaligned[ ( configNUM_FEC_RX_BUFFERS * sizeof( FECBD ) ) + 16 ]; static unsigned char xFECRxDescriptors_unaligned[ ( configNUM_FEC_RX_BUFFERS * sizeof( FECBD ) ) + 16 ];
static FECBD *xFECTxDescriptors; static FECBD *xFECTxDescriptors;
static FECBD *xFECRxDescriptors; static FECBD *xFECRxDescriptors;
/* The DMA buffers. These are char arrays to allow them to be alligned correctly. */ /* The DMA buffers. These are char arrays to allow them to be alligned correctly. */
static unsigned portCHAR ucFECTxBuffers[ ( configNUM_FEC_TX_BUFFERS * configFEC_BUFFER_SIZE ) + 16 ]; static unsigned char ucFECTxBuffers[ ( configNUM_FEC_TX_BUFFERS * configFEC_BUFFER_SIZE ) + 16 ];
static unsigned portCHAR ucFECRxBuffers[ ( configNUM_FEC_RX_BUFFERS * configFEC_BUFFER_SIZE ) + 16 ]; static unsigned char ucFECRxBuffers[ ( configNUM_FEC_RX_BUFFERS * configFEC_BUFFER_SIZE ) + 16 ];
static unsigned portBASE_TYPE uxNextRxBuffer = 0, uxNextTxBuffer = 0; static unsigned portBASE_TYPE uxNextRxBuffer = 0, uxNextTxBuffer = 0;
/* Semaphore used by the FEC interrupt handler to wake the handler task. */ /* Semaphore used by the FEC interrupt handler to wake the handler task. */
@ -370,8 +370,8 @@ int fec_vbase;
*/ */
static void low_level_init( struct netif *netif ) static void low_level_init( struct netif *netif )
{ {
unsigned portSHORT usData; unsigned short usData;
const unsigned portCHAR ucMACAddress[6] = const unsigned char ucMACAddress[6] =
{ {
configMAC_0, configMAC_1,configMAC_2,configMAC_3,configMAC_4,configMAC_5 configMAC_0, configMAC_1,configMAC_2,configMAC_3,configMAC_4,configMAC_5
}; };
@ -478,10 +478,10 @@ const unsigned portCHAR ucMACAddress[6] =
MCF_FEC_EMRBR = (uint16)configFEC_BUFFER_SIZE; MCF_FEC_EMRBR = (uint16)configFEC_BUFFER_SIZE;
/* Point to the start of the circular Rx buffer descriptor queue */ /* Point to the start of the circular Rx buffer descriptor queue */
MCF_FEC_ERDSR = ( volatile unsigned portLONG ) &( xFECRxDescriptors[ 0 ] ); MCF_FEC_ERDSR = ( volatile unsigned long ) &( xFECRxDescriptors[ 0 ] );
/* Point to the start of the circular Tx buffer descriptor queue */ /* Point to the start of the circular Tx buffer descriptor queue */
MCF_FEC_ETSDR = ( volatile unsigned portLONG ) &( xFECTxDescriptors[ 0 ] ); MCF_FEC_ETSDR = ( volatile unsigned long ) &( xFECTxDescriptors[ 0 ] );
/* Mask all FEC interrupts */ /* Mask all FEC interrupts */
MCF_FEC_EIMR = MCF_FEC_EIMR_MASK_ALL; MCF_FEC_EIMR = MCF_FEC_EIMR_MASK_ALL;
@ -501,7 +501,7 @@ const unsigned portCHAR ucMACAddress[6] =
#endif #endif
/* Create the task that handles the EMAC. */ /* Create the task that handles the EMAC. */
xTaskCreate( ethernetif_input, ( signed portCHAR * ) "ETH_INT", configETHERNET_INPUT_TASK_STACK_SIZE, (void *)netif, configETHERNET_INPUT_TASK_PRIORITY, &xEthIntTask ); xTaskCreate( ethernetif_input, ( signed char * ) "ETH_INT", configETHERNET_INPUT_TASK_STACK_SIZE, (void *)netif, configETHERNET_INPUT_TASK_PRIORITY, &xEthIntTask );
fec_irq_enable(); fec_irq_enable();
MCF_FEC_ECR = MCF_FEC_ECR_ETHER_EN; MCF_FEC_ECR = MCF_FEC_ECR_ETHER_EN;
@ -527,7 +527,7 @@ static err_t low_level_output(struct netif *netif, struct pbuf *p)
{ {
struct pbuf *q; struct pbuf *q;
u32_t l = 0; u32_t l = 0;
unsigned portCHAR *pcTxData = NULL; unsigned char *pcTxData = NULL;
portBASE_TYPE i; portBASE_TYPE i;
( void ) netif; ( void ) netif;
@ -806,10 +806,10 @@ err_t ethernetif_init(struct netif *netif)
static void prvInitialiseFECBuffers( void ) static void prvInitialiseFECBuffers( void )
{ {
unsigned portBASE_TYPE ux; unsigned portBASE_TYPE ux;
unsigned portCHAR *pcBufPointer; unsigned char *pcBufPointer;
pcBufPointer = &( xFECTxDescriptors_unaligned[ 0 ] ); pcBufPointer = &( xFECTxDescriptors_unaligned[ 0 ] );
while( ( ( unsigned portLONG ) pcBufPointer & 0x0fUL ) != 0 ) while( ( ( unsigned long ) pcBufPointer & 0x0fUL ) != 0 )
{ {
pcBufPointer++; pcBufPointer++;
} }
@ -817,7 +817,7 @@ unsigned portCHAR *pcBufPointer;
xFECTxDescriptors = ( FECBD * ) pcBufPointer; xFECTxDescriptors = ( FECBD * ) pcBufPointer;
pcBufPointer = &( xFECRxDescriptors_unaligned[ 0 ] ); pcBufPointer = &( xFECRxDescriptors_unaligned[ 0 ] );
while( ( ( unsigned portLONG ) pcBufPointer & 0x0fUL ) != 0 ) while( ( ( unsigned long ) pcBufPointer & 0x0fUL ) != 0 )
{ {
pcBufPointer++; pcBufPointer++;
} }
@ -827,7 +827,7 @@ unsigned portCHAR *pcBufPointer;
/* Setup the buffers and descriptors. */ /* Setup the buffers and descriptors. */
pcBufPointer = &( ucFECTxBuffers[ 0 ] ); pcBufPointer = &( ucFECTxBuffers[ 0 ] );
while( ( ( unsigned portLONG ) pcBufPointer & 0x0fUL ) != 0 ) while( ( ( unsigned long ) pcBufPointer & 0x0fUL ) != 0 )
{ {
pcBufPointer++; pcBufPointer++;
} }
@ -841,7 +841,7 @@ unsigned portCHAR *pcBufPointer;
} }
pcBufPointer = &( ucFECRxBuffers[ 0 ] ); pcBufPointer = &( ucFECRxBuffers[ 0 ] );
while( ( ( unsigned portLONG ) pcBufPointer & 0x0fUL ) != 0 ) while( ( ( unsigned long ) pcBufPointer & 0x0fUL ) != 0 )
{ {
pcBufPointer++; pcBufPointer++;
} }
@ -865,7 +865,7 @@ unsigned portCHAR *pcBufPointer;
__declspec(interrupt:0) void vFECISRHandler( void ) __declspec(interrupt:0) void vFECISRHandler( void )
{ {
unsigned portLONG ulEvent; unsigned long ulEvent;
portBASE_TYPE xHighPriorityTaskWoken = pdFALSE; portBASE_TYPE xHighPriorityTaskWoken = pdFALSE;
ulEvent = MCF_FEC_EIR & MCF_FEC_EIMR; ulEvent = MCF_FEC_EIR & MCF_FEC_EIMR;

View file

@ -58,7 +58,7 @@
#define MS_TO_TICKS( ms ) \ #define MS_TO_TICKS( ms ) \
( portTickType )( ( portTickType ) ( ms ) / portTICK_RATE_MS ) ( portTickType )( ( portTickType ) ( ms ) / portTICK_RATE_MS )
#define TICKS_TO_MS( ticks ) \ #define TICKS_TO_MS( ticks ) \
( unsigned portLONG )( ( portTickType ) ( ticks ) * portTICK_RATE_MS ) ( unsigned long )( ( portTickType ) ( ticks ) * portTICK_RATE_MS )
#define THREAD_STACK_SIZE ( 256 /*FSL:1024*/ ) #define THREAD_STACK_SIZE ( 256 /*FSL:1024*/ )
#define THREAD_NAME "lwIP" #define THREAD_NAME "lwIP"

View file

@ -46,6 +46,6 @@ typedef xTaskHandle sys_thread_t;
/* Message queue constants. */ /* Message queue constants. */
#define archMESG_QUEUE_LENGTH ( 6 ) #define archMESG_QUEUE_LENGTH ( 6 )
#define archPOST_BLOCK_TIME_MS ( ( unsigned portLONG ) 10000 ) #define archPOST_BLOCK_TIME_MS ( ( unsigned long ) 10000 )
#endif #endif

View file

@ -46,7 +46,7 @@ typedef xTaskHandle sys_thread_t;
/* Message queue constants. */ /* Message queue constants. */
#define archMESG_QUEUE_LENGTH ( 6 ) #define archMESG_QUEUE_LENGTH ( 6 )
#define archPOST_BLOCK_TIME_MS ( ( unsigned portLONG ) 10000 ) #define archPOST_BLOCK_TIME_MS ( ( unsigned long ) 10000 )
#endif /* __SYS_RTXC_H__ */ #endif /* __SYS_RTXC_H__ */

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef ALT_BLOCK_Q_H #ifndef ALT_BLOCK_Q_H

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef FAST_BLOCK_TIME_TEST_H #ifndef FAST_BLOCK_TIME_TEST_H

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef ALT_POLLED_Q_H #ifndef ALT_POLLED_Q_H

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef FAST_GEN_Q_TEST_H #ifndef FAST_GEN_Q_TEST_H

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef BLOCK_Q_H #ifndef BLOCK_Q_H

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef GEN_Q_TEST_H #ifndef GEN_Q_TEST_H

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef QUEUE_ACCESS_TEST #ifndef QUEUE_ACCESS_TEST

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef POLLED_Q_H #ifndef POLLED_Q_H

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef Q_PEEK_TEST_H #ifndef Q_PEEK_TEST_H

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef BLOCK_TIME_TEST_H #ifndef BLOCK_TIME_TEST_H

View file

@ -1,54 +1,55 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef COMTEST_H #ifndef COMTEST_H
#define COMTEST_H #define COMTEST_H
void vAltStartComTestTasks( unsigned portBASE_TYPE uxPriority, unsigned portLONG ulBaudRate, unsigned portBASE_TYPE uxLED ); void vAltStartComTestTasks( unsigned portBASE_TYPE uxPriority, unsigned long ulBaudRate, unsigned portBASE_TYPE uxLED );
void vStartComTestTasks( unsigned portBASE_TYPE uxPriority, eCOMPort ePort, eBaud eBaudRate ); void vStartComTestTasks( unsigned portBASE_TYPE uxPriority, eCOMPort ePort, eBaud eBaudRate );
portBASE_TYPE xAreComTestTasksStillRunning( void ); portBASE_TYPE xAreComTestTasksStillRunning( void );
void vComTestUnsuspendTask( void ); void vComTestUnsuspendTask( void );

View file

@ -1,54 +1,55 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef COMTEST_H #ifndef COMTEST_H
#define COMTEST_H #define COMTEST_H
void vAltStartComTestTasks( unsigned portBASE_TYPE uxPriority, unsigned portLONG ulBaudRate, unsigned portBASE_TYPE uxLED ); void vAltStartComTestTasks( unsigned portBASE_TYPE uxPriority, unsigned long ulBaudRate, unsigned portBASE_TYPE uxLED );
portBASE_TYPE xAreComTestTasksStillRunning( void ); portBASE_TYPE xAreComTestTasksStillRunning( void );
#endif #endif

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef COUNT_SEMAPHORE_TEST_H #ifndef COUNT_SEMAPHORE_TEST_H

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef CRFLASH_LED_H #ifndef CRFLASH_LED_H

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef CRHOOK_H #ifndef CRHOOK_H

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef SUICIDE_TASK_H #ifndef SUICIDE_TASK_H

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef DYNAMIC_MANIPULATION_H #ifndef DYNAMIC_MANIPULATION_H

View file

@ -1,56 +1,57 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef FILE_IO_H #ifndef FILE_IO_H
#define FILE_OI_H #define FILE_OI_H
void vDisplayMessage( const portCHAR * const pcMessageToPrint ); void vDisplayMessage( const char * const pcMessageToPrint );
void vWriteMessageToDisk( const portCHAR * const pcMessage ); void vWriteMessageToDisk( const char * const pcMessage );
void vWriteBufferToDisk( const portCHAR * const pcBuffer, unsigned portLONG ulBufferLength ); void vWriteBufferToDisk( const char * const pcBuffer, unsigned long ulBufferLength );
#endif #endif

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef FLASH_LED_H #ifndef FLASH_LED_H

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef FLOP_TASKS_H #ifndef FLOP_TASKS_H

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef INTEGER_TASKS_H #ifndef INTEGER_TASKS_H

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef EVENTS_TEST_H #ifndef EVENTS_TEST_H

View file

@ -1,54 +1,55 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef PARTEST_H #ifndef PARTEST_H
#define PARTEST_H #define PARTEST_H
#define partstDEFAULT_PORT_ADDRESS ( ( unsigned portSHORT ) 0x378 ) #define partstDEFAULT_PORT_ADDRESS ( ( unsigned short ) 0x378 )
void vParTestInitialise( void ); void vParTestInitialise( void );
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue ); void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue );

View file

@ -1,56 +1,57 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef PRINT_H #ifndef PRINT_H
#define PRINT_H #define PRINT_H
void vPrintInitialise( void ); void vPrintInitialise( void );
void vPrintDisplayMessage( const portCHAR * const * pcMessageToSend ); void vPrintDisplayMessage( const char * const * pcMessageToSend );
const portCHAR *pcPrintGetNextMessage( portTickType xPrintRate ); const char *pcPrintGetNextMessage( portTickType xPrintRate );
#endif #endif

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef RECURSIVE_MUTEX_TEST_H #ifndef RECURSIVE_MUTEX_TEST_H

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef SEMAPHORE_TEST_H #ifndef SEMAPHORE_TEST_H

View file

@ -1,48 +1,49 @@
/* /*
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. This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation and modified by the FreeRTOS exception. Free Software Foundation and modified by the FreeRTOS exception.
**NOTE** The exception to the GPL is included to allow you to distribute a **NOTE** The exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide the combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel. source code for proprietary components outside of the FreeRTOS kernel.
Alternative commercial license and support terms are also available upon Alternative commercial license and support terms are also available upon
request. See the licensing section of http://www.FreeRTOS.org for full request. See the licensing section of http://www.FreeRTOS.org for full
license details. license details.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA. Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*************************************************************************** ***************************************************************************
* * * *
* Looking for a quick start? Then check out the FreeRTOS eBook! * * The FreeRTOS eBook and reference manual are available to purchase for a *
* See http://www.FreeRTOS.org/Documentation for details * * small fee. Help yourself get started quickly while also helping the *
* * * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
*************************************************************************** * *
***************************************************************************
1 tab == 4 spaces! 1 tab == 4 spaces!
Please ensure to read the configuration and relevant port sections of the Please ensure to read the configuration and relevant port sections of the
online documentation. online documentation.
http://www.FreeRTOS.org - Documentation, latest information, license and http://www.FreeRTOS.org - Documentation, latest information, license and
contact details. contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems. critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting, http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services. licensing and training services.
*/ */
#ifndef SERIAL_COMMS_H #ifndef SERIAL_COMMS_H
@ -106,11 +107,11 @@ typedef enum
ser115200 ser115200
} eBaud; } eBaud;
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ); xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength );
xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWantedParity, eDataBits eWantedDataBits, eStopBits eWantedStopBits, unsigned portBASE_TYPE uxBufferLength ); xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWantedParity, eDataBits eWantedDataBits, eStopBits eWantedStopBits, unsigned portBASE_TYPE uxBufferLength );
void vSerialPutString( xComPortHandle pxPort, const signed portCHAR * const pcString, unsigned portSHORT usStringLength ); void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength );
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime ); signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime );
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime ); signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime );
portBASE_TYPE xSerialWaitForSemaphore( xComPortHandle xPort ); portBASE_TYPE xSerialWaitForSemaphore( xComPortHandle xPort );
void vSerialClose( xComPortHandle xPort ); void vSerialClose( xComPortHandle xPort );