From 00c742ab093a218228fdd925e6f555167421c32e Mon Sep 17 00:00:00 2001 From: richardbarry Date: Mon, 5 Oct 2009 10:57:40 +0000 Subject: [PATCH] Remove unnecessary use of portLONG, portCHAR and portSHORT. Change version number in headers. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@904 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Demo/Cygnal/FreeRTOSConfig.h | 71 +++---- Demo/Cygnal/Makefile | 67 +++--- Demo/Cygnal/ParTest/ParTest.c | 91 +++++---- Demo/Cygnal/main.c | 115 +++++------ Demo/Cygnal/serial/serial.c | 101 ++++----- Demo/Flshlite/FRConfig.h | 69 ++++--- Demo/Flshlite/FileIO/fileIO.c | 85 ++++---- Demo/Flshlite/FreeRTOSConfig.h | 69 ++++--- Demo/Flshlite/ParTest/ParTest.c | 89 ++++---- Demo/Flshlite/main.c | 109 +++++----- Demo/Flshlite/serial/serial.c | 155 +++++++------- Demo/H8S/RTOSDemo/FreeRTOSConfig.h | 71 +++---- Demo/H8S/RTOSDemo/ParTest/ParTest.c | 97 ++++----- Demo/H8S/RTOSDemo/main.c | 89 ++++---- Demo/H8S/RTOSDemo/serial/serial.c | 93 ++++----- .../HCS12_CodeWarrior_banked/FreeRTOSConfig.h | 71 +++---- .../ParTest/ParTest.c | 67 +++--- Demo/HCS12_CodeWarrior_banked/main.c | 83 ++++---- Demo/HCS12_CodeWarrior_banked/serial/serial.c | 81 ++++---- Demo/HCS12_CodeWarrior_small/FreeRTOSConfig.h | 71 +++---- .../HCS12_CodeWarrior_small/ParTest/ParTest.c | 67 +++--- Demo/HCS12_CodeWarrior_small/main.c | 83 ++++---- Demo/HCS12_CodeWarrior_small/serial/serial.c | 73 +++---- Demo/HCS12_GCC_banked/FreeRTOSConfig.h | 71 +++---- Demo/HCS12_GCC_banked/ParTest.c | 67 +++--- Demo/HCS12_GCC_banked/main.c | 83 ++++---- Demo/HCS12_GCC_banked/serial.c | 14 +- Demo/HCS12_GCC_banked/startup.c | 67 +++--- Demo/dsPIC_MPLAB/FreeRTOSConfig.h | 69 ++++--- Demo/dsPIC_MPLAB/ParTest/ParTest.c | 67 +++--- Demo/dsPIC_MPLAB/lcd.c | 67 +++--- Demo/dsPIC_MPLAB/lcd.h | 69 ++++--- Demo/dsPIC_MPLAB/main.c | 79 +++---- Demo/dsPIC_MPLAB/serial/serial.c | 85 ++++---- Demo/dsPIC_MPLAB/timertest.c | 67 +++--- Demo/dsPIC_MPLAB/timertest.h | 69 ++++--- Demo/lwIP_AVR32_UC3/FreeRTOSConfig.h | 2 +- Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.c | 77 +++---- Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.h | 67 +++--- Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.c | 193 +++++++++--------- Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.h | 73 +++---- .../EMAC/SAM7_EMAC_ISR.c | 69 ++++--- Demo/lwIP_Demo_Rowley_ARM7/FreeRTOSConfig.h | 71 +++---- Demo/lwIP_Demo_Rowley_ARM7/ParTest/ParTest.c | 69 ++++--- Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.c | 175 ++++++++-------- Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.h | 91 +++++---- Demo/lwIP_Demo_Rowley_ARM7/USB/USBIsr.c | 73 +++---- Demo/lwIP_Demo_Rowley_ARM7/USB/descriptors.h | 77 +++---- Demo/lwIP_Demo_Rowley_ARM7/USB/usb.h | 89 ++++---- .../port/FreeRTOS/AT91SAM7X/sys_arch.c | 6 +- .../lwip-1.1.0/src/netif/ethernetif.c | 2 +- Demo/lwIP_Demo_Rowley_ARM7/main.c | 87 ++++---- Demo/lwIP_Demo_Rowley_ARM7/makefile | 67 +++--- Demo/lwIP_MCF5235_GCC/FreeRTOSConfig.h | 4 +- Demo/lwIP_MCF5235_GCC/demo.c | 36 ++-- .../contrib/port/FreeRTOS/MCF5235/sys_arch.c | 2 +- Demo/lwIP_MCF5235_GCC/system/newlib.c | 12 +- Demo/lwIP_MCF5235_GCC/system/serial.c | 30 +-- Demo/lwIP_MCF5235_GCC/web.c | 10 +- 59 files changed, 2136 insertions(+), 2087 deletions(-) diff --git a/Demo/Cygnal/FreeRTOSConfig.h b/Demo/Cygnal/FreeRTOSConfig.h index 87011a1b0..1e1acaf37 100644 --- a/Demo/Cygnal/FreeRTOSConfig.h +++ b/Demo/Cygnal/FreeRTOSConfig.h @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ #ifndef FREERTOS_CONFIG_H @@ -68,10 +69,10 @@ #define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 -#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 98000000 ) +#define configCPU_CLOCK_HZ ( ( unsigned long ) 98000000 ) #define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 4 ) -#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 200 - ( unsigned portSHORT ) configSTACK_START ) +#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 200 - ( unsigned short ) configSTACK_START ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 6 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 8 ) #define configUSE_TRACE_FACILITY 0 diff --git a/Demo/Cygnal/Makefile b/Demo/Cygnal/Makefile index 8e6f2aa88..ebcdaabde 100644 --- a/Demo/Cygnal/Makefile +++ b/Demo/Cygnal/Makefile @@ -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 -# the terms of the GNU General Public License (version 2) as published by the -# Free Software Foundation and modified by the FreeRTOS exception. -# **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 -# source code for proprietary components outside of the FreeRTOS kernel. -# Alternative commercial license and support terms are also available upon -# request. See the licensing section of http://www.FreeRTOS.org for full -# license details. +# 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 +# Free Software Foundation and modified by the FreeRTOS exception. +# **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 +# source code for proprietary components outside of the FreeRTOS kernel. +# Alternative commercial license and support terms are also available upon +# request. See the licensing section of http://www.FreeRTOS.org for full +# license details. # -# FreeRTOS is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -# more details. +# FreeRTOS is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. # -# 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 -# Temple Place, Suite 330, Boston, MA 02111-1307 USA. +# 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 +# Temple Place, Suite 330, Boston, MA 02111-1307 USA. # # -# *************************************************************************** -# * * -# * Looking for a quick start? Then check out the FreeRTOS eBook! * -# * See http://www.FreeRTOS.org/Documentation for details * -# * * -# *************************************************************************** +# *************************************************************************** +# * * +# * The FreeRTOS eBook and reference manual are available to purchase for a * +# * small fee. Help yourself get started quickly while also helping the * +# * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * +# * * +# *************************************************************************** # -# 1 tab == 4 spaces! +# 1 tab == 4 spaces! # -# Please ensure to read the configuration and relevant port sections of the -# online documentation. +# Please ensure to read the configuration and relevant port sections of the +# online documentation. # -# http://www.FreeRTOS.org - Documentation, latest information, license and -# contact details. +# http://www.FreeRTOS.org - Documentation, latest information, license and +# contact details. # -# http://www.SafeRTOS.com - A version that is certified for use in safety -# critical systems. +# http://www.SafeRTOS.com - A version that is certified for use in safety +# critical systems. # -# http://www.OpenRTOS.com - Commercial support, development, porting, -# licensing and training services. +# http://www.OpenRTOS.com - Commercial support, development, porting, +# licensing and training services. #*/ diff --git a/Demo/Cygnal/ParTest/ParTest.c b/Demo/Cygnal/ParTest/ParTest.c index b543b215c..87c0f1365 100644 --- a/Demo/Cygnal/ParTest/ParTest.c +++ b/Demo/Cygnal/ParTest/ParTest.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ #include @@ -50,18 +51,18 @@ #include "task.h" #include "partest.h" -#define partstPUSH_PULL ( ( unsigned portCHAR ) 0xff ) -#define partstALL_OUTPUTS_OFF ( ( unsigned portCHAR ) 0xff ) +#define partstPUSH_PULL ( ( unsigned char ) 0xff ) +#define partstALL_OUTPUTS_OFF ( ( unsigned char ) 0xff ) /* LED to output is dependent on how the LED's are wired. */ -#define partstOUTPUT_0 ( ( unsigned portCHAR ) 0x02 ) -#define partstOUTPUT_1 ( ( unsigned portCHAR ) 0x08 ) -#define partstOUTPUT_2 ( ( unsigned portCHAR ) 0x20 ) -#define partstOUTPUT_3 ( ( unsigned portCHAR ) 0x01 ) -#define partstOUTPUT_4 ( ( unsigned portCHAR ) 0x04 ) -#define partstOUTPUT_5 ( ( unsigned portCHAR ) 0x10 ) -#define partstOUTPUT_6 ( ( unsigned portCHAR ) 0x40 ) -#define partstOUTPUT_7 ( ( unsigned portCHAR ) 0x80 ) +#define partstOUTPUT_0 ( ( unsigned char ) 0x02 ) +#define partstOUTPUT_1 ( ( unsigned char ) 0x08 ) +#define partstOUTPUT_2 ( ( unsigned char ) 0x20 ) +#define partstOUTPUT_3 ( ( unsigned char ) 0x01 ) +#define partstOUTPUT_4 ( ( unsigned char ) 0x04 ) +#define partstOUTPUT_5 ( ( unsigned char ) 0x10 ) +#define partstOUTPUT_6 ( ( unsigned char ) 0x40 ) +#define partstOUTPUT_7 ( ( unsigned char ) 0x80 ) /*----------------------------------------------------------- * Simple parallel port IO routines. @@ -69,7 +70,7 @@ void vParTestInitialise( void ) { -unsigned portCHAR ucOriginalSFRPage; +unsigned char ucOriginalSFRPage; /* Remember the SFR page before it is changed so it can get set back before the function exits. */ @@ -150,7 +151,7 @@ portBASE_TYPE xError = pdFALSE; void vParTestToggleLED( unsigned portBASE_TYPE uxLED ) { -unsigned portCHAR ucBit; +unsigned char ucBit; portBASE_TYPE xError = pdFALSE; vTaskSuspendAll(); diff --git a/Demo/Cygnal/main.c b/Demo/Cygnal/main.c index 052cddc9e..f02398d3a 100644 --- a/Demo/Cygnal/main.c +++ b/Demo/Cygnal/main.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ /* @@ -103,26 +104,26 @@ #define mainINTEGER_PRIORITY tskIDLE_PRIORITY /* Constants required to disable the watchdog. */ -#define mainDISABLE_BYTE_1 ( ( unsigned portCHAR ) 0xde ) -#define mainDISABLE_BYTE_2 ( ( unsigned portCHAR ) 0xad ) +#define mainDISABLE_BYTE_1 ( ( unsigned char ) 0xde ) +#define mainDISABLE_BYTE_2 ( ( unsigned char ) 0xad ) /* Constants to setup and use the on board LED. */ -#define ucLED_BIT ( ( unsigned portCHAR ) 0x40 ) -#define mainPORT_1_BIT_6 ( ( unsigned portCHAR ) 0x40 ) -#define mainENABLE_CROSS_BAR ( ( unsigned portCHAR ) 0x40 ) +#define ucLED_BIT ( ( unsigned char ) 0x40 ) +#define mainPORT_1_BIT_6 ( ( unsigned char ) 0x40 ) +#define mainENABLE_CROSS_BAR ( ( unsigned char ) 0x40 ) /* Constants to set the clock frequency. */ -#define mainSELECT_INTERNAL_OSC ( ( unsigned portCHAR ) 0x80 ) -#define mainDIVIDE_CLOCK_BY_1 ( ( unsigned portCHAR ) 0x03 ) -#define mainPLL_USES_INTERNAL_OSC ( ( unsigned portCHAR ) 0x04 ) -#define mainFLASH_READ_TIMING ( ( unsigned portCHAR ) 0x30 ) -#define mainPLL_POWER_ON ( ( unsigned portCHAR ) 0x01 ) -#define mainPLL_NO_PREDIVIDE ( ( unsigned portCHAR ) 0x01 ) -#define mainPLL_FILTER ( ( unsigned portCHAR ) 0x01 ) -#define mainPLL_MULTIPLICATION ( ( unsigned portCHAR ) 0x04 ) -#define mainENABLE_PLL ( ( unsigned portCHAR ) 0x02 ) -#define mainPLL_LOCKED ( ( unsigned portCHAR ) 0x10 ) -#define mainSELECT_PLL_AS_SOURCE ( ( unsigned portCHAR ) 0x02 ) +#define mainSELECT_INTERNAL_OSC ( ( unsigned char ) 0x80 ) +#define mainDIVIDE_CLOCK_BY_1 ( ( unsigned char ) 0x03 ) +#define mainPLL_USES_INTERNAL_OSC ( ( unsigned char ) 0x04 ) +#define mainFLASH_READ_TIMING ( ( unsigned char ) 0x30 ) +#define mainPLL_POWER_ON ( ( unsigned char ) 0x01 ) +#define mainPLL_NO_PREDIVIDE ( ( unsigned char ) 0x01 ) +#define mainPLL_FILTER ( ( unsigned char ) 0x01 ) +#define mainPLL_MULTIPLICATION ( ( unsigned char ) 0x04 ) +#define mainENABLE_PLL ( ( unsigned char ) 0x02 ) +#define mainPLL_LOCKED ( ( unsigned char ) 0x10 ) +#define mainSELECT_PLL_AS_SOURCE ( ( unsigned char ) 0x02 ) /* Toggle rate for the on board LED - which is dependent on whether or not an error has been detected. */ @@ -130,7 +131,7 @@ an error has been detected. */ #define mainERROR_FLASH_PERIOD ( ( portTickType ) 250 ) /* Baud rate used by the serial port tasks. */ -#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 115200 ) +#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 115200 ) /* Pass an invalid LED number to the COM test task as we don't want it to flash an LED. There are only 8 LEDs (excluding the on board LED) wired in and these @@ -138,11 +139,11 @@ are all used by the flash tasks. */ #define mainCOM_TEST_LED ( 200 ) /* We want the Cygnal to act as much as possible as a standard 8052. */ -#define mainAUTO_SFR_OFF ( ( unsigned portCHAR ) 0 ) +#define mainAUTO_SFR_OFF ( ( unsigned char ) 0 ) /* Constants required to setup the IO pins for serial comms. */ -#define mainENABLE_COMS ( ( unsigned portCHAR ) 0x04 ) -#define mainCOMS_LINES_TO_PUSH_PULL ( ( unsigned portCHAR ) 0x03 ) +#define mainENABLE_COMS ( ( unsigned char ) 0x04 ) +#define mainCOMS_LINES_TO_PUSH_PULL ( ( unsigned char ) 0x03 ) /* Pointer passed as a parameter to vRegisterCheck() just so it has some know values to check for in the DPH, DPL and B registers. */ @@ -246,7 +247,7 @@ void main( void ) */ static void prvSetupHardware( void ) { -unsigned portCHAR ucOriginalSFRPage; +unsigned char ucOriginalSFRPage; /* Remember the SFR page before it is changed so it can get set back before the function exits. */ @@ -284,9 +285,9 @@ unsigned portCHAR ucOriginalSFRPage; static void prvSetupSystemClock( void ) { -volatile unsigned portSHORT usWait; -const unsigned portSHORT usWaitTime = ( unsigned portSHORT ) 0x2ff; -unsigned portCHAR ucOriginalSFRPage; +volatile unsigned short usWait; +const unsigned short usWaitTime = ( unsigned short ) 0x2ff; +unsigned char ucOriginalSFRPage; /* Remember the SFR page so we can set it back at the end. */ ucOriginalSFRPage = SFRPAGE; diff --git a/Demo/Cygnal/serial/serial.c b/Demo/Cygnal/serial/serial.c index 92283b560..78d19306e 100644 --- a/Demo/Cygnal/serial/serial.c +++ b/Demo/Cygnal/serial/serial.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ @@ -54,14 +55,14 @@ #include "serial.h" /* Constants required to setup the serial control register. */ -#define ser8_BIT_MODE ( ( unsigned portCHAR ) 0x40 ) -#define serRX_ENABLE ( ( unsigned portCHAR ) 0x10 ) +#define ser8_BIT_MODE ( ( unsigned char ) 0x40 ) +#define serRX_ENABLE ( ( unsigned char ) 0x10 ) /* Constants to setup the timer used to generate the baud rate. */ -#define serCLOCK_DIV_48 ( ( unsigned portCHAR ) 0x03 ) -#define serUSE_PRESCALED_CLOCK ( ( unsigned portCHAR ) 0x10 ) -#define ser8BIT_WITH_RELOAD ( ( unsigned portCHAR ) 0x20 ) -#define serSMOD ( ( unsigned portCHAR ) 0x10 ) +#define serCLOCK_DIV_48 ( ( unsigned char ) 0x03 ) +#define serUSE_PRESCALED_CLOCK ( ( unsigned char ) 0x10 ) +#define ser8BIT_WITH_RELOAD ( ( unsigned char ) 0x20 ) +#define serSMOD ( ( unsigned char ) 0x10 ) static xQueueHandle xRxedChars; static xQueueHandle xCharsForTx; @@ -70,11 +71,11 @@ data static unsigned portBASE_TYPE uxTxEmpty; /*-----------------------------------------------------------*/ -xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ) +xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ) { -unsigned portLONG ulReloadValue; +unsigned long ulReloadValue; const portFLOAT fBaudConst = ( portFLOAT ) configCPU_CLOCK_HZ * ( portFLOAT ) 2.0; -unsigned portCHAR ucOriginalSFRPage; +unsigned char ucOriginalSFRPage; portENTER_CRITICAL(); { @@ -84,11 +85,11 @@ unsigned portCHAR ucOriginalSFRPage; uxTxEmpty = pdTRUE; /* Create the queues used by the com test task. */ - xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( portCHAR ) ); - xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( portCHAR ) ); + xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( char ) ); + xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( char ) ); /* Calculate the baud rate to use timer 1. */ - ulReloadValue = ( unsigned portLONG ) ( ( ( portFLOAT ) 256 - ( fBaudConst / ( portFLOAT ) ( 32 * ulWantedBaud ) ) ) + ( portFLOAT ) 0.5 ); + ulReloadValue = ( unsigned long ) ( ( ( portFLOAT ) 256 - ( fBaudConst / ( portFLOAT ) ( 32 * ulWantedBaud ) ) ) + ( portFLOAT ) 0.5 ); /* Set timer one for desired mode of operation. */ TMOD &= 0x08; @@ -96,8 +97,8 @@ unsigned portCHAR ucOriginalSFRPage; SSTA0 |= serSMOD; /* Set the reload and start values for the time. */ - TL1 = ( unsigned portCHAR ) ulReloadValue; - TH1 = ( unsigned portCHAR ) ulReloadValue; + TL1 = ( unsigned char ) ulReloadValue; + TH1 = ( unsigned char ) ulReloadValue; /* Setup the control register for standard n, 8, 1 - variable baud rate. */ SCON = ser8_BIT_MODE | serRX_ENABLE; @@ -121,7 +122,7 @@ unsigned portCHAR ucOriginalSFRPage; void vSerialISR( void ) interrupt 4 { -portCHAR cChar; +char cChar; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; /* 8051 port interrupt routines MUST be placed within a critical section @@ -165,7 +166,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; } /*-----------------------------------------------------------*/ -portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime ) +portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) { /* There is only one port supported. */ ( void ) pxPort; @@ -183,7 +184,7 @@ portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar } /*-----------------------------------------------------------*/ -portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime ) +portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) { portBASE_TYPE xReturn; diff --git a/Demo/Flshlite/FRConfig.h b/Demo/Flshlite/FRConfig.h index 89a8ac157..74759d1a3 100644 --- a/Demo/Flshlite/FRConfig.h +++ b/Demo/Flshlite/FRConfig.h @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ #ifndef FREERTOS_CONFIG_H @@ -60,7 +61,7 @@ #define configUSE_TICK_HOOK 0 #define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 10 ) -#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 128 ) /* This can be made smaller if required. */ +#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 ) /* This can be made smaller if required. */ #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 16 ) #define configUSE_TRACE_FACILITY 0 diff --git a/Demo/Flshlite/FileIO/fileIO.c b/Demo/Flshlite/FileIO/fileIO.c index 837feabaf..39b0e2b83 100644 --- a/Demo/Flshlite/FileIO/fileIO.c +++ b/Demo/Flshlite/FileIO/fileIO.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ #include @@ -56,7 +57,7 @@ /* Demo program include files. */ #include "fileio.h" -void vDisplayMessage( const portCHAR * const pcMessageToPrint ) +void vDisplayMessage( const char * const pcMessageToPrint ) { #ifdef USE_STDIO taskENTER_CRITICAL(); @@ -70,11 +71,11 @@ void vDisplayMessage( const portCHAR * const pcMessageToPrint ) } /*-----------------------------------------------------------*/ -void vWriteMessageToDisk( const portCHAR * const pcMessage ) +void vWriteMessageToDisk( const char * const pcMessage ) { #ifdef USE_STDIO -const portCHAR * const pcFileName = "c:\\RTOSlog.txt"; -const portCHAR * const pcSeparator = "\r\n-----------------------\r\n"; +const char * const pcFileName = "c:\\RTOSlog.txt"; +const char * const pcSeparator = "\r\n-----------------------\r\n"; FILE *pf; taskENTER_CRITICAL(); @@ -82,8 +83,8 @@ FILE *pf; pf = fopen( pcFileName, "a" ); if( pf != NULL ) { - fwrite( pcMessage, strlen( pcMessage ), ( unsigned portSHORT ) 1, pf ); - fwrite( pcSeparator, strlen( pcSeparator ), ( unsigned portSHORT ) 1, pf ); + fwrite( pcMessage, strlen( pcMessage ), ( unsigned short ) 1, pf ); + fwrite( pcSeparator, strlen( pcSeparator ), ( unsigned short ) 1, pf ); fclose( pf ); } } @@ -95,10 +96,10 @@ FILE *pf; } /*-----------------------------------------------------------*/ -void vWriteBufferToDisk( const portCHAR * const pcBuffer, unsigned portLONG ulBufferLength ) +void vWriteBufferToDisk( const char * const pcBuffer, unsigned long ulBufferLength ) { #ifdef USE_STDIO -const portCHAR * const pcFileName = "c:\\trace.bin"; +const char * const pcFileName = "c:\\trace.bin"; FILE *pf; taskENTER_CRITICAL(); @@ -106,7 +107,7 @@ FILE *pf; pf = fopen( pcFileName, "wb" ); if( pf ) { - fwrite( pcBuffer, ( size_t ) ulBufferLength, ( unsigned portSHORT ) 1, pf ); + fwrite( pcBuffer, ( size_t ) ulBufferLength, ( unsigned short ) 1, pf ); fclose( pf ); } } diff --git a/Demo/Flshlite/FreeRTOSConfig.h b/Demo/Flshlite/FreeRTOSConfig.h index a83d4afc4..73ecd9977 100644 --- a/Demo/Flshlite/FreeRTOSConfig.h +++ b/Demo/Flshlite/FreeRTOSConfig.h @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ #ifndef FREERTOS_CONFIG_H @@ -68,7 +69,7 @@ #define configUSE_TICK_HOOK 0 #define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 10 ) -#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 128 ) /* This can be made smaller if required. */ +#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 ) /* This can be made smaller if required. */ #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 16 ) #define configUSE_TRACE_FACILITY 0 diff --git a/Demo/Flshlite/ParTest/ParTest.c b/Demo/Flshlite/ParTest/ParTest.c index 7c35c74e1..0167c33f2 100644 --- a/Demo/Flshlite/ParTest/ParTest.c +++ b/Demo/Flshlite/ParTest/ParTest.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ /* @@ -61,14 +62,14 @@ Changes from V2.0.0 #include "task.h" #include "partest.h" -#define partstALL_OUTPUTS_OFF ( ( unsigned portSHORT) 0x00 ) -#define partstMAX_OUTPUT_LED ( ( unsigned portCHAR ) 7 ) -#define partstPORT_F_ADDR ( ( unsigned portSHORT ) 0x605 ) -#define partstPORT_DIRECTION_REG ( ( unsigned portSHORT ) 0x606 ) -#define partstPORT_F_DIR_BIT ( ( unsigned portSHORT ) 0x20 ) +#define partstALL_OUTPUTS_OFF ( ( unsigned short) 0x00 ) +#define partstMAX_OUTPUT_LED ( ( unsigned char ) 7 ) +#define partstPORT_F_ADDR ( ( unsigned short ) 0x605 ) +#define partstPORT_DIRECTION_REG ( ( unsigned short ) 0x606 ) +#define partstPORT_F_DIR_BIT ( ( unsigned short ) 0x20 ) /*lint -e956 File scope parameters okay here. */ -static volatile unsigned portCHAR ucCurrentOutputValue = partstALL_OUTPUTS_OFF; +static volatile unsigned char ucCurrentOutputValue = partstALL_OUTPUTS_OFF; /*lint +e956 */ /*----------------------------------------------------------- @@ -77,7 +78,7 @@ static volatile unsigned portCHAR ucCurrentOutputValue = partstALL_OUTPUTS_OFF; void vParTestInitialise( void ) { -unsigned portSHORT usInput; +unsigned short usInput; ucCurrentOutputValue = partstALL_OUTPUTS_OFF; @@ -93,7 +94,7 @@ unsigned portSHORT usInput; void vParTestSetLED( unsigned portBASE_TYPE uxLED, portBASE_TYPE xValue ) { -unsigned portCHAR ucBit = ( unsigned portCHAR ) 1; +unsigned char ucBit = ( unsigned char ) 1; if( uxLED <= partstMAX_OUTPUT_LED ) { @@ -104,7 +105,7 @@ unsigned portCHAR ucBit = ( unsigned portCHAR ) 1; { if( xValue == pdTRUE ) { - ucBit ^= ( unsigned portCHAR ) 0xff; + ucBit ^= ( unsigned char ) 0xff; ucCurrentOutputValue &= ucBit; } else @@ -120,11 +121,11 @@ unsigned portCHAR ucBit = ( unsigned portCHAR ) 1; void vParTestToggleLED( unsigned portBASE_TYPE uxLED ) { -unsigned portCHAR ucBit; +unsigned char ucBit; if( uxLED <= partstMAX_OUTPUT_LED ) { - ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED; + ucBit = ( ( unsigned char ) 1 ) << uxLED; vTaskSuspendAll(); { diff --git a/Demo/Flshlite/main.c b/Demo/Flshlite/main.c index a89f3e4af..ba394ec4f 100644 --- a/Demo/Flshlite/main.c +++ b/Demo/Flshlite/main.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ /* @@ -96,7 +97,7 @@ Changes from V1.2.5 Changes from V2.0.0 + Delay periods are now specified using variables and constants of - portTickType rather than unsigned portLONG. + portTickType rather than unsigned long. */ #include @@ -126,12 +127,12 @@ Changes from V2.0.0 #define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 3 ) #define mainSEMAPHORE_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) -#define mainPRINT_STACK_SIZE ( ( unsigned portSHORT ) 256 ) -#define mainDEBUG_LOG_BUFFER_SIZE ( ( unsigned portSHORT ) 20480 ) +#define mainPRINT_STACK_SIZE ( ( unsigned short ) 256 ) +#define mainDEBUG_LOG_BUFFER_SIZE ( ( unsigned short ) 20480 ) /* Constant definitions for accessing the build in LED on the Flashlite 186. */ -#define mainLED_REG_DIR ( ( unsigned portSHORT ) 0xff78 ) -#define mainLED_REG ( ( unsigned portSHORT ) 0xff7a ) +#define mainLED_REG_DIR ( ( unsigned short ) 0xff78 ) +#define mainLED_REG ( ( unsigned short ) 0xff7a ) /* If an error is detected in a task then the vErrorChecks() task will enter an infinite loop flashing the LED at this rate. */ @@ -153,10 +154,10 @@ the scheduler. */ static void prvCheckForKeyPresses( void ); /* Buffer used by the trace visualisation utility. */ -static portCHAR pcWriteBuffer[ mainDEBUG_LOG_BUFFER_SIZE ]; +static char pcWriteBuffer[ mainDEBUG_LOG_BUFFER_SIZE ]; /*-----------------------------------------------------------*/ -portSHORT main( void ) +short main( void ) { /* Initialise hardware and utilities. */ vParTestInitialise(); @@ -191,11 +192,11 @@ static void vErrorChecks( void *pvParameters ) { portTickType xExpectedWakeTime; const portTickType xPrintRate = ( portTickType ) 5000 / portTICK_RATE_MS; -const portLONG lMaxAllowableTimeDifference = ( portLONG ) 0; +const long lMaxAllowableTimeDifference = ( long ) 0; portTickType xWakeTime; -portLONG lTimeDifference; -const portCHAR *pcReceivedMessage; -const portCHAR * const pcTaskBlockedTooLongMsg = "Print task blocked too long!\r\n"; +long lTimeDifference; +const char *pcReceivedMessage; +const char * const pcTaskBlockedTooLongMsg = "Print task blocked too long!\r\n"; /* Stop warnings. */ ( void ) pvParameters; @@ -226,11 +227,11 @@ const portCHAR * const pcTaskBlockedTooLongMsg = "Print task blocked too long!\r time we should have unblocked. */ if( xWakeTime > xExpectedWakeTime ) { - lTimeDifference = ( portLONG ) ( xWakeTime - xExpectedWakeTime ); + lTimeDifference = ( long ) ( xWakeTime - xExpectedWakeTime ); } else { - lTimeDifference = ( portLONG ) ( xExpectedWakeTime - xWakeTime ); + lTimeDifference = ( long ) ( xExpectedWakeTime - xWakeTime ); } if( lTimeDifference > lMaxAllowableTimeDifference ) @@ -261,7 +262,7 @@ static void prvCheckForKeyPresses( void ) { #ifdef USE_STDIO - portSHORT sIn; + short sIn; taskENTER_CRITICAL(); @@ -270,7 +271,7 @@ static void prvCheckForKeyPresses( void ) if( sIn ) { - unsigned portLONG ulBufferLength; + unsigned long ulBufferLength; /* Key presses can be used to start/stop the trace utility, or end the program. */ @@ -305,7 +306,7 @@ static void prvCheckForKeyPresses( void ) static void prvCheckOtherTasksAreStillRunning( void ) { -portSHORT sErrorHasOccurred = pdFALSE; +short sErrorHasOccurred = pdFALSE; if( xAreComTestTasksStillRunning() != pdTRUE ) { @@ -365,8 +366,8 @@ portSHORT sErrorHasOccurred = pdFALSE; static void prvInitLED( void ) { -unsigned portSHORT usPortDirection; -const unsigned portSHORT usLEDOut = 0x400; +unsigned short usPortDirection; +const unsigned short usLEDOut = 0x400; /* Set the LED bit to an output. */ @@ -378,9 +379,9 @@ const unsigned portSHORT usLEDOut = 0x400; static void prvToggleLED( void ) { -static portSHORT sLED = pdTRUE; -unsigned portSHORT usLEDState; -const unsigned portSHORT usLEDBit = 0x400; +static short sLED = pdTRUE; +unsigned short usLEDState; +const unsigned short usLEDBit = 0x400; /* Flip the state of the LED. */ usLEDState = inpw( mainLED_REG ); diff --git a/Demo/Flshlite/serial/serial.c b/Demo/Flshlite/serial/serial.c index 62b45ac4a..96ce38d69 100644 --- a/Demo/Flshlite/serial/serial.c +++ b/Demo/Flshlite/serial/serial.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ /* @@ -90,7 +91,7 @@ Changes from V2.0.0 #include "portasm.h" #include "semphr.h" -#define serMAX_PORTS ( ( unsigned portSHORT ) 2 ) +#define serMAX_PORTS ( ( unsigned short ) 2 ) #define serPORT_0_INT_REG ( 0xff44 ) #define serPORT_0_BAUD_REG ( 0xff88 ) @@ -108,19 +109,19 @@ Changes from V2.0.0 #define serPORT_1_CTRL_REG ( 0xff10 ) #define serPORT_1_IRQ ( 0x11 ) -#define serTX_EMPTY ( ( unsigned portSHORT ) 0x40 ) -#define serRX_READY ( ( unsigned portSHORT ) 0x80 ) +#define serTX_EMPTY ( ( unsigned short ) 0x40 ) +#define serRX_READY ( ( unsigned short ) 0x80 ) -#define serRESET_PIC( usEOI_TYPE ) portOUTPUT_WORD( ( unsigned portSHORT ) 0xff22, usEOI_TYPE ) -#define serTX_HOLD_EMPTY_INT ( ( unsigned portSHORT ) 0x100 ) +#define serRESET_PIC( usEOI_TYPE ) portOUTPUT_WORD( ( unsigned short ) 0xff22, usEOI_TYPE ) +#define serTX_HOLD_EMPTY_INT ( ( unsigned short ) 0x100 ) -#define serENABLE_INTERRUPTS ( ( unsigned portSHORT ) 0x80 ) -#define serMODE ( ( unsigned portSHORT ) 0x01 ) -#define serENABLE_TX_MACHINES ( ( unsigned portSHORT ) 0x40 ) -#define serENABLE_RX_MACHINES ( ( unsigned portSHORT ) 0x20 ) -#define serINTERRUPT_MASK ( ( unsigned portSHORT ) 0x08 ) -#define serCLEAR_ALL_STATUS_BITS ( ( unsigned portSHORT ) 0x00 ) -#define serINTERRUPT_PRIORITY ( ( unsigned portSHORT ) 0x01 ) /*< Just below the scheduler priority. */ +#define serENABLE_INTERRUPTS ( ( unsigned short ) 0x80 ) +#define serMODE ( ( unsigned short ) 0x01 ) +#define serENABLE_TX_MACHINES ( ( unsigned short ) 0x40 ) +#define serENABLE_RX_MACHINES ( ( unsigned short ) 0x20 ) +#define serINTERRUPT_MASK ( ( unsigned short ) 0x08 ) +#define serCLEAR_ALL_STATUS_BITS ( ( unsigned short ) 0x00 ) +#define serINTERRUPT_PRIORITY ( ( unsigned short ) 0x01 ) /*< Just below the scheduler priority. */ #define serDONT_BLOCK ( ( portTickType ) 0 ) @@ -181,7 +182,7 @@ typedef enum } eBaud; /* Must be same order as eBaud definitions. */ -static const unsigned portSHORT usBaudRateDivisor[] = +static const unsigned short usBaudRateDivisor[] = { 0, /* Not sure if the first 6 are correct. First cannot be used. */ 29127, @@ -206,15 +207,15 @@ static const unsigned portSHORT usBaudRateDivisor[] = typedef struct xCOM_PORT { /* Hardware parameters for this port. */ - portSHORT sTxInterruptOn; - unsigned portSHORT usIntReg; - unsigned portSHORT usBaudReg; - unsigned portSHORT usRxReg; - unsigned portSHORT usTxReg; - unsigned portSHORT usStatusReg; - unsigned portSHORT usCtrlReg; + short sTxInterruptOn; + unsigned short usIntReg; + unsigned short usBaudReg; + unsigned short usRxReg; + unsigned short usTxReg; + unsigned short usStatusReg; + unsigned short usCtrlReg; - unsigned portSHORT usIRQVector; + unsigned short usIRQVector; /* Queues used for communications with com test task. */ xQueueHandle xRxedChars; @@ -237,17 +238,17 @@ typedef xComPort * xComPortHandle; /* These prototypes are repeated here so we don't have to include the serial header. This allows the xComPortHandle structure details to be private to this file. */ xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWantedParity, eDataBits eWantedDataBits, eStopBits eWantedStopBits, unsigned portBASE_TYPE uxBufferLength ); -portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, portCHAR *pcRxedChar, portTickType xBlockTime ); -portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, portCHAR cOutChar, portTickType xBlockTime ); +portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, portTickType xBlockTime ); +portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, portTickType xBlockTime ); void vSerialClose( xComPortHandle xPort ); -portSHORT sSerialWaitForSemaphore( xComPortHandle xPort ); +short sSerialWaitForSemaphore( xComPortHandle xPort ); /*-----------------------------------------------------------*/ -static portSHORT xComPortISR( xComPort * const pxPort ); +static short xComPortISR( xComPort * const pxPort ); #define vInterruptOn( pxPort, usInterrupt ) \ { \ -unsigned portSHORT usIn; \ +unsigned short usIn; \ \ portENTER_CRITICAL(); \ { \ @@ -265,7 +266,7 @@ unsigned portSHORT usIn; \ #define vInterruptOff( pxPort, usInterrupt ) \ { \ - unsigned portSHORT usIn = portINPUT_WORD( pxPort->usCtrlReg ); \ + unsigned short usIn = portINPUT_WORD( pxPort->usCtrlReg ); \ if( usIn & usInterrupt ) \ { \ portOUTPUT_WORD( pxPort->usCtrlReg, usIn & ~usInterrupt); \ @@ -300,7 +301,7 @@ static pxISR xISRs[ serMAX_PORTS ] = xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWantedParity, eDataBits eWantedDataBits, eStopBits eWantedStopBits, unsigned portBASE_TYPE uxBufferLength ) { -unsigned portSHORT usPort; +unsigned short usPort; xComPortHandle pxPort = NULL; /* BAUDDIV = ( Microprocessor Clock / Baud Rate ) / 16 */ @@ -313,7 +314,7 @@ xComPortHandle pxPort = NULL; /* Currently only n,8,1 is supported. */ - usPort = ( unsigned portSHORT ) ePort; + usPort = ( unsigned short ) ePort; if( usPort < serMAX_PORTS ) { @@ -321,17 +322,17 @@ xComPortHandle pxPort = NULL; portENTER_CRITICAL(); { - unsigned portSHORT usInWord; + unsigned short usInWord; /* Create the queues used by the com test task. */ - pxPort->xRxedChars = xQueueCreate( uxBufferLength, ( unsigned portBASE_TYPE ) sizeof( portCHAR ) ); - pxPort->xCharsForTx = xQueueCreate( uxBufferLength, ( unsigned portBASE_TYPE ) sizeof( portCHAR ) ); + pxPort->xRxedChars = xQueueCreate( uxBufferLength, ( unsigned portBASE_TYPE ) sizeof( char ) ); + pxPort->xCharsForTx = xQueueCreate( uxBufferLength, ( unsigned portBASE_TYPE ) sizeof( char ) ); /* Create the test semaphore. This does nothing useful except test a feature of the scheduler. */ vSemaphoreCreateBinary( pxPort->xTestSem ); /* There is no ISR here already to restore later. */ - _dos_setvect( ( portSHORT ) pxPort->usIRQVector, xISRs[ usPort ] ); + _dos_setvect( ( short ) pxPort->usIRQVector, xISRs[ usPort ] ); usInWord = portINPUT_WORD( pxPort->usIntReg ); usInWord &= ~serINTERRUPT_MASK; @@ -350,12 +351,12 @@ xComPortHandle pxPort = NULL; } /*lint !e715 Some parameters are not used as only a subset of the serial port functionality is currently implemented. */ /*-----------------------------------------------------------*/ -void vSerialPutString( xComPortHandle pxPort, const portCHAR * const pcString, unsigned portSHORT usStringLength ) +void vSerialPutString( xComPortHandle pxPort, const char * const pcString, unsigned short usStringLength ) { -unsigned portSHORT usByte; -portCHAR *pcNextChar; +unsigned short usByte; +char *pcNextChar; - pcNextChar = ( portCHAR * ) pcString; + pcNextChar = ( char * ) pcString; for( usByte = 0; usByte < usStringLength; usByte++ ) { @@ -367,7 +368,7 @@ portCHAR *pcNextChar; } /*-----------------------------------------------------------*/ -portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, portCHAR *pcRxedChar, portTickType xBlockTime ) +portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, char *pcRxedChar, portTickType xBlockTime ) { /* Get the next character from the buffer, note that this routine is only called having checked that the is (at least) one to get */ @@ -382,7 +383,7 @@ portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, portCHAR *pcRxedChar, portT } /*-----------------------------------------------------------*/ -portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, portCHAR cOutChar, portTickType xBlockTime ) +portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, char cOutChar, portTickType xBlockTime ) { if( xQueueSend( pxPort->xCharsForTx, &cOutChar, xBlockTime ) != pdPASS ) { @@ -407,7 +408,7 @@ const portTickType xBlockTime = ( portTickType ) 0xffff; void vSerialClose( xComPortHandle xPort ) { -unsigned portSHORT usOutput; +unsigned short usOutput; /* Turn off the interrupts. We may also want to delete the queues and/or re-install the original ISR. */ @@ -431,8 +432,8 @@ unsigned portSHORT usOutput; static portBASE_TYPE xComPortISR( xComPort * const pxPort ) { -unsigned portSHORT usStatusRegister; -portCHAR cChar; +unsigned short usStatusRegister; +char cChar; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE, xContinue = pdTRUE; /* NOTE: THIS IS NOT AN EFFICIENT ISR AS IT IS DESIGNED SOLELY TO TEST @@ -447,7 +448,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE, xContinue = pdTRUE; if( usStatusRegister & serRX_READY ) { - cChar = ( portCHAR ) portINPUT_WORD( pxPort->usRxReg ); + cChar = ( char ) portINPUT_WORD( pxPort->usRxReg ); xQueueSendFromISR( pxPort->xRxedChars, &cChar, &xHigherPriorityTaskWoken ); /* Also release the semaphore - this does nothing interesting and is just a test. */ @@ -461,7 +462,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE, xContinue = pdTRUE; { if( xQueueReceiveFromISR( pxPort->xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE ) { - portOUTPUT_WORD( pxPort->usTxReg, ( unsigned portSHORT ) cChar ); + portOUTPUT_WORD( pxPort->usTxReg, ( unsigned short ) cChar ); /* We have performed an action this cycle - there may be others to perform. */ xContinue = pdTRUE; diff --git a/Demo/H8S/RTOSDemo/FreeRTOSConfig.h b/Demo/H8S/RTOSDemo/FreeRTOSConfig.h index 3932a6602..281e61997 100644 --- a/Demo/H8S/RTOSDemo/FreeRTOSConfig.h +++ b/Demo/H8S/RTOSDemo/FreeRTOSConfig.h @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ #ifndef FREERTOS_CONFIG_H @@ -66,10 +67,10 @@ #define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 -#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 22118400 ) +#define configCPU_CLOCK_HZ ( ( unsigned long ) 22118400 ) #define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 4 ) -#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 200 ) +#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 200 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 15 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 8 ) #define configUSE_TRACE_FACILITY 0 diff --git a/Demo/H8S/RTOSDemo/ParTest/ParTest.c b/Demo/H8S/RTOSDemo/ParTest/ParTest.c index 22bdd0e0b..c316de190 100644 --- a/Demo/H8S/RTOSDemo/ParTest/ParTest.c +++ b/Demo/H8S/RTOSDemo/ParTest/ParTest.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ /* Scheduler include files. */ @@ -59,17 +60,17 @@ *-----------------------------------------------------------*/ /* Value for the LED to be off. */ -#define partstLED_OUTPUTS ( ( unsigned portCHAR ) 0xff ) +#define partstLED_OUTPUTS ( ( unsigned char ) 0xff ) /* P2.0 is not used as an output so there are only 7 LEDs on port 2. */ #define partstMAX_LEDs ( 7 ) -#define partstALL_OUTPUTS_OFF ( ( unsigned portCHAR ) 0 ) +#define partstALL_OUTPUTS_OFF ( ( unsigned char ) 0 ) /* Maps the LED outputs used by the standard demo application files to convenient outputs for the EDK2329. Mainly this insures that the LED used by the Check task is one of the on board LEDs so the demo can be executed on an EDK without any modification. */ -static inline unsigned portCHAR prvMapLED( unsigned portBASE_TYPE uxLED ); +static inline unsigned char prvMapLED( unsigned portBASE_TYPE uxLED ); /*-----------------------------------------------------------*/ @@ -85,17 +86,17 @@ void vParTestInitialise( void ) /* * Described at the top of the file. */ -static inline unsigned portCHAR prvMapLED( unsigned portBASE_TYPE uxLED ) +static inline unsigned char prvMapLED( unsigned portBASE_TYPE uxLED ) { switch( uxLED ) { - case 0 : return ( unsigned portCHAR ) 2; - case 1 : return ( unsigned portCHAR ) 3; - case 2 : return ( unsigned portCHAR ) 4; - case 3 : return ( unsigned portCHAR ) 5; - case 4 : return ( unsigned portCHAR ) 6; - case 5 : return ( unsigned portCHAR ) 0; - case 6 : return ( unsigned portCHAR ) 1; + case 0 : return ( unsigned char ) 2; + case 1 : return ( unsigned char ) 3; + case 2 : return ( unsigned char ) 4; + case 3 : return ( unsigned char ) 5; + case 4 : return ( unsigned char ) 6; + case 5 : return ( unsigned char ) 0; + case 6 : return ( unsigned char ) 1; default : return 0; } } @@ -106,14 +107,14 @@ static inline unsigned portCHAR prvMapLED( unsigned portBASE_TYPE uxLED ) */ void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue ) { -unsigned portCHAR ucLED; +unsigned char ucLED; if( uxLED < partstMAX_LEDs ) { ucLED = prvMapLED( uxLED ); /* Set a bit in the required LED position. LED 0 is bit 1. */ - ucLED = ( unsigned portCHAR ) 1 << ( ucLED + 1 ); + ucLED = ( unsigned char ) 1 << ( ucLED + 1 ); if( xValue ) { @@ -133,14 +134,14 @@ unsigned portCHAR ucLED; void vParTestToggleLED( unsigned portBASE_TYPE uxLED ) { -unsigned portCHAR ucLED; +unsigned char ucLED; if( uxLED < partstMAX_LEDs ) { ucLED = prvMapLED( uxLED ); /* Set a bit in the required LED position. LED 0 is bit 1. */ - ucLED = ( unsigned portCHAR ) 1 << ( ucLED + 1 ); + ucLED = ( unsigned char ) 1 << ( ucLED + 1 ); portENTER_CRITICAL(); { diff --git a/Demo/H8S/RTOSDemo/main.c b/Demo/H8S/RTOSDemo/main.c index b17d08664..64122be51 100644 --- a/Demo/H8S/RTOSDemo/main.c +++ b/Demo/H8S/RTOSDemo/main.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ /* @@ -99,7 +100,7 @@ tasks just use the idle priority. */ #define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 ) /* Baud rate used by the serial port tasks (ComTest tasks). */ -#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 115200 ) +#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 115200 ) /* LED used by the serial port tasks. This is toggled on each character Tx, and mainCOM_TEST_LED + 1 is toggles on each character Rx. */ @@ -114,7 +115,7 @@ the the toggle rate increases to mainERROR_CHECK_PERIOD. */ #define mainERROR_CHECK_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS ) /* Constants used by the vMemCheckTask() task. */ -#define mainCOUNT_INITIAL_VALUE ( ( unsigned portLONG ) 0 ) +#define mainCOUNT_INITIAL_VALUE ( ( unsigned long ) 0 ) #define mainNO_TASK ( 0 ) /* The size of the memory blocks allocated by the vMemCheckTask() task. */ @@ -130,7 +131,7 @@ static void vErrorChecks( void *pvParameters ); /* * Checks the unique counts of other tasks to ensure they are still operational. */ -static portLONG prvCheckOtherTasksAreStillRunning( unsigned portLONG ulMemCheckTaskCount ); +static long prvCheckOtherTasksAreStillRunning( unsigned long ulMemCheckTaskCount ); /* * Dynamically created and deleted during each cycle of the vErrorChecks() @@ -160,7 +161,7 @@ int main( void ) vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); /* Start the 'Check' task. */ - xTaskCreate( vErrorChecks, ( signed portCHAR * )"Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vErrorChecks, ( signed char * )"Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* In this port, to use preemptive scheduler define configUSE_PREEMPTION as 1 in portmacro.h. To use the cooperative scheduler define @@ -188,7 +189,7 @@ int main( void ) static void vErrorChecks( void *pvParameters ) { portTickType xDelayPeriod = mainCHECK_PERIOD; -volatile unsigned portLONG ulMemCheckTaskRunningCount; +volatile unsigned long ulMemCheckTaskRunningCount; xTaskHandle xCreatedTask; portTickType xLastWakeTime; @@ -205,7 +206,7 @@ portTickType xLastWakeTime; /* Dynamically create a task - passing ulMemCheckTaskRunningCount as a parameter. */ xCreatedTask = mainNO_TASK; - if( xTaskCreate( vMemCheckTask, ( signed portCHAR * ) "MEM_CHECK", configMINIMAL_STACK_SIZE, ( void * ) &ulMemCheckTaskRunningCount, tskIDLE_PRIORITY, &xCreatedTask ) != pdPASS ) + if( xTaskCreate( vMemCheckTask, ( signed char * ) "MEM_CHECK", configMINIMAL_STACK_SIZE, ( void * ) &ulMemCheckTaskRunningCount, tskIDLE_PRIORITY, &xCreatedTask ) != pdPASS ) { /* Could not create the task - we have probably run out of heap. */ xDelayPeriod = mainERROR_CHECK_PERIOD; @@ -241,9 +242,9 @@ portTickType xLastWakeTime; * Check each set of tasks in turn to see if they have experienced any * error conditions. */ -static portLONG prvCheckOtherTasksAreStillRunning( unsigned portLONG ulMemCheckTaskCount ) +static long prvCheckOtherTasksAreStillRunning( unsigned long ulMemCheckTaskCount ) { -portLONG lNoErrorsDiscovered = ( portLONG ) pdTRUE; +long lNoErrorsDiscovered = ( long ) pdTRUE; if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) { @@ -293,9 +294,9 @@ portLONG lNoErrorsDiscovered = ( portLONG ) pdTRUE; static void vMemCheckTask( void *pvParameters ) { -unsigned portLONG *pulMemCheckTaskRunningCounter; +unsigned long *pulMemCheckTaskRunningCounter; void *pvMem1, *pvMem2, *pvMem3; -static portLONG lErrorOccurred = pdFALSE; +static long lErrorOccurred = pdFALSE; /* This task is dynamically created then deleted during each cycle of the vErrorChecks task to check the operation of the memory allocator. Each time @@ -308,7 +309,7 @@ static portLONG lErrorOccurred = pdFALSE; pulMemCheckTaskRunningCounter is incremented each cycle to indicate to the vErrorChecks() task that this task is still executing without error. */ - pulMemCheckTaskRunningCounter = ( unsigned portLONG * ) pvParameters; + pulMemCheckTaskRunningCounter = ( unsigned long * ) pvParameters; for( ;; ) { diff --git a/Demo/H8S/RTOSDemo/serial/serial.c b/Demo/H8S/RTOSDemo/serial/serial.c index 49fb096f1..0b2f5d268 100644 --- a/Demo/H8S/RTOSDemo/serial/serial.c +++ b/Demo/H8S/RTOSDemo/serial/serial.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ @@ -69,10 +70,10 @@ static xQueueHandle xRxedChars; static xQueueHandle xCharsForTx; /* Hardware specific constants. */ -#define serTX_INTERRUPT ( ( unsigned portCHAR ) 0x80 ) -#define serRX_INTERRUPT ( ( unsigned portCHAR ) 0x40 ) -#define serTX_ENABLE ( ( unsigned portCHAR ) 0x20 ) -#define serRX_ENABLE ( ( unsigned portCHAR ) 0x10 ) +#define serTX_INTERRUPT ( ( unsigned char ) 0x80 ) +#define serRX_INTERRUPT ( ( unsigned char ) 0x40 ) +#define serTX_ENABLE ( ( unsigned char ) 0x20 ) +#define serRX_ENABLE ( ( unsigned char ) 0x10 ) /* Macros to turn on and off the serial port THRE interrupt while leaving the other register bits in their correct state. The Rx interrupt is always @@ -82,7 +83,7 @@ enabled. */ /* Bit used to switch on the channel 1 serial port in the module stop register. */ -#define serMSTP6 ( ( unsigned portSHORT ) 0x0040 ) +#define serMSTP6 ( ( unsigned short ) 0x0040 ) /* Interrupt service routines. Note that the Rx and Tx service routines can cause a context switch and are therefore defined with the saveall attribute in @@ -97,12 +98,12 @@ void vCOM_1_Error_ISR( void ) __attribute__ ( ( interrupt_handler ) ); /* * Initialise port 1 for interrupt driven communications. */ -xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ) +xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ) { /* Create the queues used to communicate between the tasks and the interrupt service routines. */ - xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) ); - xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) ); + xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) ); + xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) ); /* No parity, 8 data bits and 1 stop bit is the default so does not require configuration - setup the remains of the hardware. */ @@ -143,7 +144,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) { /* Get the next character from the buffer queue. Return false if no characters are available, or arrive before xBlockTime expires. */ @@ -158,7 +159,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcR } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) { signed portBASE_TYPE xReturn = pdPASS; @@ -201,7 +202,7 @@ void vCOM_1_Rx_ISR( void ) /* As this is a switching ISR the local variables must be declared as static. */ - static portCHAR cRxByte; + static char cRxByte; static portBASE_TYPE xHigherPriorityTaskWoken; xHigherPriorityTaskWoken = pdFALSE; @@ -231,7 +232,7 @@ void vCOM_1_Tx_ISR( void ) /* As this is a switching ISR the local variables must be declared as static. */ - static portCHAR cTxByte; + static char cTxByte; static signed portBASE_TYPE xTaskWokenByTx; /* This variable is static so must be explicitly reinitialised each @@ -269,7 +270,7 @@ void vCOM_1_Tx_ISR( void ) */ void vCOM_1_Error_ISR( void ) { -volatile unsigned portCHAR ucIn; +volatile unsigned char ucIn; ucIn = SSR1; SSR1 = 0; diff --git a/Demo/HCS12_CodeWarrior_banked/FreeRTOSConfig.h b/Demo/HCS12_CodeWarrior_banked/FreeRTOSConfig.h index 75ee84744..b16339aea 100644 --- a/Demo/HCS12_CodeWarrior_banked/FreeRTOSConfig.h +++ b/Demo/HCS12_CodeWarrior_banked/FreeRTOSConfig.h @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ #ifndef FREERTOS_CONFIG_H @@ -72,7 +73,7 @@ model. */ #define configUSE_TICK_HOOK 0 #define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 4 ) -#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 80 ) +#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10240 ) ) #define configMAX_TASK_NAME_LEN ( 1 ) #define configUSE_TRACE_FACILITY 0 @@ -87,7 +88,7 @@ model. */ This port is a bit different in that hardware setup uses the code generated by the Processor Expert, making this definition obsolete. -#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 25000000 ) +#define configCPU_CLOCK_HZ ( ( unsigned long ) 25000000 ) */ diff --git a/Demo/HCS12_CodeWarrior_banked/ParTest/ParTest.c b/Demo/HCS12_CodeWarrior_banked/ParTest/ParTest.c index a6c141bce..869615324 100644 --- a/Demo/HCS12_CodeWarrior_banked/ParTest/ParTest.c +++ b/Demo/HCS12_CodeWarrior_banked/ParTest/ParTest.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ /* Scheduler include files. */ diff --git a/Demo/HCS12_CodeWarrior_banked/main.c b/Demo/HCS12_CodeWarrior_banked/main.c index 7120419b7..b9252becc 100644 --- a/Demo/HCS12_CodeWarrior_banked/main.c +++ b/Demo/HCS12_CodeWarrior_banked/main.c @@ -1,49 +1,50 @@ /* - 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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ @@ -110,10 +111,10 @@ then the toggle rate increases to mainERROR_CHECK_PERIOD. */ #define mainERROR_CHECK_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS ) /* The constants used in the idle task calculation. */ -#define intgCONST1 ( ( portLONG ) 123 ) -#define intgCONST2 ( ( portLONG ) 234567 ) -#define intgCONST3 ( ( portLONG ) -3 ) -#define intgCONST4 ( ( portLONG ) 7 ) +#define intgCONST1 ( ( long ) 123 ) +#define intgCONST2 ( ( long ) 234567 ) +#define intgCONST3 ( ( long ) -3 ) +#define intgCONST4 ( ( long ) 7 ) #define intgEXPECTED_ANSWER ( ( ( intgCONST1 + intgCONST2 ) * intgCONST3 ) / intgCONST4 ) @@ -126,7 +127,7 @@ download this value must be one of the following: 1 to configure for 19200 baud. 2 to configure for 9600 baud. 3 to configure for 4800 baud. */ -#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 2 ) +#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 2 ) /* LED used by the serial port tasks. This is toggled on each character Tx, and mainCOM_TEST_LED + 1 is toggles on each character Rx. */ @@ -150,7 +151,7 @@ void vApplicationIdleHook( void ); /* * Checks the unique counts of other tasks to ensure they are still operational. */ -static portLONG prvCheckOtherTasksAreStillRunning( void ); +static long prvCheckOtherTasksAreStillRunning( void ); @@ -225,7 +226,7 @@ portTickType xLastWakeTime; } /*-----------------------------------------------------------*/ -static portLONG prvCheckOtherTasksAreStillRunning( void ) +static long prvCheckOtherTasksAreStillRunning( void ) { portBASE_TYPE xAllTasksPassed = pdPASS; @@ -273,7 +274,7 @@ void vApplicationIdleHook( void ) { /* This variable is effectively set to a constant so it is made volatile to ensure the compiler does not just get rid of it. */ -volatile portLONG lValue; +volatile long lValue; /* Keep performing a calculation and checking the result against a constant. */ diff --git a/Demo/HCS12_CodeWarrior_banked/serial/serial.c b/Demo/HCS12_CodeWarrior_banked/serial/serial.c index b7f55a052..aed121e63 100644 --- a/Demo/HCS12_CodeWarrior_banked/serial/serial.c +++ b/Demo/HCS12_CodeWarrior_banked/serial/serial.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ @@ -78,22 +79,22 @@ static xQueueHandle xCharsForTx; /* * Initialise port for interrupt driven communications. */ -xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ) +xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ) { /* Hardware setup is performed by the Processor Expert generated code. This function just creates the queues used to communicate between the interrupt code and the task code - then sets the required baud rate. */ - xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) ); - xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) ); + xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) ); + xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) ); - COM0_SetBaudRateMode( ( portCHAR ) ulWantedBaud ); + COM0_SetBaudRateMode( ( char ) ulWantedBaud ); return NULL; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) { /* Get the next character from the buffer queue. Return false if no characters are available, or arrive before xBlockTime expires. */ @@ -108,7 +109,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcR } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) { /* Place the character in the queue of characters to be transmitted. */ if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS ) @@ -143,7 +144,7 @@ void vSerialClose( xComPortHandle xPort ) __interrupt void vCOM0_ISR( void ) { -volatile unsigned portCHAR ucByte, ucStatus; +volatile unsigned char ucByte, ucStatus; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; /* What caused the interrupt? */ diff --git a/Demo/HCS12_CodeWarrior_small/FreeRTOSConfig.h b/Demo/HCS12_CodeWarrior_small/FreeRTOSConfig.h index 9ddea2b9f..2e66f254f 100644 --- a/Demo/HCS12_CodeWarrior_small/FreeRTOSConfig.h +++ b/Demo/HCS12_CodeWarrior_small/FreeRTOSConfig.h @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ #ifndef FREERTOS_CONFIG_H @@ -68,7 +69,7 @@ #define configUSE_TICK_HOOK 0 #define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 4 ) -#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 70 ) +#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 2048 - 256 ) ) #define configMAX_TASK_NAME_LEN ( 1 ) #define configUSE_TRACE_FACILITY 0 @@ -83,7 +84,7 @@ This port is a bit different in that hardware setup uses the code generated by the Processor Expert, making this definition obsolete. -#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 24000000 ) +#define configCPU_CLOCK_HZ ( ( unsigned long ) 24000000 ) */ diff --git a/Demo/HCS12_CodeWarrior_small/ParTest/ParTest.c b/Demo/HCS12_CodeWarrior_small/ParTest/ParTest.c index a6c141bce..869615324 100644 --- a/Demo/HCS12_CodeWarrior_small/ParTest/ParTest.c +++ b/Demo/HCS12_CodeWarrior_small/ParTest/ParTest.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ /* Scheduler include files. */ diff --git a/Demo/HCS12_CodeWarrior_small/main.c b/Demo/HCS12_CodeWarrior_small/main.c index b021eac8d..e0e7c77b2 100644 --- a/Demo/HCS12_CodeWarrior_small/main.c +++ b/Demo/HCS12_CodeWarrior_small/main.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ @@ -140,10 +141,10 @@ then the toggle rate increases to mainERROR_CHECK_PERIOD. */ #define mainBUTTON_PUSH_LED ( 5 ) /* The constants used in the idle task calculation. */ -#define intgCONST1 ( ( portLONG ) 123 ) -#define intgCONST2 ( ( portLONG ) 234567 ) -#define intgCONST3 ( ( portLONG ) -3 ) -#define intgCONST4 ( ( portLONG ) 7 ) +#define intgCONST1 ( ( long ) 123 ) +#define intgCONST2 ( ( long ) 234567 ) +#define intgCONST3 ( ( long ) -3 ) +#define intgCONST4 ( ( long ) 7 ) #define intgEXPECTED_ANSWER ( ( ( intgCONST1 + intgCONST2 ) * intgCONST3 ) / intgCONST4 ) /* The length of the queue between is button push ISR and the Button Push task @@ -173,7 +174,7 @@ void vApplicationIdleHook( void ); /* * Checks the unique counts of other tasks to ensure they are still operational. */ -static portLONG prvCheckOtherTasksAreStillRunning( void ); +static long prvCheckOtherTasksAreStillRunning( void ); @@ -247,7 +248,7 @@ portTickType xLastWakeTime; } /*-----------------------------------------------------------*/ -static portLONG prvCheckOtherTasksAreStillRunning( void ) +static long prvCheckOtherTasksAreStillRunning( void ) { portBASE_TYPE xAllTasksPassed = pdPASS; @@ -275,7 +276,7 @@ void vApplicationIdleHook( void ) { /* This variable is effectively set to a constant so it is made volatile to ensure the compiler does not just get rid of it. */ -volatile portLONG lValue; +volatile long lValue; /* Keep performing a calculation and checking the result against a constant. */ for( ;; ) @@ -353,7 +354,7 @@ unsigned portBASE_TYPE uxExpected = 1, uxReceived; void interrupt vButtonPush( void ) { static unsigned portBASE_TYPE uxValToSend = 0; - static unsigned portLONG xHigherPriorityTaskWoken; + static unsigned long xHigherPriorityTaskWoken; xHigherPriorityTaskWoken = pdFALSE; diff --git a/Demo/HCS12_CodeWarrior_small/serial/serial.c b/Demo/HCS12_CodeWarrior_small/serial/serial.c index a5c9e9de1..21953dedb 100644 --- a/Demo/HCS12_CodeWarrior_small/serial/serial.c +++ b/Demo/HCS12_CodeWarrior_small/serial/serial.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ @@ -66,19 +67,19 @@ to represent an optimised solution. */ /* * Initialise port 1 for interrupt driven communications. */ -xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ) +xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ) { return NULL; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) { return pdFALSE; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) { signed portBASE_TYPE xReturn = pdPASS; diff --git a/Demo/HCS12_GCC_banked/FreeRTOSConfig.h b/Demo/HCS12_GCC_banked/FreeRTOSConfig.h index 8d4bc04fb..346b6f687 100644 --- a/Demo/HCS12_GCC_banked/FreeRTOSConfig.h +++ b/Demo/HCS12_GCC_banked/FreeRTOSConfig.h @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ /** @@ -75,7 +76,7 @@ model. */ #define configUSE_TICK_HOOK 0 #define configTICK_RATE_HZ ( ( portTickType ) 977 ) #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 4 ) -#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 300/*128*/ ) +#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 300/*128*/ ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10752 ) ) #define configMAX_TASK_NAME_LEN ( 3 ) #define configUSE_TRACE_FACILITY 0 @@ -89,7 +90,7 @@ model. */ /* This parameter is normally affects the clock frequency. In this port, at the moment it might just be used for reference. */ -#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 24000000 ) +#define configCPU_CLOCK_HZ ( ( unsigned long ) 24000000 ) /* Set the following definitions to 1 to include the API function, or zero to exclude the API function. */ diff --git a/Demo/HCS12_GCC_banked/ParTest.c b/Demo/HCS12_GCC_banked/ParTest.c index b1e838aef..a6e951d72 100644 --- a/Demo/HCS12_GCC_banked/ParTest.c +++ b/Demo/HCS12_GCC_banked/ParTest.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ /** diff --git a/Demo/HCS12_GCC_banked/main.c b/Demo/HCS12_GCC_banked/main.c index a7d4193f1..d975e8e9a 100644 --- a/Demo/HCS12_GCC_banked/main.c +++ b/Demo/HCS12_GCC_banked/main.c @@ -1,49 +1,50 @@ /* - 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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ @@ -113,10 +114,10 @@ then the toggle rate increases to mainERROR_CHECK_PERIOD. */ #define mainERROR_CHECK_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS ) /* The constants used in the idle task calculation. */ -#define intgCONST1 ( ( portLONG ) 123 ) -#define intgCONST2 ( ( portLONG ) 234567 ) -#define intgCONST3 ( ( portLONG ) -3 ) -#define intgCONST4 ( ( portLONG ) 7 ) +#define intgCONST1 ( ( long ) 123 ) +#define intgCONST2 ( ( long ) 234567 ) +#define intgCONST3 ( ( long ) -3 ) +#define intgCONST4 ( ( long ) 7 ) #define intgEXPECTED_ANSWER ( ( ( intgCONST1 + intgCONST2 ) * intgCONST3 ) / intgCONST4 ) @@ -129,7 +130,7 @@ download this value must be one of the following: 1 to configure for 19200 baud. 2 to configure for 9600 baud. 3 to configure for 4800 baud. */ -#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 2 ) +#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 2 ) /* LED used by the serial port tasks. This is toggled on each character Tx, and mainCOM_TEST_LED + 1 is toggles on each character Rx. */ @@ -153,7 +154,7 @@ void ATTR_BANK0 vApplicationIdleHook( void ); /* * Checks the unique counts of other tasks to ensure they are still operational. */ -static portLONG ATTR_BANK0 prvCheckOtherTasksAreStillRunning( void ); +static long ATTR_BANK0 prvCheckOtherTasksAreStillRunning( void ); @@ -227,7 +228,7 @@ portTickType xLastWakeTime; } /*-----------------------------------------------------------*/ -static portLONG prvCheckOtherTasksAreStillRunning( void ) +static long prvCheckOtherTasksAreStillRunning( void ) { portBASE_TYPE xAllTasksPassed = pdPASS; @@ -275,7 +276,7 @@ void vApplicationIdleHook( void ) { /* This variable is effectively set to a constant so it is made volatile to ensure the compiler does not just get rid of it. */ -volatile portLONG lValue; +volatile long lValue; /* Keep performing a calculation and checking the result against a constant. */ diff --git a/Demo/HCS12_GCC_banked/serial.c b/Demo/HCS12_GCC_banked/serial.c index 73078a107..05dc9edd3 100644 --- a/Demo/HCS12_GCC_banked/serial.c +++ b/Demo/HCS12_GCC_banked/serial.c @@ -37,22 +37,22 @@ static xQueueHandle xCharsForTx; /* * Initialise port for interrupt driven communications. */ -xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ) +xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ) { /* Hardware setup is performed by the Processor Expert generated code. This function just creates the queues used to communicate between the interrupt code and the task code - then sets the required baud rate. */ - xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) ); - xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) ); + xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) ); + xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) ); - SCI_SetBaudRateMode( ( portCHAR ) ulWantedBaud ); + SCI_SetBaudRateMode( ( char ) ulWantedBaud ); return NULL; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) { /* Get the next character from the buffer queue. Return false if no characters are available, or arrive before xBlockTime expires. */ @@ -67,7 +67,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcR } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) { /* Place the character in the queue of characters to be transmitted. */ if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS ) @@ -102,7 +102,7 @@ void ATTR_INT ATTR_NEAR vCOM_ISR( void ); void vCOM_ISR( void ) { -volatile unsigned portCHAR ucByte, ucStatus; +volatile unsigned char ucByte, ucStatus; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; /* What caused the interrupt? */ diff --git a/Demo/HCS12_GCC_banked/startup.c b/Demo/HCS12_GCC_banked/startup.c index 0cd0c0b88..5b385ab87 100644 --- a/Demo/HCS12_GCC_banked/startup.c +++ b/Demo/HCS12_GCC_banked/startup.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ diff --git a/Demo/dsPIC_MPLAB/FreeRTOSConfig.h b/Demo/dsPIC_MPLAB/FreeRTOSConfig.h index 2efcd695b..d6fc123cd 100644 --- a/Demo/dsPIC_MPLAB/FreeRTOSConfig.h +++ b/Demo/dsPIC_MPLAB/FreeRTOSConfig.h @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ #ifndef FREERTOS_CONFIG_H @@ -66,7 +67,7 @@ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 #define configTICK_RATE_HZ ( ( portTickType ) 1000 ) -#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 25000000 ) /* Fosc / 2 */ +#define configCPU_CLOCK_HZ ( ( unsigned long ) 25000000 ) /* Fosc / 2 */ #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 4 ) #define configMINIMAL_STACK_SIZE ( 105 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) 5120 ) diff --git a/Demo/dsPIC_MPLAB/ParTest/ParTest.c b/Demo/dsPIC_MPLAB/ParTest/ParTest.c index 5e763b7c1..ea987fa87 100644 --- a/Demo/dsPIC_MPLAB/ParTest/ParTest.c +++ b/Demo/dsPIC_MPLAB/ParTest/ParTest.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ /* Scheduler includes. */ diff --git a/Demo/dsPIC_MPLAB/lcd.c b/Demo/dsPIC_MPLAB/lcd.c index 3543d82bf..1da8e67fd 100644 --- a/Demo/dsPIC_MPLAB/lcd.c +++ b/Demo/dsPIC_MPLAB/lcd.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ /* Scheduler includes. */ diff --git a/Demo/dsPIC_MPLAB/lcd.h b/Demo/dsPIC_MPLAB/lcd.h index abe07ef7f..a355202b5 100644 --- a/Demo/dsPIC_MPLAB/lcd.h +++ b/Demo/dsPIC_MPLAB/lcd.h @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ #ifndef LCD_INC_H @@ -59,7 +60,7 @@ typedef struct portTickType xMinDisplayTime; /* A pointer to the string to be displayed. */ - portCHAR *pcMessage; + char *pcMessage; } xLCDMessage; diff --git a/Demo/dsPIC_MPLAB/main.c b/Demo/dsPIC_MPLAB/main.c index e8df7aab2..05a095de0 100644 --- a/Demo/dsPIC_MPLAB/main.c +++ b/Demo/dsPIC_MPLAB/main.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ /* @@ -125,7 +126,7 @@ interrupt test" interrupt. */ #define mainEXPECTED_CLOCKS_BETWEEN_INTERRUPTS ( configCPU_CLOCK_HZ / mainTEST_INTERRUPT_FREQUENCY ) /* The number of nano seconds between each processor clock. */ -#define mainNS_PER_CLOCK ( ( unsigned portSHORT ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) ) +#define mainNS_PER_CLOCK ( ( unsigned short ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) ) /* Dimension the buffer used to hold the value of the maximum jitter time when it is converted to a string. */ @@ -166,7 +167,7 @@ int main( void ) vCreateBlockTimeTasks(); /* Create the test tasks defined within this file. */ - xTaskCreate( vCheckTask, ( signed portCHAR * ) "Check", mainCHECK_TAKS_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vCheckTask, ( signed char * ) "Check", mainCHECK_TAKS_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Start the task that will control the LCD. This returns the handle to the queue used to write text out to the task. */ @@ -196,10 +197,10 @@ static void vCheckTask( void *pvParameters ) portTickType xLastExecutionTime; /* The maximum jitter time measured by the fast interrupt test. */ -extern unsigned portSHORT usMaxJitter ; +extern unsigned short usMaxJitter ; /* Buffer into which the maximum jitter time is written as a string. */ -static portCHAR cStringBuffer[ mainMAX_STRING_LENGTH ]; +static char cStringBuffer[ mainMAX_STRING_LENGTH ]; /* The message that is sent on the queue to the LCD task. The first parameter is the minimum time (in ticks) that the message should be @@ -208,7 +209,7 @@ to the message to display itself. */ xLCDMessage xMessage = { 0, cStringBuffer }; /* Set to pdTRUE should an error be detected in any of the standard demo tasks. */ -unsigned portSHORT usErrorDetected = pdFALSE; +unsigned short usErrorDetected = pdFALSE; /* Initialise xLastExecutionTime so the first call to vTaskDelayUntil() works correctly. */ @@ -249,7 +250,7 @@ unsigned portSHORT usErrorDetected = pdFALSE; { /* No errors have been discovered, so display the maximum jitter timer discovered by the "fast interrupt test". */ - sprintf( cStringBuffer, "%dns max jitter", ( portSHORT ) ( usMaxJitter - mainEXPECTED_CLOCKS_BETWEEN_INTERRUPTS ) * mainNS_PER_CLOCK ); + sprintf( cStringBuffer, "%dns max jitter", ( short ) ( usMaxJitter - mainEXPECTED_CLOCKS_BETWEEN_INTERRUPTS ) * mainNS_PER_CLOCK ); } /* Send the message to the LCD gatekeeper for display. */ diff --git a/Demo/dsPIC_MPLAB/serial/serial.c b/Demo/dsPIC_MPLAB/serial/serial.c index c29f4951c..eb5b6a0a8 100644 --- a/Demo/dsPIC_MPLAB/serial/serial.c +++ b/Demo/dsPIC_MPLAB/serial/serial.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ @@ -93,13 +94,13 @@ static xQueueHandle xCharsForTx; static portBASE_TYPE xTxHasEnded; /*-----------------------------------------------------------*/ -xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ) +xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ) { -portCHAR cChar; +char cChar; /* Create the queues used by the com test task. */ - xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) ); - xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) ); + xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) ); + xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) ); /* Setup the UART. */ U2MODEbits.BRGH = serLOW_SPEED; @@ -113,7 +114,7 @@ portCHAR cChar; U2MODEbits.USIDL = serCONTINUE_IN_IDLE_MODE; U2MODEbits.UARTEN = serUART_ENABLED; - U2BRG = (unsigned portSHORT)(( (float)configCPU_CLOCK_HZ / ( (float)16 * (float)ulWantedBaud ) ) - (float)0.5); + U2BRG = (unsigned short)(( (float)configCPU_CLOCK_HZ / ( (float)16 * (float)ulWantedBaud ) ) - (float)0.5); U2STAbits.URXISEL = serINTERRUPT_ON_SINGLE_CHAR; U2STAbits.UTXEN = serTX_ENABLE; @@ -145,7 +146,7 @@ portCHAR cChar; } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime ) { /* Only one port is supported. */ ( void ) pxPort; @@ -163,7 +164,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcR } /*-----------------------------------------------------------*/ -signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime ) +signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) { /* Only one port is supported. */ ( void ) pxPort; @@ -193,7 +194,7 @@ void vSerialClose( xComPortHandle xPort ) void __attribute__((__interrupt__, auto_psv)) _U2RXInterrupt( void ) { -portCHAR cChar; +char cChar; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; /* Get the character and post it on the queue of Rxed characters. @@ -215,7 +216,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; void __attribute__((__interrupt__, auto_psv)) _U2TXInterrupt( void ) { -signed portCHAR cChar; +signed char cChar; portBASE_TYPE xTaskWoken = pdFALSE; /* If the transmit buffer is full we cannot get the next character. diff --git a/Demo/dsPIC_MPLAB/timertest.c b/Demo/dsPIC_MPLAB/timertest.c index 76d5ff447..1db158ebf 100644 --- a/Demo/dsPIC_MPLAB/timertest.c +++ b/Demo/dsPIC_MPLAB/timertest.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ /* High speed timer test as described in main.c. */ diff --git a/Demo/dsPIC_MPLAB/timertest.h b/Demo/dsPIC_MPLAB/timertest.h index 598115d4b..4db15e303 100644 --- a/Demo/dsPIC_MPLAB/timertest.h +++ b/Demo/dsPIC_MPLAB/timertest.h @@ -1,55 +1,56 @@ /* - 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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ #ifndef TIMER_TEST_H #define TIMER_TEST_H /* Setup the high frequency timer interrupt. */ -void vSetupTimerTest( unsigned portSHORT usFrequencyHz ); +void vSetupTimerTest( unsigned short usFrequencyHz ); #endif /* TIMER_TEST_H */ diff --git a/Demo/lwIP_AVR32_UC3/FreeRTOSConfig.h b/Demo/lwIP_AVR32_UC3/FreeRTOSConfig.h index 0c5773c03..23d97271b 100644 --- a/Demo/lwIP_AVR32_UC3/FreeRTOSConfig.h +++ b/Demo/lwIP_AVR32_UC3/FreeRTOSConfig.h @@ -65,7 +65,7 @@ #define configPBA_CLOCK_HZ ( 24000000 ) #define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 8 ) -#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 256 ) +#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 256 ) /* configTOTAL_HEAP_SIZE is not used when heap_3.c is used. */ #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1024*25 ) ) #define configMAX_TASK_NAME_LEN ( 20 ) diff --git a/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.c b/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.c index 37f0545d2..ac2ab1a8b 100644 --- a/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.c +++ b/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ /* @@ -123,11 +124,11 @@ static void vProcessConnection( struct netconn *pxNetCon ); static void vProcessConnection( struct netconn *pxNetCon ) { -static portCHAR cDynamicPage[ webMAX_PAGE_SIZE ], cPageHits[ 11 ]; +static char cDynamicPage[ webMAX_PAGE_SIZE ], cPageHits[ 11 ]; struct netbuf *pxRxBuffer; -portCHAR *pcRxString; -unsigned portSHORT usLength; -static unsigned portLONG ulPageHits = 0; +char *pcRxString; +unsigned short usLength; +static unsigned long ulPageHits = 0; /* We expect to immediately get data. */ pxRxBuffer = netconn_recv( pxNetCon ); @@ -157,7 +158,7 @@ static unsigned portLONG ulPageHits = 0; strcat( cDynamicPage, cPageHits ); strcat( cDynamicPage, "

Task          State  Priority  Stack	#
************************************************
" ); /* ... Then the list of tasks and their status... */ - vTaskList( ( signed portCHAR * ) cDynamicPage + strlen( cDynamicPage ) ); + vTaskList( ( signed char * ) cDynamicPage + strlen( cDynamicPage ) ); /* ... Finally the page footer. */ strcat( cDynamicPage, webHTML_END ); diff --git a/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.h b/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.h index b7234d439..4a975c6e5 100644 --- a/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.h +++ b/Demo/lwIP_Demo_Rowley_ARM7/BasicWEB.h @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ #ifndef BASIC_WEB_SERVER_H diff --git a/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.c b/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.c index c659dd63d..a05ec27e4 100644 --- a/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.c +++ b/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ /* @@ -102,15 +103,15 @@ to use an MII interface. */ /* The buffer addresses written into the descriptors must be aligned so the last few bits are zero. These bits have special meaning for the EMAC peripheral and cannot be used as part of the address. */ -#define emacADDRESS_MASK ( ( unsigned portLONG ) 0xFFFFFFFC ) +#define emacADDRESS_MASK ( ( unsigned long ) 0xFFFFFFFC ) /* Bit used within the address stored in the descriptor to mark the last descriptor in the array. */ -#define emacRX_WRAP_BIT ( ( unsigned portLONG ) 0x02 ) +#define emacRX_WRAP_BIT ( ( unsigned long ) 0x02 ) /* Bit used within the Tx descriptor status to indicate whether the descriptor is under the control of the EMAC or the software. */ -#define emacTX_BUF_USED ( ( unsigned portLONG ) 0x80000000 ) +#define emacTX_BUF_USED ( ( unsigned long ) 0x80000000 ) /* A short delay is used to wait for a buffer to become available, should one not be immediately available when trying to transmit a frame. */ @@ -121,32 +122,32 @@ one not be immediately available when trying to transmit a frame. */ #define emacBLOCK_TIME_WAITING_FOR_INPUT ( ( portTickType ) 100 ) /* Peripheral setup for the EMAC. */ -#define emacPERIPHERAL_A_SETUP ( ( unsigned portLONG ) AT91C_PB2_ETX0 ) | \ - ( ( unsigned portLONG ) AT91C_PB12_ETXER ) | \ - ( ( unsigned portLONG ) AT91C_PB16_ECOL ) | \ - ( ( unsigned portLONG ) AT91C_PB11_ETX3 ) | \ - ( ( unsigned portLONG ) AT91C_PB6_ERX1 ) | \ - ( ( unsigned portLONG ) AT91C_PB15_ERXDV ) | \ - ( ( unsigned portLONG ) AT91C_PB13_ERX2 ) | \ - ( ( unsigned portLONG ) AT91C_PB3_ETX1 ) | \ - ( ( unsigned portLONG ) AT91C_PB8_EMDC ) | \ - ( ( unsigned portLONG ) AT91C_PB5_ERX0 ) | \ - ( ( unsigned portLONG ) AT91C_PB14_ERX3 ) | \ - ( ( unsigned portLONG ) AT91C_PB4_ECRS_ECRSDV ) | \ - ( ( unsigned portLONG ) AT91C_PB1_ETXEN ) | \ - ( ( unsigned portLONG ) AT91C_PB10_ETX2 ) | \ - ( ( unsigned portLONG ) AT91C_PB0_ETXCK_EREFCK ) | \ - ( ( unsigned portLONG ) AT91C_PB9_EMDIO ) | \ - ( ( unsigned portLONG ) AT91C_PB7_ERXER ) | \ - ( ( unsigned portLONG ) AT91C_PB17_ERXCK ); +#define emacPERIPHERAL_A_SETUP ( ( unsigned long ) AT91C_PB2_ETX0 ) | \ + ( ( unsigned long ) AT91C_PB12_ETXER ) | \ + ( ( unsigned long ) AT91C_PB16_ECOL ) | \ + ( ( unsigned long ) AT91C_PB11_ETX3 ) | \ + ( ( unsigned long ) AT91C_PB6_ERX1 ) | \ + ( ( unsigned long ) AT91C_PB15_ERXDV ) | \ + ( ( unsigned long ) AT91C_PB13_ERX2 ) | \ + ( ( unsigned long ) AT91C_PB3_ETX1 ) | \ + ( ( unsigned long ) AT91C_PB8_EMDC ) | \ + ( ( unsigned long ) AT91C_PB5_ERX0 ) | \ + ( ( unsigned long ) AT91C_PB14_ERX3 ) | \ + ( ( unsigned long ) AT91C_PB4_ECRS_ECRSDV ) | \ + ( ( unsigned long ) AT91C_PB1_ETXEN ) | \ + ( ( unsigned long ) AT91C_PB10_ETX2 ) | \ + ( ( unsigned long ) AT91C_PB0_ETXCK_EREFCK ) | \ + ( ( unsigned long ) AT91C_PB9_EMDIO ) | \ + ( ( unsigned long ) AT91C_PB7_ERXER ) | \ + ( ( unsigned long ) AT91C_PB17_ERXCK ); /* Misc defines. */ #define emacINTERRUPT_LEVEL ( 5 ) #define emacNO_DELAY ( 0 ) #define emacTOTAL_FRAME_HEADER_SIZE ( 54 ) #define emacPHY_INIT_DELAY ( 5000 / portTICK_RATE_MS ) -#define emacRESET_KEY ( ( unsigned portLONG ) 0xA5000000 ) -#define emacRESET_LENGTH ( ( unsigned portLONG ) ( 0x01 << 8 ) ) +#define emacRESET_KEY ( ( unsigned long ) 0xA5000000 ) +#define emacRESET_LENGTH ( ( unsigned long ) ( 0x01 << 8 ) ) /* The Atmel header file only defines the TX frame length mask. */ #define emacRX_LENGTH_FRAME ( 0xfff ) @@ -155,11 +156,11 @@ one not be immediately available when trying to transmit a frame. */ /* Buffer written to by the EMAC DMA. Must be aligned as described by the comment above the emacADDRESS_MASK definition. */ -static volatile portCHAR pcRxBuffer[ NB_RX_BUFFERS * ETH_RX_BUFFER_SIZE ] __attribute__ ((aligned (8))); +static volatile char pcRxBuffer[ NB_RX_BUFFERS * ETH_RX_BUFFER_SIZE ] __attribute__ ((aligned (8))); /* Buffer read by the EMAC DMA. Must be aligned as described by the comment above the emacADDRESS_MASK definition. */ -static portCHAR pcTxBuffer[ NB_TX_BUFFERS * ETH_TX_BUFFER_SIZE ] __attribute__ ((aligned (8))); +static char pcTxBuffer[ NB_TX_BUFFERS * ETH_TX_BUFFER_SIZE ] __attribute__ ((aligned (8))); /* Descriptors used to communicate between the program and the EMAC peripheral. These descriptors hold the locations and state of the Rx and Tx buffers. */ @@ -167,7 +168,7 @@ static volatile AT91S_TxTdDescriptor xTxDescriptors[ NB_TX_BUFFERS ]; static volatile AT91S_RxTdDescriptor xRxDescriptors[ NB_RX_BUFFERS ]; /* The IP and Ethernet addresses are read from the header files. */ -const portCHAR cMACAddress[ 6 ] = { emacETHADDR0, emacETHADDR1, emacETHADDR2, emacETHADDR3, emacETHADDR4, emacETHADDR5 }; +const char cMACAddress[ 6 ] = { emacETHADDR0, emacETHADDR1, emacETHADDR2, emacETHADDR3, emacETHADDR4, emacETHADDR5 }; const unsigned char ucIPAddress[ 4 ] = { emacIPADDR0, emacIPADDR1, emacIPADDR2, emacIPADDR3 }; /*-----------------------------------------------------------*/ @@ -197,11 +198,11 @@ static void prvSetupEMACInterrupt( void ); /* * Some initialisation functions taken from the Atmel EMAC sample code. */ -static void vReadPHY( unsigned portCHAR ucPHYAddress, unsigned portCHAR ucAddress, unsigned portLONG *pulValue ); +static void vReadPHY( unsigned char ucPHYAddress, unsigned char ucAddress, unsigned long *pulValue ); static portBASE_TYPE xGetLinkSpeed( void ); static portBASE_TYPE prvProbePHY( void ); #if USE_RMII_INTERFACE != 1 - static void vWritePHY( unsigned portCHAR ucPHYAddress, unsigned portCHAR ucAddress, unsigned portLONG ulValue); + static void vWritePHY( unsigned char ucPHYAddress, unsigned char ucAddress, unsigned long ulValue); #endif @@ -209,18 +210,18 @@ static portBASE_TYPE prvProbePHY( void ); static xSemaphoreHandle xSemaphore = NULL; /* Holds the index to the next buffer from which data will be read. */ -static volatile unsigned portLONG ulNextRxBuffer = 0; +static volatile unsigned long ulNextRxBuffer = 0; /*-----------------------------------------------------------*/ /* See the header file for descriptions of public functions. */ -portLONG lEMACSend( portCHAR *pcFrom, unsigned portLONG ulLength, portLONG lEndOfFrame ) +long lEMACSend( char *pcFrom, unsigned long ulLength, long lEndOfFrame ) { static unsigned portBASE_TYPE uxTxBufferIndex = 0; portBASE_TYPE xWaitCycles = 0; -portLONG lReturn = pdPASS; -portCHAR *pcBuffer; -unsigned portLONG ulLastBuffer, ulDataBuffered = 0, ulDataRemainingToSend, ulLengthToSend; +long lReturn = pdPASS; +char *pcBuffer; +unsigned long ulLastBuffer, ulDataBuffered = 0, ulDataRemainingToSend, ulLengthToSend; /* If the length of data to be transmitted is greater than each individual transmit buffer then the data will be split into more than one buffer. @@ -252,7 +253,7 @@ unsigned portLONG ulLastBuffer, ulDataBuffered = 0, ulDataRemainingToSend, ulLen { /* Get the address of the buffer from the descriptor, then copy the data into the buffer. */ - pcBuffer = ( portCHAR * ) xTxDescriptors[ uxTxBufferIndex ].addr; + pcBuffer = ( char * ) xTxDescriptors[ uxTxBufferIndex ].addr; /* How much can we write to the buffer? */ ulDataRemainingToSend = ulLength - ulDataBuffered; @@ -288,14 +289,14 @@ unsigned portLONG ulLastBuffer, ulDataBuffered = 0, ulDataRemainingToSend, ulLen then move to the next descriptor, wrapping if necessary. */ if( uxTxBufferIndex >= ( NB_TX_BUFFERS - 1 ) ) { - xTxDescriptors[ uxTxBufferIndex ].U_Status.status = ( ulLengthToSend & ( unsigned portLONG ) AT91C_LENGTH_FRAME ) + xTxDescriptors[ uxTxBufferIndex ].U_Status.status = ( ulLengthToSend & ( unsigned long ) AT91C_LENGTH_FRAME ) | ulLastBuffer | AT91C_TRANSMIT_WRAP; uxTxBufferIndex = 0; } else { - xTxDescriptors[ uxTxBufferIndex ].U_Status.status = ( ulLengthToSend & ( unsigned portLONG ) AT91C_LENGTH_FRAME ) + xTxDescriptors[ uxTxBufferIndex ].U_Status.status = ( ulLengthToSend & ( unsigned long ) AT91C_LENGTH_FRAME ) | ulLastBuffer; uxTxBufferIndex++; } @@ -320,9 +321,9 @@ unsigned portLONG ulLastBuffer, ulDataBuffered = 0, ulDataRemainingToSend, ulLen /*-----------------------------------------------------------*/ /* See the header file for descriptions of public functions. */ -unsigned portLONG ulEMACInputLength( void ) +unsigned long ulEMACInputLength( void ) { -register unsigned portLONG ulIndex, ulLength = 0; +register unsigned long ulIndex, ulLength = 0; /* Skip any fragments. We are looking for the first buffer that contains data and has the SOF (start of frame) bit set. */ @@ -361,11 +362,11 @@ register unsigned portLONG ulIndex, ulLength = 0; /*-----------------------------------------------------------*/ /* See the header file for descriptions of public functions. */ -void vEMACRead( portCHAR *pcTo, unsigned portLONG ulSectionLength, unsigned portLONG ulTotalFrameLength ) +void vEMACRead( char *pcTo, unsigned long ulSectionLength, unsigned long ulTotalFrameLength ) { -static unsigned portLONG ulSectionBytesReadSoFar = 0, ulBufferPosition = 0, ulFameBytesReadSoFar = 0; -static portCHAR *pcSource; -register unsigned portLONG ulBytesRemainingInBuffer, ulRemainingSectionBytes; +static unsigned long ulSectionBytesReadSoFar = 0, ulBufferPosition = 0, ulFameBytesReadSoFar = 0; +static char *pcSource; +register unsigned long ulBytesRemainingInBuffer, ulRemainingSectionBytes; /* Read ulSectionLength bytes from the Rx buffers. This is not necessarily any correspondence between the length of our Rx buffers, and the length of the @@ -390,9 +391,9 @@ register unsigned portLONG ulBytesRemainingInBuffer, ulRemainingSectionBytes; than one buffer. */ /* Reset our state variables ready for the next read from this buffer. */ - pcSource = ( portCHAR * )( xRxDescriptors[ ulNextRxBuffer ].addr & emacADDRESS_MASK ); - ulFameBytesReadSoFar = ( unsigned portLONG ) 0; - ulBufferPosition = ( unsigned portLONG ) 0; + pcSource = ( char * )( xRxDescriptors[ ulNextRxBuffer ].addr & emacADDRESS_MASK ); + ulFameBytesReadSoFar = ( unsigned long ) 0; + ulBufferPosition = ( unsigned long ) 0; } else { @@ -425,12 +426,12 @@ register unsigned portLONG ulBytesRemainingInBuffer, ulRemainingSectionBytes; ulNextRxBuffer++; if( ulNextRxBuffer >= NB_RX_BUFFERS ) { - ulNextRxBuffer = ( unsigned portLONG ) 0; + ulNextRxBuffer = ( unsigned long ) 0; } /* Reset the variables for the new buffer. */ - pcSource = ( portCHAR * )( xRxDescriptors[ ulNextRxBuffer ].addr & emacADDRESS_MASK ); - ulBufferPosition = ( unsigned portLONG ) 0; + pcSource = ( char * )( xRxDescriptors[ ulNextRxBuffer ].addr & emacADDRESS_MASK ); + ulBufferPosition = ( unsigned long ) 0; } else { @@ -457,7 +458,7 @@ register unsigned portLONG ulBytesRemainingInBuffer, ulRemainingSectionBytes; ulNextRxBuffer = 0; } - pcSource = ( portCHAR * )( xRxDescriptors[ ulNextRxBuffer ].addr & emacADDRESS_MASK ); + pcSource = ( char * )( xRxDescriptors[ ulNextRxBuffer ].addr & emacADDRESS_MASK ); ulBufferPosition = 0; } } @@ -514,7 +515,7 @@ xSemaphoreHandle xEMACInit( void ) /* PHY configuration. */ #if USE_RMII_INTERFACE != 1 { - unsigned portLONG ulControl; + unsigned long ulControl; /* PHY has internal pull down : disable MII isolate. */ vReadPHY( AT91C_PHY_ADDR, MII_BMCR, &ulControl ); @@ -600,13 +601,13 @@ static unsigned portBASE_TYPE uxNextBufferToClear = 0; static void prvSetupDescriptors(void) { unsigned portBASE_TYPE xIndex; -unsigned portLONG ulAddress; +unsigned long ulAddress; /* Initialise xRxDescriptors descriptor. */ for( xIndex = 0; xIndex < NB_RX_BUFFERS; ++xIndex ) { /* Calculate the address of the nth buffer within the array. */ - ulAddress = ( unsigned portLONG )( pcRxBuffer + ( xIndex * ETH_RX_BUFFER_SIZE ) ); + ulAddress = ( unsigned long )( pcRxBuffer + ( xIndex * ETH_RX_BUFFER_SIZE ) ); /* Write the buffer address into the descriptor. The DMA will place the data at this address when this descriptor is being used. Mask off @@ -622,7 +623,7 @@ unsigned portLONG ulAddress; for( xIndex = 0; xIndex < NB_TX_BUFFERS; ++xIndex ) { /* Calculate the address of the nth buffer within the array. */ - ulAddress = ( unsigned portLONG )( pcTxBuffer + ( xIndex * ETH_TX_BUFFER_SIZE ) ); + ulAddress = ( unsigned long )( pcTxBuffer + ( xIndex * ETH_TX_BUFFER_SIZE ) ); /* Write the buffer address into the descriptor. The DMA will read data from here when the descriptor is being used. */ @@ -635,8 +636,8 @@ unsigned portLONG ulAddress; xTxDescriptors[ NB_TX_BUFFERS - 1 ].U_Status.status = AT91C_TRANSMIT_WRAP | AT91C_TRANSMIT_OK; /* Tell the EMAC where to find the descriptors. */ - AT91C_BASE_EMAC->EMAC_RBQP = ( unsigned portLONG ) xRxDescriptors; - AT91C_BASE_EMAC->EMAC_TBQP = ( unsigned portLONG ) xTxDescriptors; + AT91C_BASE_EMAC->EMAC_RBQP = ( unsigned long ) xRxDescriptors; + AT91C_BASE_EMAC->EMAC_TBQP = ( unsigned long ) xTxDescriptors; /* Clear all the bits in the receive status register. */ AT91C_BASE_EMAC->EMAC_RSR = ( AT91C_EMAC_OVR | AT91C_EMAC_REC | AT91C_EMAC_BNA ); @@ -653,12 +654,12 @@ unsigned portLONG ulAddress; static void prvSetupMACAddress( void ) { /* Must be written SA1L then SA1H. */ - AT91C_BASE_EMAC->EMAC_SA1L = ( ( unsigned portLONG ) cMACAddress[ 3 ] << 24 ) | - ( ( unsigned portLONG ) cMACAddress[ 2 ] << 16 ) | - ( ( unsigned portLONG ) cMACAddress[ 1 ] << 8 ) | + AT91C_BASE_EMAC->EMAC_SA1L = ( ( unsigned long ) cMACAddress[ 3 ] << 24 ) | + ( ( unsigned long ) cMACAddress[ 2 ] << 16 ) | + ( ( unsigned long ) cMACAddress[ 1 ] << 8 ) | cMACAddress[ 0 ]; - AT91C_BASE_EMAC->EMAC_SA1H = ( ( unsigned portLONG ) cMACAddress[ 5 ] << 8 ) | + AT91C_BASE_EMAC->EMAC_SA1H = ( ( unsigned long ) cMACAddress[ 5 ] << 8 ) | cMACAddress[ 4 ]; } /*-----------------------------------------------------------*/ @@ -697,7 +698,7 @@ static void prvSetupEMACInterrupt( void ) static portBASE_TYPE prvProbePHY( void ) { -unsigned portLONG ulPHYId1, ulPHYId2, ulStatus; +unsigned long ulPHYId1, ulPHYId2, ulStatus; portBASE_TYPE xReturn = pdPASS; /* Code supplied by Atmel (reformatted) -----------------*/ @@ -740,7 +741,7 @@ portBASE_TYPE xReturn = pdPASS; } /*-----------------------------------------------------------*/ -static void vReadPHY( unsigned portCHAR ucPHYAddress, unsigned portCHAR ucAddress, unsigned portLONG *pulValue ) +static void vReadPHY( unsigned char ucPHYAddress, unsigned char ucAddress, unsigned long *pulValue ) { /* Code supplied by Atmel (reformatted) ----------------------*/ @@ -762,7 +763,7 @@ static void vReadPHY( unsigned portCHAR ucPHYAddress, unsigned portCHAR ucAddres /*-----------------------------------------------------------*/ #if USE_RMII_INTERFACE != 1 -static void vWritePHY( unsigned portCHAR ucPHYAddress, unsigned portCHAR ucAddress, unsigned portLONG ulValue ) +static void vWritePHY( unsigned char ucPHYAddress, unsigned char ucAddress, unsigned long ulValue ) { /* Code supplied by Atmel (reformatted) ----------------------*/ @@ -785,7 +786,7 @@ static void vWritePHY( unsigned portCHAR ucPHYAddress, unsigned portCHAR ucAddre static portBASE_TYPE xGetLinkSpeed( void ) { - unsigned portLONG ulBMSR, ulBMCR, ulLPA, ulMACCfg, ulSpeed, ulDuplex; + unsigned long ulBMSR, ulBMCR, ulLPA, ulMACCfg, ulSpeed, ulDuplex; /* Code supplied by Atmel (reformatted) -----------------*/ diff --git a/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.h b/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.h index ed8991912..01ea9f4e8 100644 --- a/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.h +++ b/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC.h @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ /* @@ -95,7 +96,7 @@ xSemaphoreHandle xEMACInit( void ); * If lEndOfFrame is true then the data being copied is the end of the frame * and the frame can be transmitted. */ -portLONG lEMACSend( portCHAR *pcFrom, unsigned portLONG ulLength, portLONG lEndOfFrame ); +long lEMACSend( char *pcFrom, unsigned long ulLength, long lEndOfFrame ); /* * Frames can be read from the EMAC in multiple sections. @@ -104,7 +105,7 @@ portLONG lEMACSend( portCHAR *pcFrom, unsigned portLONG ulLength, portLONG lEndO * will be repetedly called until the sum of all the ulSectionLenths totals * the value of ulTotalFrameLength. */ -void vEMACRead( portCHAR *pcTo, unsigned portLONG ulSectionLength, unsigned portLONG ulTotalFrameLength ); +void vEMACRead( char *pcTo, unsigned long ulSectionLength, unsigned long ulTotalFrameLength ); /* * The EMAC driver and interrupt service routines are defined in different @@ -130,6 +131,6 @@ void vEMACWaitForInput( void ); /* * Return the length of the next frame in the receive buffers. */ -unsigned portLONG ulEMACInputLength( void ); +unsigned long ulEMACInputLength( void ); #endif diff --git a/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC_ISR.c b/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC_ISR.c index a331a0727..72f377534 100644 --- a/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC_ISR.c +++ b/Demo/lwIP_Demo_Rowley_ARM7/EMAC/SAM7_EMAC_ISR.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ @@ -71,7 +72,7 @@ void vEMACISR_Handler( void ); */ void vEMACISR_Handler( void ) { -volatile unsigned portLONG ulIntStatus, ulEventStatus; +volatile unsigned long ulIntStatus, ulEventStatus; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; extern void vClearEMACTxBuffer( void ); diff --git a/Demo/lwIP_Demo_Rowley_ARM7/FreeRTOSConfig.h b/Demo/lwIP_Demo_Rowley_ARM7/FreeRTOSConfig.h index 263da633e..e813fc9b3 100644 --- a/Demo/lwIP_Demo_Rowley_ARM7/FreeRTOSConfig.h +++ b/Demo/lwIP_Demo_Rowley_ARM7/FreeRTOSConfig.h @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ #ifndef FREERTOS_CONFIG_H @@ -67,10 +68,10 @@ #define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 -#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 47923200 ) +#define configCPU_CLOCK_HZ ( ( unsigned long ) 47923200 ) #define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 ) -#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 110 ) +#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 110 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) 22000 ) #define configMAX_TASK_NAME_LEN ( 16 ) #define configUSE_TRACE_FACILITY 1 diff --git a/Demo/lwIP_Demo_Rowley_ARM7/ParTest/ParTest.c b/Demo/lwIP_Demo_Rowley_ARM7/ParTest/ParTest.c index 1ff852838..4c20a85d7 100644 --- a/Demo/lwIP_Demo_Rowley_ARM7/ParTest/ParTest.c +++ b/Demo/lwIP_Demo_Rowley_ARM7/ParTest/ParTest.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ /* Scheduler includes. */ @@ -59,7 +60,7 @@ * Simple parallel port IO routines for the LED's. LED's can be set, cleared * or toggled. *-----------------------------------------------------------*/ -const unsigned portLONG ulLED_MASK[ NB_LED ]= { LED1, LED2, LED3, LED4 }; +const unsigned long ulLED_MASK[ NB_LED ]= { LED1, LED2, LED3, LED4 }; void vParTestInitialise( void ) { diff --git a/Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.c b/Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.c index 3013de033..f58211bc1 100644 --- a/Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.c +++ b/Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ /* @@ -99,7 +100,7 @@ static void prvHandleStandardEndPointRequest( xUSB_REQUEST *pxRequest ); static void prvHandleClassInterfaceRequest( xUSB_REQUEST *pxRequest ); /* Prepare control data transfer. prvSendNextSegment starts transfer. */ -static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT usRequestedLength, unsigned portLONG ulLengthLeftToSend, portLONG lSendingDescriptor ); +static void prvSendControlData( unsigned char *pucData, unsigned short usRequestedLength, unsigned long ulLengthLeftToSend, long lSendingDescriptor ); /* Send next segment of data for the control transfer */ static void prvSendNextSegment( void ); @@ -116,8 +117,8 @@ static void prvGetStandardInterfaceDescriptor( xUSB_REQUEST *pxRequest ); /*------------------------------------------------------------*/ /* File scope static variables */ -static unsigned portCHAR ucUSBConfig = ( unsigned portCHAR ) 0; -static unsigned portLONG ulReceivedAddress = ( unsigned portLONG ) 0; +static unsigned char ucUSBConfig = ( unsigned char ) 0; +static unsigned long ulReceivedAddress = ( unsigned long ) 0; static eDRIVER_STATE eDriverState = eNOTHING; /* Incoming and outgoing control data structures */ @@ -133,10 +134,10 @@ static xQueueHandle xRxCDC; static xQueueHandle xTxCDC; /* Line coding - 115,200 baud, N-8-1 */ -static const unsigned portCHAR pxLineCoding[] = { 0x00, 0xC2, 0x01, 0x00, 0x00, 0x00, 0x08 }; +static const unsigned char pxLineCoding[] = { 0x00, 0xC2, 0x01, 0x00, 0x00, 0x00, 0x08 }; /* Status variables. */ -static unsigned portCHAR ucControlState; +static unsigned char ucControlState; static unsigned int uiCurrentBank; @@ -146,9 +147,9 @@ static unsigned int uiCurrentBank; void vUSBCDCTask( void *pvParameters ) { xISRStatus *pxMessage; -unsigned portLONG ulStatus; -unsigned portLONG ulRxBytes; -unsigned portCHAR ucByte; +unsigned long ulStatus; +unsigned long ulRxBytes; +unsigned char ucByte; portBASE_TYPE xByte; ( void ) pvParameters; @@ -251,7 +252,7 @@ portBASE_TYPE xByte; } /*------------------------------------------------------------*/ -void vUSBSendByte( portCHAR cByte ) +void vUSBSendByte( char cByte ) { /* Queue the byte to be sent. The USB task will send it. */ xQueueSend( xTxCDC, &cByte, usbNO_BLOCK ); @@ -260,7 +261,7 @@ void vUSBSendByte( portCHAR cByte ) static void prvSendZLP( void ) { -unsigned portLONG ulStatus; +unsigned long ulStatus; /* Wait until the FIFO is free - even though we are not going to use it. THERE IS NO TIMEOUT HERE! */ @@ -285,7 +286,7 @@ unsigned portLONG ulStatus; static void prvSendStall( void ) { - unsigned portLONG ulStatus; + unsigned long ulStatus; portENTER_CRITICAL(); { @@ -300,14 +301,14 @@ static void prvSendStall( void ) static void prvResetEndPoints( void ) { -unsigned portLONG ulTemp; +unsigned long ulTemp; eDriverState = eJUST_RESET; ucControlState = 0; /* Reset all the end points. */ AT91C_BASE_UDP->UDP_RSTEP = usbEND_POINT_RESET_MASK; - AT91C_BASE_UDP->UDP_RSTEP = ( unsigned portLONG ) 0x00; + AT91C_BASE_UDP->UDP_RSTEP = ( unsigned long ) 0x00; /* Enable data to be sent and received. */ AT91C_BASE_UDP->UDP_FADDR = AT91C_UDP_FEN; @@ -316,7 +317,7 @@ unsigned portLONG ulTemp; portENTER_CRITICAL(); { ulTemp = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ]; - usbCSR_SET_BIT( &ulTemp, ( ( unsigned portLONG ) ( AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_CTRL ) ) ); + usbCSR_SET_BIT( &ulTemp, ( ( unsigned long ) ( AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_CTRL ) ) ); AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ] = ulTemp; AT91C_BASE_UDP->UDP_IER = AT91C_UDP_EPINT0; } @@ -328,7 +329,7 @@ unsigned portLONG ulTemp; static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage ) { static xUSB_REQUEST xRequest; -unsigned portLONG ulRxBytes; +unsigned long ulRxBytes; /* Get number of bytes received, if any */ ulRxBytes = pxMessage->ulCSR0 >> 16; @@ -351,7 +352,7 @@ unsigned portLONG ulRxBytes; /* Set up endpoints */ portENTER_CRITICAL(); { - unsigned portLONG ulTemp; + unsigned long ulTemp; /* Set endpoint 1 to bulk-out */ ulTemp = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_1 ]; @@ -377,7 +378,7 @@ unsigned portLONG ulRxBytes; { /* We sent an acknowledgement of a SET_ADDRESS request. Move to the addressed state. */ - if( ulReceivedAddress != ( unsigned portLONG ) 0 ) + if( ulReceivedAddress != ( unsigned long ) 0 ) { AT91C_BASE_UDP->UDP_GLBSTATE = AT91C_UDP_FADDEN; } @@ -400,7 +401,7 @@ unsigned portLONG ulRxBytes; if( pxMessage->ulCSR0 & AT91C_UDP_RX_DATA_BK0 ) { /* Received a control data packet. May be a 0-length ACK or a data stage. */ - unsigned portCHAR ucBytesToGet; + unsigned char ucBytesToGet; /* Got data. Cancel any outgoing data. */ pxControlTx.ulNextCharIndex = pxControlTx.ulTotalDataLength; @@ -470,7 +471,7 @@ unsigned portLONG ulRxBytes; if( ( pxMessage->ulCSR0 & ( AT91C_UDP_RX_DATA_BK0 | AT91C_UDP_RXSETUP ) ) && ( pxControlRx.ulNextCharIndex >= pxControlRx.ulTotalDataLength ) ) { - unsigned portCHAR ucRequest; + unsigned char ucRequest; /* Manipulate the ucRequestType and the ucRequest parameters to generate a zero based request selection. This is just done to @@ -515,11 +516,11 @@ static void prvGetStandardDeviceDescriptor( xUSB_REQUEST *pxRequest ) switch( ( pxRequest->usValue & 0xff00 ) >> 8 ) { case usbDESCRIPTOR_TYPE_DEVICE: - prvSendControlData( ( unsigned portCHAR * ) &pxDeviceDescriptor, pxRequest->usLength, sizeof( pxDeviceDescriptor ), pdTRUE ); + prvSendControlData( ( unsigned char * ) &pxDeviceDescriptor, pxRequest->usLength, sizeof( pxDeviceDescriptor ), pdTRUE ); break; case usbDESCRIPTOR_TYPE_CONFIGURATION: - prvSendControlData( ( unsigned portCHAR * ) &( pxConfigDescriptor ), pxRequest->usLength, sizeof( pxConfigDescriptor ), pdTRUE ); + prvSendControlData( ( unsigned char * ) &( pxConfigDescriptor ), pxRequest->usLength, sizeof( pxConfigDescriptor ), pdTRUE ); break; case usbDESCRIPTOR_TYPE_STRING: @@ -528,23 +529,23 @@ static void prvGetStandardDeviceDescriptor( xUSB_REQUEST *pxRequest ) switch( pxRequest->usValue & 0xff ) { case usbLANGUAGE_STRING: - prvSendControlData( ( unsigned portCHAR * ) &pxLanguageStringDescriptor, pxRequest->usLength, sizeof(pxLanguageStringDescriptor), pdTRUE ); + prvSendControlData( ( unsigned char * ) &pxLanguageStringDescriptor, pxRequest->usLength, sizeof(pxLanguageStringDescriptor), pdTRUE ); break; case usbMANUFACTURER_STRING: - prvSendControlData( ( unsigned portCHAR * ) &pxManufacturerStringDescriptor, pxRequest->usLength, sizeof( pxManufacturerStringDescriptor ), pdTRUE ); + prvSendControlData( ( unsigned char * ) &pxManufacturerStringDescriptor, pxRequest->usLength, sizeof( pxManufacturerStringDescriptor ), pdTRUE ); break; case usbPRODUCT_STRING: - prvSendControlData( ( unsigned portCHAR * ) &pxProductStringDescriptor, pxRequest->usLength, sizeof( pxProductStringDescriptor ), pdTRUE ); + prvSendControlData( ( unsigned char * ) &pxProductStringDescriptor, pxRequest->usLength, sizeof( pxProductStringDescriptor ), pdTRUE ); break; case usbCONFIGURATION_STRING: - prvSendControlData( ( unsigned portCHAR * ) &pxConfigurationStringDescriptor, pxRequest->usLength, sizeof( pxConfigurationStringDescriptor ), pdTRUE ); + prvSendControlData( ( unsigned char * ) &pxConfigurationStringDescriptor, pxRequest->usLength, sizeof( pxConfigurationStringDescriptor ), pdTRUE ); break; case usbINTERFACE_STRING: - prvSendControlData( ( unsigned portCHAR * ) &pxInterfaceStringDescriptor, pxRequest->usLength, sizeof( pxInterfaceStringDescriptor ), pdTRUE ); + prvSendControlData( ( unsigned char * ) &pxInterfaceStringDescriptor, pxRequest->usLength, sizeof( pxInterfaceStringDescriptor ), pdTRUE ); break; default: @@ -562,13 +563,13 @@ static void prvGetStandardDeviceDescriptor( xUSB_REQUEST *pxRequest ) static void prvHandleStandardDeviceRequest( xUSB_REQUEST *pxRequest ) { -unsigned portSHORT usStatus = 0; +unsigned short usStatus = 0; switch( pxRequest->ucRequest ) { case usbGET_STATUS_REQUEST: /* Just send two byte dummy status. */ - prvSendControlData( ( unsigned portCHAR * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE ); + prvSendControlData( ( unsigned char * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE ); break; case usbGET_DESCRIPTOR_REQUEST: @@ -578,7 +579,7 @@ unsigned portSHORT usStatus = 0; case usbGET_CONFIGURATION_REQUEST: /* Send selected device configuration */ - prvSendControlData( ( unsigned portCHAR * ) &ucUSBConfig, sizeof( ucUSBConfig ), sizeof( ucUSBConfig ), pdFALSE ); + prvSendControlData( ( unsigned char * ) &ucUSBConfig, sizeof( ucUSBConfig ), sizeof( ucUSBConfig ), pdFALSE ); break; case usbSET_FEATURE_REQUEST: @@ -589,12 +590,12 @@ unsigned portSHORT usStatus = 0; /* Get assigned address and send ack, but don't implement new address until we get a TXCOMP */ prvSendZLP(); eDriverState = eJUST_GOT_ADDRESS; - ulReceivedAddress = ( unsigned portLONG ) pxRequest->usValue; + ulReceivedAddress = ( unsigned long ) pxRequest->usValue; break; case usbSET_CONFIGURATION_REQUEST: /* Ack SET_CONFIGURATION request, but don't implement until TXCOMP */ - ucUSBConfig = ( unsigned portCHAR ) ( pxRequest->usValue & 0xff ); + ucUSBConfig = ( unsigned char ) ( pxRequest->usValue & 0xff ); eDriverState = eJUST_GOT_CONFIG; prvSendZLP(); break; @@ -627,7 +628,7 @@ static void prvHandleClassInterfaceRequest( xUSB_REQUEST *pxRequest ) case usbGET_LINE_CODING: /* Get line coding */ - prvSendControlData( (unsigned portCHAR *) &pxLineCoding, pxRequest->usLength, sizeof( pxLineCoding ), pdFALSE ); + prvSendControlData( (unsigned char *) &pxLineCoding, pxRequest->usLength, sizeof( pxLineCoding ), pdFALSE ); break; case usbSET_CONTROL_LINE_STATE: @@ -645,7 +646,7 @@ static void prvHandleClassInterfaceRequest( xUSB_REQUEST *pxRequest ) static void prvGetStandardInterfaceDescriptor( xUSB_REQUEST *pxRequest ) { - switch( ( pxRequest->usValue & ( unsigned portSHORT ) 0xff00 ) >> 8 ) + switch( ( pxRequest->usValue & ( unsigned short ) 0xff00 ) >> 8 ) { default: prvSendStall(); @@ -656,13 +657,13 @@ static void prvGetStandardInterfaceDescriptor( xUSB_REQUEST *pxRequest ) static void prvHandleStandardInterfaceRequest( xUSB_REQUEST *pxRequest ) { -unsigned portSHORT usStatus = 0; +unsigned short usStatus = 0; switch( pxRequest->ucRequest ) { case usbGET_STATUS_REQUEST: /* Send dummy 2 bytes. */ - prvSendControlData( ( unsigned portCHAR * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE ); + prvSendControlData( ( unsigned char * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE ); break; case usbGET_DESCRIPTOR_REQUEST: @@ -717,8 +718,8 @@ extern void ( vUSB_ISR_Wrapper )( void ); xUSBInterruptQueue = xQueueCreate( usbQUEUE_LENGTH + 1, sizeof( xISRStatus * ) ); /* Create the queues used to hold Rx and Tx characters. */ - xRxCDC = xQueueCreate( USB_CDC_QUEUE_SIZE, ( unsigned portCHAR ) sizeof( signed portCHAR ) ); - xTxCDC = xQueueCreate( USB_CDC_QUEUE_SIZE + 1, ( unsigned portCHAR ) sizeof( signed portCHAR ) ); + xRxCDC = xQueueCreate( USB_CDC_QUEUE_SIZE, ( unsigned char ) sizeof( signed char ) ); + xTxCDC = xQueueCreate( USB_CDC_QUEUE_SIZE + 1, ( unsigned char ) sizeof( signed char ) ); if( (!xUSBInterruptQueue) || (!xRxCDC) || (!xTxCDC) ) { @@ -727,9 +728,9 @@ extern void ( vUSB_ISR_Wrapper )( void ); } /* Initialise a few state variables. */ - pxControlTx.ulNextCharIndex = ( unsigned portLONG ) 0; - pxControlRx.ulNextCharIndex = ( unsigned portLONG ) 0; - ucUSBConfig = ( unsigned portCHAR ) 0; + pxControlTx.ulNextCharIndex = ( unsigned long ) 0; + pxControlRx.ulNextCharIndex = ( unsigned long ) 0; + ucUSBConfig = ( unsigned char ) 0; eDriverState = eNOTHING; ucControlState = 0; uiCurrentBank = AT91C_UDP_RX_DATA_BK0; @@ -757,12 +758,12 @@ extern void ( vUSB_ISR_Wrapper )( void ); /* When using the USB debugger the peripheral registers do not always get set to the correct default values. To make sure set the relevant registers manually here. */ - AT91C_BASE_UDP->UDP_IDR = ( unsigned portLONG ) 0xffffffff; - AT91C_BASE_UDP->UDP_ICR = ( unsigned portLONG ) 0xffffffff; - AT91C_BASE_UDP->UDP_CSR[ 0 ] = ( unsigned portLONG ) 0x00; - AT91C_BASE_UDP->UDP_CSR[ 1 ] = ( unsigned portLONG ) 0x00; - AT91C_BASE_UDP->UDP_CSR[ 2 ] = ( unsigned portLONG ) 0x00; - AT91C_BASE_UDP->UDP_CSR[ 3 ] = ( unsigned portLONG ) 0x00; + AT91C_BASE_UDP->UDP_IDR = ( unsigned long ) 0xffffffff; + AT91C_BASE_UDP->UDP_ICR = ( unsigned long ) 0xffffffff; + AT91C_BASE_UDP->UDP_CSR[ 0 ] = ( unsigned long ) 0x00; + AT91C_BASE_UDP->UDP_CSR[ 1 ] = ( unsigned long ) 0x00; + AT91C_BASE_UDP->UDP_CSR[ 2 ] = ( unsigned long ) 0x00; + AT91C_BASE_UDP->UDP_CSR[ 3 ] = ( unsigned long ) 0x00; AT91C_BASE_UDP->UDP_GLBSTATE = 0; AT91C_BASE_UDP->UDP_FADDR = 0; @@ -781,14 +782,14 @@ extern void ( vUSB_ISR_Wrapper )( void ); } /*-----------------------------------------------------------*/ -static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT usRequestedLength, unsigned portLONG ulLengthToSend, portLONG lSendingDescriptor ) +static void prvSendControlData( unsigned char *pucData, unsigned short usRequestedLength, unsigned long ulLengthToSend, long lSendingDescriptor ) { - if( ( ( unsigned portLONG ) usRequestedLength < ulLengthToSend ) ) + if( ( ( unsigned long ) usRequestedLength < ulLengthToSend ) ) { /* Cap the data length to that requested. */ - ulLengthToSend = ( unsigned portSHORT ) usRequestedLength; + ulLengthToSend = ( unsigned short ) usRequestedLength; } - else if( ( ulLengthToSend < ( unsigned portLONG ) usRequestedLength ) && lSendingDescriptor ) + else if( ( ulLengthToSend < ( unsigned long ) usRequestedLength ) && lSendingDescriptor ) { /* We are sending a descriptor. If the descriptor is an exact multiple of the FIFO length then it will have to be terminated @@ -810,7 +811,7 @@ static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT u /* Reinitialise the buffer index so we start sending from the start of the data. */ pxControlTx.ulTotalDataLength = ulLengthToSend; - pxControlTx.ulNextCharIndex = ( unsigned portLONG ) 0; + pxControlTx.ulNextCharIndex = ( unsigned long ) 0; /* Send the first 8 bytes now. The rest will get sent in response to TXCOMP interrupts. */ @@ -820,7 +821,7 @@ static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT u static void prvSendNextSegment( void ) { -volatile unsigned portLONG ulNextLength, ulStatus, ulLengthLeftToSend; +volatile unsigned long ulNextLength, ulStatus, ulLengthLeftToSend; /* Is there any data to send? */ if( pxControlTx.ulTotalDataLength > pxControlTx.ulNextCharIndex ) @@ -845,7 +846,7 @@ volatile unsigned portLONG ulNextLength, ulStatus, ulLengthLeftToSend; } /* Write the data to the FIFO. */ - while( ulNextLength > ( unsigned portLONG ) 0 ) + while( ulNextLength > ( unsigned long ) 0 ) { AT91C_BASE_UDP->UDP_FDR[ usbEND_POINT_0 ] = pxControlTx.ucBuffer[ pxControlTx.ulNextCharIndex ]; @@ -857,7 +858,7 @@ volatile unsigned portLONG ulNextLength, ulStatus, ulLengthLeftToSend; portENTER_CRITICAL(); { ulStatus = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ]; - usbCSR_SET_BIT( &ulStatus, ( ( unsigned portLONG ) 0x10 ) ); + usbCSR_SET_BIT( &ulStatus, ( ( unsigned long ) 0x10 ) ); AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ] = ulStatus; } portEXIT_CRITICAL(); diff --git a/Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.h b/Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.h index 5da571f8f..cc58821da 100644 --- a/Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.h +++ b/Demo/lwIP_Demo_Rowley_ARM7/USB/USB-CDC.h @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ #ifndef USB_CDC_H @@ -55,19 +56,19 @@ /* Structure used to take a snapshot of the USB status from within the ISR. */ typedef struct X_ISR_STATUS { - unsigned portLONG ulISR; - unsigned portLONG ulCSR0; - unsigned portCHAR ucFifoData[ 8 ]; + unsigned long ulISR; + unsigned long ulCSR0; + unsigned char ucFifoData[ 8 ]; } xISRStatus; /* Structure used to hold the received requests. */ typedef struct { - unsigned portCHAR ucReqType; - unsigned portCHAR ucRequest; - unsigned portSHORT usValue; - unsigned portSHORT usIndex; - unsigned portSHORT usLength; + unsigned char ucReqType; + unsigned char ucRequest; + unsigned short usValue; + unsigned short usIndex; + unsigned short usLength; } xUSB_REQUEST; typedef enum @@ -83,9 +84,9 @@ typedef enum /* Structure used to control the data being sent to the host. */ typedef struct { - unsigned portCHAR ucBuffer[ usbMAX_CONTROL_MESSAGE_SIZE ]; - unsigned portLONG ulNextCharIndex; - unsigned portLONG ulTotalDataLength; + unsigned char ucBuffer[ usbMAX_CONTROL_MESSAGE_SIZE ]; + unsigned long ulNextCharIndex; + unsigned long ulTotalDataLength; } xCONTROL_MESSAGE; /*-----------------------------------------------------------*/ @@ -93,7 +94,7 @@ void vUSBCDCTask( void *pvParameters ); /* Send cByte down the USB port. Characters are simply buffered and not sent unless the port is connected. */ -void vUSBSendByte( portCHAR cByte ); +void vUSBSendByte( char cByte ); #endif diff --git a/Demo/lwIP_Demo_Rowley_ARM7/USB/USBIsr.c b/Demo/lwIP_Demo_Rowley_ARM7/USB/USBIsr.c index da7110fb8..f9afb07a3 100644 --- a/Demo/lwIP_Demo_Rowley_ARM7/USB/USBIsr.c +++ b/Demo/lwIP_Demo_Rowley_ARM7/USB/USBIsr.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ @@ -84,10 +85,10 @@ void vUSB_ISR_Handler( void ); void vUSB_ISR_Handler( void ) { portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; -static volatile unsigned portLONG ulNextMessage = 0; +static volatile unsigned long ulNextMessage = 0; xISRStatus *pxMessage; -unsigned portLONG ulRxBytes; -unsigned portCHAR ucFifoIndex; +unsigned long ulRxBytes; +unsigned char ucFifoIndex; /* Use the next message from the array. */ pxMessage = &( xISRMessages[ ( ulNextMessage & usbQUEUE_LENGTH ) ] ); diff --git a/Demo/lwIP_Demo_Rowley_ARM7/USB/descriptors.h b/Demo/lwIP_Demo_Rowley_ARM7/USB/descriptors.h index 00776c4b6..6c7e31f1d 100644 --- a/Demo/lwIP_Demo_Rowley_ARM7/USB/descriptors.h +++ b/Demo/lwIP_Demo_Rowley_ARM7/USB/descriptors.h @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ /* @@ -59,14 +60,14 @@ These take the form: } */ -const portCHAR pxLanguageStringDescriptor[] = +const char pxLanguageStringDescriptor[] = { 4, usbDESCRIPTOR_TYPE_STRING, 0x09, 0x04 }; -const portCHAR pxManufacturerStringDescriptor[] = +const char pxManufacturerStringDescriptor[] = { 18, usbDESCRIPTOR_TYPE_STRING, @@ -74,7 +75,7 @@ const portCHAR pxManufacturerStringDescriptor[] = 'F', 0x00, 'r', 0x00, 'e', 0x00, 'e', 0x00, 'R', 0x00, 'T', 0x00, 'O', 0x00, 'S', 0x00 }; -const portCHAR pxProductStringDescriptor[] = +const char pxProductStringDescriptor[] = { 36, usbDESCRIPTOR_TYPE_STRING, @@ -83,7 +84,7 @@ const portCHAR pxProductStringDescriptor[] = 'C', 0x00, ' ', 0x00, 'D', 0x00, 'E', 0x00, 'M', 0x00, 'O', 0x00 }; -const portCHAR pxConfigurationStringDescriptor[] = +const char pxConfigurationStringDescriptor[] = { 38, usbDESCRIPTOR_TYPE_STRING, @@ -92,7 +93,7 @@ const portCHAR pxConfigurationStringDescriptor[] = 'o', 0x00, 'n', 0x00, ' ', 0x00, 'N', 0x00, 'a', 0x00, 'm', 0x00, 'e', 0x00 }; -const portCHAR pxInterfaceStringDescriptor[] = +const char pxInterfaceStringDescriptor[] = { 30, usbDESCRIPTOR_TYPE_STRING, diff --git a/Demo/lwIP_Demo_Rowley_ARM7/USB/usb.h b/Demo/lwIP_Demo_Rowley_ARM7/USB/usb.h index 2a4a858cf..ad630ed6c 100644 --- a/Demo/lwIP_Demo_Rowley_ARM7/USB/usb.h +++ b/Demo/lwIP_Demo_Rowley_ARM7/USB/usb.h @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ /* Descriptor type definitions. */ @@ -100,20 +101,20 @@ /* Misc application definitions. */ #define usbINTERRUPT_PRIORITY ( 3 ) #define usbQUEUE_LENGTH ( 0x3 ) /* Must have all bits set! */ -#define usbFIFO_LENGTH ( ( unsigned portLONG ) 8 ) +#define usbFIFO_LENGTH ( ( unsigned long ) 8 ) #define usbEND_POINT_0 ( 0 ) #define usbEND_POINT_1 ( 1 ) #define usbEND_POINT_2 ( 2 ) #define usbEND_POINT_3 ( 3 ) #define usbMAX_CONTROL_MESSAGE_SIZE ( 128 ) -#define usbRX_COUNT_MASK ( ( unsigned portLONG ) 0x7ff ) +#define usbRX_COUNT_MASK ( ( unsigned long ) 0x7ff ) #define AT91C_UDP_STALLSENT AT91C_UDP_ISOERROR #define usbSHORTEST_DELAY ( ( portTickType ) 1 ) #define usbINIT_DELAY ( ( portTickType ) 1000 / portTICK_RATE_MS ) #define usbSHORT_DELAY ( ( portTickType ) 50 / portTICK_RATE_MS ) -#define usbEND_POINT_RESET_MASK ( ( unsigned portLONG ) 0x0f ) -#define usbDATA_INC ( ( portCHAR ) 5 ) -#define usbEXPECTED_NUMBER_OF_BYTES ( ( unsigned portLONG ) 8 ) +#define usbEND_POINT_RESET_MASK ( ( unsigned long ) 0x0f ) +#define usbDATA_INC ( ( char ) 5 ) +#define usbEXPECTED_NUMBER_OF_BYTES ( ( unsigned long ) 8 ) /* Control request types. */ #define usbSTANDARD_DEVICE_REQUEST ( 0 ) @@ -133,14 +134,14 @@ unchanged by writing with a 1. */ /* Set TXCOMP, RX_DATA_BK0, RXSETUP, */ \ /* STALLSENT and RX_DATA_BK1 to 1 so the */ \ /* write has no effect. */ \ - ( * ( ( unsigned portLONG * ) pulValueNow ) ) |= ( unsigned portLONG ) 0x4f; \ + ( * ( ( unsigned long * ) pulValueNow ) ) |= ( unsigned long ) 0x4f; \ \ /* Clear the FORCE_STALL and TXPKTRDY bits */ \ /* so the write has no effect. */ \ - ( * ( ( unsigned portLONG * ) pulValueNow ) ) &= ( unsigned portLONG ) 0xffffffcf; \ + ( * ( ( unsigned long * ) pulValueNow ) ) &= ( unsigned long ) 0xffffffcf; \ \ /* Set whichever bit we want set. */ \ - ( * ( ( unsigned portLONG * ) pulValueNow ) ) |= ( ulBit ); \ + ( * ( ( unsigned long * ) pulValueNow ) ) |= ( ulBit ); \ } #define usbCSR_CLEAR_BIT( pulValueNow, ulBit ) \ @@ -148,12 +149,12 @@ unchanged by writing with a 1. */ /* Set TXCOMP, RX_DATA_BK0, RXSETUP, */ \ /* STALLSENT and RX_DATA_BK1 to 1 so the */ \ /* write has no effect. */ \ - ( * ( ( unsigned portLONG * ) pulValueNow ) ) |= ( unsigned portLONG ) 0x4f; \ + ( * ( ( unsigned long * ) pulValueNow ) ) |= ( unsigned long ) 0x4f; \ \ /* Clear the FORCE_STALL and TXPKTRDY bits */ \ /* so the write has no effect. */ \ - ( * ( ( unsigned portLONG * ) pulValueNow ) ) &= ( unsigned portLONG ) 0xffffffcf; \ + ( * ( ( unsigned long * ) pulValueNow ) ) &= ( unsigned long ) 0xffffffcf; \ \ /* Clear whichever bit we want clear. */ \ - ( * ( ( unsigned portLONG * ) pulValueNow ) ) &= ( ~ulBit ); \ + ( * ( ( unsigned long * ) pulValueNow ) ) &= ( ~ulBit ); \ } diff --git a/Demo/lwIP_Demo_Rowley_ARM7/lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X/sys_arch.c b/Demo/lwIP_Demo_Rowley_ARM7/lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X/sys_arch.c index a48fa78f9..4d39c37cd 100644 --- a/Demo/lwIP_Demo_Rowley_ARM7/lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X/sys_arch.c +++ b/Demo/lwIP_Demo_Rowley_ARM7/lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X/sys_arch.c @@ -38,7 +38,7 @@ /* Message queue constants. */ #define archMESG_QUEUE_LENGTH ( 6 ) -#define archPOST_BLOCK_TIME_MS ( ( unsigned portLONG ) 10000 ) +#define archPOST_BLOCK_TIME_MS ( ( unsigned long ) 10000 ) struct timeoutlist { @@ -330,12 +330,12 @@ static int iCall = 0; if( iCall == 0 ) { /* The first time this is called we are creating the lwIP handler. */ - result = xTaskCreate( thread, ( signed portCHAR * ) "lwIP", lwipTCP_STACK_SIZE, arg, prio, &CreatedTask ); + result = xTaskCreate( thread, ( signed char * ) "lwIP", lwipTCP_STACK_SIZE, arg, prio, &CreatedTask ); iCall++; } else { - result = xTaskCreate( thread, ( signed portCHAR * ) "WEBSvr", lwipBASIC_SERVER_STACK_SIZE, arg, prio, &CreatedTask ); + result = xTaskCreate( thread, ( signed char * ) "WEBSvr", lwipBASIC_SERVER_STACK_SIZE, arg, prio, &CreatedTask ); } // For each task created, store the task handle (pid) in the timers array. diff --git a/Demo/lwIP_Demo_Rowley_ARM7/lwip-1.1.0/src/netif/ethernetif.c b/Demo/lwIP_Demo_Rowley_ARM7/lwip-1.1.0/src/netif/ethernetif.c index 7d4719ec9..90478a6ef 100644 --- a/Demo/lwIP_Demo_Rowley_ARM7/lwip-1.1.0/src/netif/ethernetif.c +++ b/Demo/lwIP_Demo_Rowley_ARM7/lwip-1.1.0/src/netif/ethernetif.c @@ -105,7 +105,7 @@ unsigned portBASE_TYPE uxPriority; vTaskPrioritySet( NULL, uxPriority ); /* Create the task that handles the EMAC. */ - xTaskCreate( ethernetif_input, ( signed portCHAR * ) "ETH_INT", netifINTERFACE_TASK_STACK_SIZE, NULL, netifINTERFACE_TASK_PRIORITY, NULL ); + xTaskCreate( ethernetif_input, ( signed char * ) "ETH_INT", netifINTERFACE_TASK_STACK_SIZE, NULL, netifINTERFACE_TASK_PRIORITY, NULL ); } /*-----------------------------------------------------------*/ diff --git a/Demo/lwIP_Demo_Rowley_ARM7/main.c b/Demo/lwIP_Demo_Rowley_ARM7/main.c index af660e0cc..4f77b432a 100644 --- a/Demo/lwIP_Demo_Rowley_ARM7/main.c +++ b/Demo/lwIP_Demo_Rowley_ARM7/main.c @@ -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 - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation and modified by the FreeRTOS exception. - **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 - source code for proprietary components outside of the FreeRTOS kernel. - Alternative commercial license and support terms are also available upon - request. See the licensing section of http://www.FreeRTOS.org for full - license details. + 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 + Free Software Foundation and modified by the FreeRTOS exception. + **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 + source code for proprietary components outside of the FreeRTOS kernel. + Alternative commercial license and support terms are also available upon + request. See the licensing section of http://www.FreeRTOS.org for full + license details. - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - 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 - Temple Place, Suite 330, Boston, MA 02111-1307 USA. + 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 + Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *************************************************************************** - * * - * Looking for a quick start? Then check out the FreeRTOS eBook! * - * See http://www.FreeRTOS.org/Documentation for details * - * * - *************************************************************************** + *************************************************************************** + * * + * The FreeRTOS eBook and reference manual are available to purchase for a * + * small fee. Help yourself get started quickly while also helping the * + * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * + * * + *************************************************************************** - 1 tab == 4 spaces! + 1 tab == 4 spaces! - Please ensure to read the configuration and relevant port sections of the - online documentation. + Please ensure to read the configuration and relevant port sections of the + online documentation. - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. */ /* @@ -137,7 +138,7 @@ error. */ * Checks that all the demo application tasks are still executing without error * - as described at the top of the file. */ -static portLONG prvCheckOtherTasksAreStillRunning( void ); +static long prvCheckOtherTasksAreStillRunning( void ); /* * The task that executes at the highest priority and calls @@ -176,7 +177,7 @@ int main( void ) sys_thread_new( vBasicWEBServer, ( void * ) NULL, mainWEBSERVER_PRIORITY ); /* Create the demo USB CDC task. */ - xTaskCreate( vUSBCDCTask, ( signed portCHAR * ) "USB", mainUSB_TASK_STACK, NULL, mainUSB_PRIORITY, NULL ); + xTaskCreate( vUSBCDCTask, ( signed char * ) "USB", mainUSB_TASK_STACK, NULL, mainUSB_PRIORITY, NULL ); /* Create the standard demo application tasks. */ vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); @@ -186,7 +187,7 @@ int main( void ) vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); /* Start the check task - which is defined in this file. */ - xTaskCreate( vErrorChecks, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( vErrorChecks, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Finally, start the scheduler. @@ -261,9 +262,9 @@ portTickType xLastWakeTime; } /*-----------------------------------------------------------*/ -static portLONG prvCheckOtherTasksAreStillRunning( void ) +static long prvCheckOtherTasksAreStillRunning( void ) { -portLONG lReturn = ( portLONG ) pdPASS; +long lReturn = ( long ) pdPASS; /* Check all the demo tasks (other than the flash tasks) to ensure that they are all still running, and that none of them have detected @@ -271,22 +272,22 @@ portLONG lReturn = ( portLONG ) pdPASS; if( xArePollingQueuesStillRunning() != pdTRUE ) { - lReturn = ( portLONG ) pdFAIL; + lReturn = ( long ) pdFAIL; } if( xAreSemaphoreTasksStillRunning() != pdTRUE ) { - lReturn = ( portLONG ) pdFAIL; + lReturn = ( long ) pdFAIL; } if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) { - lReturn = ( portLONG ) pdFAIL; + lReturn = ( long ) pdFAIL; } if( xAreBlockingQueuesStillRunning() != pdTRUE ) { - lReturn = ( portLONG ) pdFAIL; + lReturn = ( long ) pdFAIL; } return lReturn; @@ -296,7 +297,7 @@ portLONG lReturn = ( portLONG ) pdPASS; void vApplicationIdleHook( void ) { static portTickType xLastTx = 0; -portCHAR cTxByte; +char cTxByte; /* The idle hook simply sends a string of characters to the USB port. The characters will be buffered and sent once the port is connected. */ diff --git a/Demo/lwIP_Demo_Rowley_ARM7/makefile b/Demo/lwIP_Demo_Rowley_ARM7/makefile index 80f6e03f1..9c0236e2c 100644 --- a/Demo/lwIP_Demo_Rowley_ARM7/makefile +++ b/Demo/lwIP_Demo_Rowley_ARM7/makefile @@ -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 -# the terms of the GNU General Public License (version 2) as published by the -# Free Software Foundation and modified by the FreeRTOS exception. -# **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 -# source code for proprietary components outside of the FreeRTOS kernel. -# Alternative commercial license and support terms are also available upon -# request. See the licensing section of http://www.FreeRTOS.org for full -# license details. +# 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 +# Free Software Foundation and modified by the FreeRTOS exception. +# **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 +# source code for proprietary components outside of the FreeRTOS kernel. +# Alternative commercial license and support terms are also available upon +# request. See the licensing section of http://www.FreeRTOS.org for full +# license details. # -# FreeRTOS is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -# more details. +# FreeRTOS is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. # -# 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 -# Temple Place, Suite 330, Boston, MA 02111-1307 USA. +# 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 +# Temple Place, Suite 330, Boston, MA 02111-1307 USA. # # -# *************************************************************************** -# * * -# * Looking for a quick start? Then check out the FreeRTOS eBook! * -# * See http://www.FreeRTOS.org/Documentation for details * -# * * -# *************************************************************************** +# *************************************************************************** +# * * +# * The FreeRTOS eBook and reference manual are available to purchase for a * +# * small fee. Help yourself get started quickly while also helping the * +# * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details * +# * * +# *************************************************************************** # -# 1 tab == 4 spaces! +# 1 tab == 4 spaces! # -# Please ensure to read the configuration and relevant port sections of the -# online documentation. +# Please ensure to read the configuration and relevant port sections of the +# online documentation. # -# http://www.FreeRTOS.org - Documentation, latest information, license and -# contact details. +# http://www.FreeRTOS.org - Documentation, latest information, license and +# contact details. # -# http://www.SafeRTOS.com - A version that is certified for use in safety -# critical systems. +# http://www.SafeRTOS.com - A version that is certified for use in safety +# critical systems. # -# http://www.OpenRTOS.com - Commercial support, development, porting, -# licensing and training services. +# http://www.OpenRTOS.com - Commercial support, development, porting, +# licensing and training services. #*/ CC=arm-elf-gcc diff --git a/Demo/lwIP_MCF5235_GCC/FreeRTOSConfig.h b/Demo/lwIP_MCF5235_GCC/FreeRTOSConfig.h index c7267b298..ea471aa2c 100644 --- a/Demo/lwIP_MCF5235_GCC/FreeRTOSConfig.h +++ b/Demo/lwIP_MCF5235_GCC/FreeRTOSConfig.h @@ -69,10 +69,10 @@ #define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 -#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 25000000 ) +#define configCPU_CLOCK_HZ ( ( unsigned long ) 25000000 ) #define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 ) -#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 128 ) +#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 ) #define configMAX_TASK_NAME_LEN ( 16 ) #define configUSE_TRACE_FACILITY 1 #define configUSE_16_BIT_TICKS 0 diff --git a/Demo/lwIP_MCF5235_GCC/demo.c b/Demo/lwIP_MCF5235_GCC/demo.c index 47f0d9f56..f8371c309 100644 --- a/Demo/lwIP_MCF5235_GCC/demo.c +++ b/Demo/lwIP_MCF5235_GCC/demo.c @@ -80,7 +80,7 @@ #include "flop.h" /* ------------------------ Defines --------------------------------------- */ -#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 38400 ) +#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 38400 ) /* Priorities for the demo application tasks. */ #define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 ) @@ -96,7 +96,7 @@ #define mainCHECK_PERIOD ( ( portTickType ) 2000 / portTICK_RATE_MS ) /* Constants used by the vMemCheckTask() task. */ -#define mainCOUNT_INITIAL_VALUE ( ( unsigned portLONG ) 0 ) +#define mainCOUNT_INITIAL_VALUE ( ( unsigned long ) 0 ) #define mainNO_TASK ( 0 ) /* The size of the memory blocks allocated by the vMemCheckTask() task. */ @@ -109,7 +109,7 @@ xComPortHandle xSTDComPort = NULL; /* ------------------------ Static functions ------------------------------ */ static portTASK_FUNCTION( vErrorChecks, pvParameters ); -static portLONG prvCheckOtherTasksAreStillRunning( unsigned portLONG +static long prvCheckOtherTasksAreStillRunning( unsigned long ulMemCheckTaskCount ); static portTASK_FUNCTION( vMemCheckTask, pvParameters ); @@ -134,7 +134,7 @@ main( int argc, char *argv[] ) ( void )sys_thread_new( vBasicWEBServer, NULL, mainWEB_TASK_PRIORITY ); /* Start the check task - which is defined in this file. */ - xTaskCreate( vErrorChecks, ( signed portCHAR * )"Check", 512, NULL, + xTaskCreate( vErrorChecks, ( signed char * )"Check", 512, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Now all the tasks have been started - start the scheduler. */ vTaskStartScheduler( ); @@ -146,7 +146,7 @@ main( int argc, char *argv[] ) static portTASK_FUNCTION( vErrorChecks, pvParameters ) { - unsigned portLONG ulMemCheckTaskRunningCount; + unsigned long ulMemCheckTaskRunningCount; xTaskHandle xCreatedTask; /* The parameters are not used in this function. */ @@ -156,7 +156,7 @@ portTASK_FUNCTION( vErrorChecks, pvParameters ) { ulMemCheckTaskRunningCount = mainCOUNT_INITIAL_VALUE; xCreatedTask = mainNO_TASK; - if( xTaskCreate( vMemCheckTask, ( signed portCHAR * )"MEM", + if( xTaskCreate( vMemCheckTask, ( signed char * )"MEM", configMINIMAL_STACK_SIZE, ( void * )&ulMemCheckTaskRunningCount, tskIDLE_PRIORITY, &xCreatedTask ) != pdPASS ) { @@ -182,10 +182,10 @@ portTASK_FUNCTION( vErrorChecks, pvParameters ) } } -static portLONG -prvCheckOtherTasksAreStillRunning( unsigned portLONG ulMemCheckTaskCount ) +static long +prvCheckOtherTasksAreStillRunning( unsigned long ulMemCheckTaskCount ) { - portLONG lReturn = ( portLONG ) pdPASS; + long lReturn = ( long ) pdPASS; /* Check all the demo tasks (other than the flash tasks) to ensure * that they are all still running, and that none of them have detected @@ -193,27 +193,27 @@ prvCheckOtherTasksAreStillRunning( unsigned portLONG ulMemCheckTaskCount ) */ if( xAreIntegerMathsTaskStillRunning( ) != pdTRUE ) { - lReturn = ( portLONG ) pdFAIL; + lReturn = ( long ) pdFAIL; } if( xArePollingQueuesStillRunning( ) != pdTRUE ) { - lReturn = ( portLONG ) pdFAIL; + lReturn = ( long ) pdFAIL; } if( xAreSemaphoreTasksStillRunning( ) != pdTRUE ) { - lReturn = ( portLONG ) pdFAIL; + lReturn = ( long ) pdFAIL; } if( xAreDynamicPriorityTasksStillRunning( ) != pdTRUE ) { - lReturn = ( portLONG ) pdFAIL; + lReturn = ( long ) pdFAIL; } if( xAreBlockingQueuesStillRunning( ) != pdTRUE ) { - lReturn = ( portLONG ) pdFAIL; + lReturn = ( long ) pdFAIL; } if( ulMemCheckTaskCount == mainCOUNT_INITIAL_VALUE ) @@ -221,7 +221,7 @@ prvCheckOtherTasksAreStillRunning( unsigned portLONG ulMemCheckTaskCount ) /* The vMemCheckTask did not increment the counter - it must * have failed. */ - lReturn = ( portLONG ) pdFAIL; + lReturn = ( long ) pdFAIL; } return lReturn; } @@ -229,9 +229,9 @@ prvCheckOtherTasksAreStillRunning( unsigned portLONG ulMemCheckTaskCount ) static void vMemCheckTask( void *pvParameters ) { - unsigned portLONG *pulMemCheckTaskRunningCounter; + unsigned long *pulMemCheckTaskRunningCounter; void *pvMem1, *pvMem2, *pvMem3; - static portLONG lErrorOccurred = pdFALSE; + static long lErrorOccurred = pdFALSE; /* This task is dynamically created then deleted during each cycle of the vErrorChecks task to check the operation of the memory allocator. Each time @@ -244,7 +244,7 @@ vMemCheckTask( void *pvParameters ) pulMemCheckTaskRunningCounter is incremented each cycle to indicate to the vErrorChecks() task that this task is still executing without error. */ - pulMemCheckTaskRunningCounter = ( unsigned portLONG * )pvParameters; + pulMemCheckTaskRunningCounter = ( unsigned long * )pvParameters; for( ;; ) { diff --git a/Demo/lwIP_MCF5235_GCC/lwip/contrib/port/FreeRTOS/MCF5235/sys_arch.c b/Demo/lwIP_MCF5235_GCC/lwip/contrib/port/FreeRTOS/MCF5235/sys_arch.c index 218e91db0..2962864df 100644 --- a/Demo/lwIP_MCF5235_GCC/lwip/contrib/port/FreeRTOS/MCF5235/sys_arch.c +++ b/Demo/lwIP_MCF5235_GCC/lwip/contrib/port/FreeRTOS/MCF5235/sys_arch.c @@ -60,7 +60,7 @@ #define MS_TO_TICKS( ms ) \ ( portTickType )( ( portTickType ) ( ms ) / portTICK_RATE_MS ) #define TICKS_TO_MS( ticks ) \ - ( unsigned portLONG )( ( portTickType ) ( ticks ) * portTICK_RATE_MS ) + ( unsigned long )( ( portTickType ) ( ticks ) * portTICK_RATE_MS ) #define THREAD_STACK_SIZE ( 1024 ) #define THREAD_NAME "lwIP" diff --git a/Demo/lwIP_MCF5235_GCC/system/newlib.c b/Demo/lwIP_MCF5235_GCC/system/newlib.c index db2ba1776..422ad610c 100644 --- a/Demo/lwIP_MCF5235_GCC/system/newlib.c +++ b/Demo/lwIP_MCF5235_GCC/system/newlib.c @@ -62,8 +62,8 @@ /* ------------------------ Prototypes ------------------------------------ */ void vSerialPutStringNOISR( xComPortHandle pxPort, - const signed portCHAR * const pcString, - unsigned portSHORT usStringLength ); + const signed char * const pcString, + unsigned short usStringLength ); /* ------------------------ Start implementation -------------------------- */ void @@ -109,13 +109,13 @@ write( int fd, const void *buf, size_t nbytes ) { case STDERR_FILENO: vSerialPutStringNOISR( xSTDComPort, - ( const signed portCHAR * const )buf, - ( unsigned portSHORT )nbytes ); + ( const signed char * const )buf, + ( unsigned short )nbytes ); break; case STDOUT_FILENO: vSerialPutString( xSTDComPort, - ( const signed portCHAR * const)buf, - ( unsigned portSHORT )nbytes ); + ( const signed char * const)buf, + ( unsigned short )nbytes ); break; default: errno = EIO; diff --git a/Demo/lwIP_MCF5235_GCC/system/serial.c b/Demo/lwIP_MCF5235_GCC/system/serial.c index 0d79c5f6a..32edb346c 100644 --- a/Demo/lwIP_MCF5235_GCC/system/serial.c +++ b/Demo/lwIP_MCF5235_GCC/system/serial.c @@ -82,7 +82,7 @@ static xComPortIF_t xComPortIF[ COM_NIFACE ]; /* ------------------------ Begin implementation -------------------------- */ xComPortHandle -xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, +xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ) { extern void ( *__RAMVEC[] ) ( ); @@ -91,9 +91,9 @@ xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, /* Create the queues used to hold Rx and Tx characters. */ xComPortIF[ 0 ].xRXChars = - xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE )sizeof( signed portCHAR ) ); + xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE )sizeof( signed char ) ); xComPortIF[ 0 ].xTXChars = - xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE )sizeof( signed portCHAR ) ); + xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE )sizeof( signed char ) ); /* If the queues were created correctly then setup the serial port hardware. */ if( ( xComPortIF[ 0 ].xRXChars != 0 ) && ( xComPortIF[ 0 ].xTXChars != 0 ) ) @@ -144,7 +144,7 @@ xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, } signed portBASE_TYPE -xSerialGetChar( xComPortHandle pxPort, signed portCHAR * pcRxedChar, +xSerialGetChar( xComPortHandle pxPort, signed char * pcRxedChar, portTickType xBlockTime ) { int i; @@ -172,14 +172,14 @@ xSerialGetChar( xComPortHandle pxPort, signed portCHAR * pcRxedChar, } void -vSerialPutString( xComPortHandle pxPort, const signed portCHAR * - const pcString, unsigned portSHORT usStringLength ) +vSerialPutString( xComPortHandle pxPort, const signed char * + const pcString, unsigned short usStringLength ) { int i; - signed portCHAR *pChNext; + signed char *pChNext; /* Send each character in the string, one at a time. */ - pChNext = ( signed portCHAR * )pcString; + pChNext = ( signed char * )pcString; for( i = 0; i < usStringLength; i++ ) { /* Block until character has been transmitted. */ @@ -188,7 +188,7 @@ vSerialPutString( xComPortHandle pxPort, const signed portCHAR * } signed portBASE_TYPE -xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, +xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime ) { int i; @@ -218,7 +218,7 @@ xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, } signed portBASE_TYPE -xSerialPutCharNOISR( xComPortHandle pxPort, signed portCHAR cOutChar ) +xSerialPutCharNOISR( xComPortHandle pxPort, signed char cOutChar ) { int i; portBASE_TYPE xResult = pdFALSE; @@ -245,15 +245,15 @@ xSerialPutCharNOISR( xComPortHandle pxPort, signed portCHAR cOutChar ) } void -vSerialPutStringNOISR( xComPortHandle pxPort, const signed portCHAR * - const pcString, unsigned portSHORT usStringLength ) +vSerialPutStringNOISR( xComPortHandle pxPort, const signed char * + const pcString, unsigned short usStringLength ) { int i; - signed portCHAR *pChNext; + signed char *pChNext; portBASE_TYPE xOldIPL = portSET_IPL( portIPL_MAX ); /* Send each character in the string, one at a time. */ - pChNext = ( signed portCHAR * )pcString; + pChNext = ( signed char * )pcString; for( i = 0; i < usStringLength; i++ ) { /* Block until character has been transmitted. */ @@ -272,7 +272,7 @@ vSerialClose( xComPortHandle xPort ) void prvSerialISR( void ) { - static signed portCHAR cChar; + static signed char cChar; static portBASE_TYPE xHigherPriorityTaskWoken; /* We have to remvoe the effect of the GCC. Please note that the diff --git a/Demo/lwIP_MCF5235_GCC/web.c b/Demo/lwIP_MCF5235_GCC/web.c index 032fce496..87e88d03d 100644 --- a/Demo/lwIP_MCF5235_GCC/web.c +++ b/Demo/lwIP_MCF5235_GCC/web.c @@ -126,11 +126,11 @@ static void vProcessConnection( struct netconn *pxNetCon ); static void vProcessConnection( struct netconn *pxNetCon ) { - static portCHAR cDynamicPage[webMAX_PAGE_SIZE], cPageHits[11]; + static char cDynamicPage[webMAX_PAGE_SIZE], cPageHits[11]; struct netbuf *pxRxBuffer; - portCHAR *pcRxString; - unsigned portSHORT usLength; - static unsigned portLONG ulPageHits = 0; + char *pcRxString; + unsigned short usLength; + static unsigned long ulPageHits = 0; /* We expect to immediately get data. */ pxRxBuffer = netconn_recv( pxNetCon ); @@ -161,7 +161,7 @@ vProcessConnection( struct netconn *pxNetCon ) strcat( cDynamicPage, "

Task          State  Priority  Stack #
************************************************
" ); /* ... Then the list of tasks and their status... */ - vTaskList( ( signed portCHAR * )cDynamicPage + strlen( cDynamicPage ) ); + vTaskList( ( signed char * )cDynamicPage + strlen( cDynamicPage ) ); /* ... Finally the page footer. */ strcat( cDynamicPage, webHTML_END ); -- 2.39.5