mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 09:38:32 -04:00
Remove unnecessary use of portLONG, portCHAR and portSHORT.
Change version number in headers.
This commit is contained in:
parent
506dd1b7c8
commit
7f0c4ef656
123 changed files with 4610 additions and 4496 deletions
|
@ -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 1
|
||||
#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 ) 4 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 130 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24 * 1024 ) )
|
||||
#define configMAX_TASK_NAME_LEN ( 10 )
|
||||
#define configUSE_TRACE_FACILITY 1
|
||||
|
|
|
@ -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.
|
||||
#*/
|
||||
|
||||
|
||||
|
|
|
@ -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. */
|
||||
|
@ -58,7 +59,7 @@
|
|||
|
||||
#define partstNUM_LEDS ( 4 )
|
||||
#define partstALL_LEDS ( ulLED_Mask[ 0 ] | ulLED_Mask[ 1 ] | ulLED_Mask[ 2 ] | ulLED_Mask[ 3 ] )
|
||||
const unsigned portLONG ulLED_Mask[ partstNUM_LEDS ]= { (1<<19), (1<<20), (1<<21), (1<<22) };
|
||||
const unsigned long ulLED_Mask[ partstNUM_LEDS ]= { (1<<19), (1<<20), (1<<21), (1<<22) };
|
||||
|
||||
|
||||
void vParTestInitialise( void )
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -126,7 +127,7 @@ little odd. */
|
|||
|
||||
/* Misc application definitions. */
|
||||
#define usbINTERRUPT_PRIORITY ( 3 )
|
||||
#define usbFIFO_LENGTH ( ( unsigned portLONG ) 8 )
|
||||
#define usbFIFO_LENGTH ( ( unsigned long ) 8 )
|
||||
#define usbXUP ( 1 )
|
||||
#define usbXDOWN ( 2 )
|
||||
#define usbYUP ( 3 )
|
||||
|
@ -136,9 +137,9 @@ little odd. */
|
|||
#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 )
|
||||
|
@ -149,11 +150,11 @@ little odd. */
|
|||
/* 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
|
||||
|
@ -169,9 +170,9 @@ typedef enum
|
|||
/* Structure used to control the data being sent to the host. */
|
||||
typedef struct
|
||||
{
|
||||
unsigned portCHAR ucTxBuffer[ usbMAX_TX_MESSAGE_SIZE ];
|
||||
unsigned portLONG ulNextCharIndex;
|
||||
unsigned portLONG ulTotalDataLength;
|
||||
unsigned char ucTxBuffer[ usbMAX_TX_MESSAGE_SIZE ];
|
||||
unsigned long ulNextCharIndex;
|
||||
unsigned long ulTotalDataLength;
|
||||
} xTX_MESSAGE;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -244,7 +245,7 @@ static void prvHandleClassInterfaceRequest( xUSB_REQUEST *pxRequest );
|
|||
* in response to TXCOMP interrupts until the entire buffer has been
|
||||
* sent.
|
||||
*/
|
||||
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 );
|
||||
|
||||
/*
|
||||
* Examine the Tx buffer to see if there is any more data to be transmitted.
|
||||
|
@ -291,7 +292,7 @@ static void vUSBDemoTask( void *pvParameters );
|
|||
* Simple algorithm to ramp up the mouse cursor speed to make it easier to
|
||||
* use.
|
||||
*/
|
||||
static void prvControlCursorSpeed( signed portCHAR *cVal, unsigned portLONG ulInput, unsigned portLONG ulSwitch1, unsigned portLONG ulSwitch2 );
|
||||
static void prvControlCursorSpeed( signed char *cVal, unsigned long ulInput, unsigned long ulSwitch1, unsigned long ulSwitch2 );
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
|
@ -307,14 +308,14 @@ These take the form:
|
|||
Data
|
||||
}
|
||||
*/
|
||||
const portCHAR pxLanguageStringDescriptor[] =
|
||||
const char pxLanguageStringDescriptor[] =
|
||||
{
|
||||
4,
|
||||
usbDESCRIPTOR_TYPE_STRING,
|
||||
0x09, 0x04
|
||||
};
|
||||
|
||||
const portCHAR pxManufacturerStringDescriptor[] =
|
||||
const char pxManufacturerStringDescriptor[] =
|
||||
{
|
||||
18,
|
||||
usbDESCRIPTOR_TYPE_STRING,
|
||||
|
@ -329,7 +330,7 @@ const portCHAR pxManufacturerStringDescriptor[] =
|
|||
'S', 0x00
|
||||
};
|
||||
|
||||
const portCHAR pxProductStringDescriptor[] =
|
||||
const char pxProductStringDescriptor[] =
|
||||
{
|
||||
38,
|
||||
usbDESCRIPTOR_TYPE_STRING,
|
||||
|
@ -354,7 +355,7 @@ const portCHAR pxProductStringDescriptor[] =
|
|||
'e', 0x00
|
||||
};
|
||||
|
||||
const portCHAR pxConfigurationStringDescriptor[] =
|
||||
const char pxConfigurationStringDescriptor[] =
|
||||
{
|
||||
38,
|
||||
usbDESCRIPTOR_TYPE_STRING,
|
||||
|
@ -379,7 +380,7 @@ const portCHAR pxConfigurationStringDescriptor[] =
|
|||
'e', 0x00
|
||||
};
|
||||
|
||||
const portCHAR pxInterfaceStringDescriptor[] =
|
||||
const char pxInterfaceStringDescriptor[] =
|
||||
{
|
||||
30,
|
||||
usbDESCRIPTOR_TYPE_STRING,
|
||||
|
@ -401,7 +402,7 @@ const portCHAR pxInterfaceStringDescriptor[] =
|
|||
};
|
||||
|
||||
/* Enumeration descriptors. */
|
||||
const portCHAR pxReportDescriptor[] =
|
||||
const char pxReportDescriptor[] =
|
||||
{
|
||||
0x05, 0x01, /* USAGE_PAGE (Generic Desktop) */
|
||||
0x09, 0x02, /* USAGE (Mouse) */
|
||||
|
@ -496,8 +497,8 @@ const char pxConfigDescriptor[] = {
|
|||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* File scope state 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;
|
||||
|
||||
/* Structure used to control the characters being sent to the host. */
|
||||
|
@ -563,9 +564,9 @@ xISRStatus *pxMessage;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvControlCursorSpeed( signed portCHAR *cVal, unsigned portLONG ulInput, unsigned portLONG ulSwitch1, unsigned portLONG ulSwitch2 )
|
||||
static void prvControlCursorSpeed( signed char *cVal, unsigned long ulInput, unsigned long ulSwitch1, unsigned long ulSwitch2 )
|
||||
{
|
||||
const portCHAR cSpeed = 20;
|
||||
const char cSpeed = 20;
|
||||
|
||||
if( !( ulInput & ulSwitch1 ) )
|
||||
{
|
||||
|
@ -609,8 +610,8 @@ const portCHAR cSpeed = 20;
|
|||
static void prvTransmitSampleValues( void )
|
||||
{
|
||||
/* Variables to hold dummy x, y and z joystick axis data. */
|
||||
static signed portCHAR x = 0, y = 0, z = 0;
|
||||
unsigned portLONG ulStatus;
|
||||
static signed char x = 0, y = 0, z = 0;
|
||||
unsigned long ulStatus;
|
||||
|
||||
ulStatus = AT91C_BASE_PIOA->PIO_PDSR;
|
||||
|
||||
|
@ -642,7 +643,7 @@ unsigned portLONG ulStatus;
|
|||
|
||||
static void prvUSBTransmitNull( 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! */
|
||||
|
@ -669,7 +670,7 @@ unsigned portLONG ulStatus;
|
|||
|
||||
static void prvSendStall( void )
|
||||
{
|
||||
unsigned portLONG ulStatus;
|
||||
unsigned long ulStatus;
|
||||
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
|
@ -684,13 +685,13 @@ unsigned portLONG ulStatus;
|
|||
|
||||
static void prvResetEndPoints( void )
|
||||
{
|
||||
unsigned portLONG ulTemp;
|
||||
unsigned long ulTemp;
|
||||
|
||||
eDriverState = eJUST_RESET;
|
||||
|
||||
/* 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;
|
||||
|
@ -699,7 +700,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;
|
||||
}
|
||||
|
@ -731,7 +732,7 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
|
|||
/* Read the end point for data transfer. */
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
unsigned portLONG ulTemp;
|
||||
unsigned long ulTemp;
|
||||
|
||||
ulTemp = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_1 ];
|
||||
usbCSR_SET_BIT( &ulTemp, AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_INT_IN );
|
||||
|
@ -746,7 +747,7 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
|
|||
{
|
||||
/* 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;
|
||||
}
|
||||
|
@ -769,8 +770,8 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
|
|||
if( pxMessage->ulCSR0 & AT91C_UDP_RXSETUP )
|
||||
{
|
||||
xUSB_REQUEST xRequest;
|
||||
unsigned portCHAR ucRequest;
|
||||
unsigned portLONG ulRxBytes;
|
||||
unsigned char ucRequest;
|
||||
unsigned long ulRxBytes;
|
||||
|
||||
/* A data packet is available. */
|
||||
ulRxBytes = pxMessage->ulCSR0 >> 16;
|
||||
|
@ -840,11 +841,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:
|
||||
|
@ -853,23 +854,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:
|
||||
|
@ -890,13 +891,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:
|
||||
|
@ -906,7 +907,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:
|
||||
|
@ -921,7 +922,7 @@ unsigned portSHORT usStatus = 0;
|
|||
address and set our state so we know we have received the address. */
|
||||
prvUSBTransmitNull();
|
||||
eDriverState = eJUST_GOT_ADDRESS;
|
||||
ulReceivedAddress = ( unsigned portLONG ) pxRequest->usValue;
|
||||
ulReceivedAddress = ( unsigned long ) pxRequest->usValue;
|
||||
break;
|
||||
|
||||
case usbSET_CONFIGURATION_REQUEST:
|
||||
|
@ -930,7 +931,7 @@ unsigned portSHORT usStatus = 0;
|
|||
we cannot actually move to the configured state until we get a
|
||||
TXCOMP interrupt from this NULL packet. Therefore we just remember the
|
||||
config and set our state so we know we have received the go ahead. */
|
||||
ucUSBConfig = ( unsigned portCHAR ) ( pxRequest->usValue & 0xff );
|
||||
ucUSBConfig = ( unsigned char ) ( pxRequest->usValue & 0xff );
|
||||
eDriverState = eJUST_GOT_CONFIG;
|
||||
prvUSBTransmitNull();
|
||||
break;
|
||||
|
@ -968,10 +969,10 @@ 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 )
|
||||
{
|
||||
case usbHID_REPORT_DESCRIPTOR:
|
||||
prvSendControlData( ( unsigned portCHAR * ) pxReportDescriptor, pxRequest->usLength, sizeof( pxReportDescriptor ), pdTRUE );
|
||||
prvSendControlData( ( unsigned char * ) pxReportDescriptor, pxRequest->usLength, sizeof( pxReportDescriptor ), pdTRUE );
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -985,13 +986,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:
|
||||
|
@ -1028,11 +1029,11 @@ static void prvHandleStandardEndPointRequest( xUSB_REQUEST *pxRequest )
|
|||
|
||||
static void vInitUSBInterface( void )
|
||||
{
|
||||
volatile unsigned portLONG ulTemp;
|
||||
volatile unsigned long ulTemp;
|
||||
|
||||
/* Initialise a few state variables. */
|
||||
pxCharsForTx.ulNextCharIndex = ( unsigned portLONG ) 0;
|
||||
ucUSBConfig = ( unsigned portCHAR ) 0;
|
||||
pxCharsForTx.ulNextCharIndex = ( unsigned long ) 0;
|
||||
ucUSBConfig = ( unsigned char ) 0;
|
||||
eDriverState = eNOTHING;
|
||||
|
||||
/* HARDWARE SETUP */
|
||||
|
@ -1056,10 +1057,10 @@ volatile unsigned portLONG ulTemp;
|
|||
/* 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_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_GLBSTATE = 0;
|
||||
AT91C_BASE_UDP->UDP_FADDR = 0;
|
||||
|
||||
|
@ -1077,14 +1078,14 @@ volatile unsigned portLONG ulTemp;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
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
|
||||
|
@ -1106,7 +1107,7 @@ static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT u
|
|||
/* Reinitialise the buffer index so we start sending from the start of
|
||||
the data. */
|
||||
pxCharsForTx.ulTotalDataLength = ulLengthToSend;
|
||||
pxCharsForTx.ulNextCharIndex = ( unsigned portLONG ) 0;
|
||||
pxCharsForTx.ulNextCharIndex = ( unsigned long ) 0;
|
||||
|
||||
/* Send the first 8 bytes now. The rest will get sent in response to
|
||||
TXCOMP interrupts. */
|
||||
|
@ -1116,7 +1117,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( pxCharsForTx.ulTotalDataLength > pxCharsForTx.ulNextCharIndex )
|
||||
|
@ -1141,7 +1142,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 ] = pxCharsForTx.ucTxBuffer[ pxCharsForTx.ulNextCharIndex ];
|
||||
|
||||
|
@ -1153,7 +1154,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();
|
||||
|
|
|
@ -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_DEMO_H
|
||||
|
@ -54,15 +55,15 @@
|
|||
#define usbQUEUE_LENGTH ( 0x3 ) /* Must have all bits set! */
|
||||
#define usbEND_POINT_0 ( 0 )
|
||||
#define usbEND_POINT_1 ( 1 )
|
||||
#define usbRX_COUNT_MASK ( ( unsigned portLONG ) 0x7ff )
|
||||
#define usbRX_COUNT_MASK ( ( unsigned long ) 0x7ff )
|
||||
#define AT91C_UDP_STALLSENT AT91C_UDP_ISOERROR
|
||||
|
||||
/* 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;
|
||||
|
||||
/* Macros to manipulate the control and status registers. These registers
|
||||
|
@ -75,14 +76,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 ); \
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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. */
|
||||
|
@ -60,14 +61,14 @@
|
|||
/* 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 ); \
|
||||
}
|
||||
|
||||
|
||||
|
@ -98,9 +99,9 @@ extern xQueueHandle xUSBInterruptQueue;
|
|||
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 ulTemp, ulRxBytes;
|
||||
unsigned long ulTemp, ulRxBytes;
|
||||
|
||||
/* To reduce the amount of time spent in this interrupt it would be
|
||||
possible to defer the majority of this processing to an 'interrupt task',
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -181,15 +182,15 @@ static void prvSetupHardware( void )
|
|||
|
||||
void vApplicationTickHook( void )
|
||||
{
|
||||
static unsigned portLONG ulCallCount = 0, ulErrorFound = pdFALSE;
|
||||
static unsigned long ulCallCount = 0, ulErrorFound = pdFALSE;
|
||||
|
||||
/* The rate at which LED D4 will toggle if an error has been found in one or
|
||||
more of the standard demo tasks. */
|
||||
const unsigned portLONG ulErrorFlashRate = 500 / portTICK_RATE_MS;
|
||||
const unsigned long ulErrorFlashRate = 500 / portTICK_RATE_MS;
|
||||
|
||||
/* The rate at which LED D4 will toggle if no errors have been found in any
|
||||
of the standard demo tasks. */
|
||||
const unsigned portLONG ulNoErrorCheckRate = 5000 / portTICK_RATE_MS;
|
||||
const unsigned long ulNoErrorCheckRate = 5000 / portTICK_RATE_MS;
|
||||
|
||||
ulCallCount++;
|
||||
|
||||
|
|
|
@ -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 "FreeRTOS.h"
|
||||
|
@ -68,7 +69,7 @@ void vPassEMACSemaphore( xSemaphoreHandle xSemaphore )
|
|||
|
||||
void vEMACISR_Handler( void )
|
||||
{
|
||||
volatile unsigned portLONG ulIntStatus, ulRxStatus;
|
||||
volatile unsigned long ulIntStatus, ulRxStatus;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
ulIntStatus = AT91C_BASE_EMAC->EMAC_ISR;
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
|
@ -72,15 +73,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. */
|
||||
|
@ -92,31 +93,31 @@ one not be immediately available when trying to transmit a frame. */
|
|||
#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 )
|
||||
|
||||
/* 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 );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -144,9 +145,9 @@ 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 );
|
||||
#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
|
||||
static portBASE_TYPE xGetLinkSpeed( void );
|
||||
static portBASE_TYPE prvProbePHY( void );
|
||||
|
@ -156,12 +157,12 @@ static portBASE_TYPE prvProbePHY( void );
|
|||
/* Buffer written to by the EMAC DMA. Must be aligned as described by the
|
||||
comment above the emacADDRESS_MASK definition. */
|
||||
#pragma data_alignment=8
|
||||
static volatile portCHAR pcRxBuffer[ NB_RX_BUFFERS * ETH_RX_BUFFER_SIZE ];
|
||||
static volatile char pcRxBuffer[ NB_RX_BUFFERS * ETH_RX_BUFFER_SIZE ];
|
||||
|
||||
/* Buffer read by the EMAC DMA. Must be aligned as described by he comment
|
||||
above the emacADDRESS_MASK definition. */
|
||||
#pragma data_alignment=8
|
||||
static portCHAR pcTxBuffer[ NB_TX_BUFFERS * ETH_TX_BUFFER_SIZE ];
|
||||
static char pcTxBuffer[ NB_TX_BUFFERS * ETH_TX_BUFFER_SIZE ];
|
||||
|
||||
/* Descriptors used to communicate between the program and the EMAC peripheral.
|
||||
These descriptors hold the locations and state of the Rx and Tx buffers. */
|
||||
|
@ -169,7 +170,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 uIP setup. */
|
||||
const portCHAR cMACAddress[ 6 ] = { uipMAC_ADDR0, uipMAC_ADDR1, uipMAC_ADDR2, uipMAC_ADDR3, uipMAC_ADDR4, uipMAC_ADDR5 };
|
||||
const char cMACAddress[ 6 ] = { uipMAC_ADDR0, uipMAC_ADDR1, uipMAC_ADDR2, uipMAC_ADDR3, uipMAC_ADDR4, uipMAC_ADDR5 };
|
||||
const unsigned char ucIPAddress[ 4 ] = { uipIP_ADDR0, uipIP_ADDR1, uipIP_ADDR2, uipIP_ADDR3 };
|
||||
|
||||
/* The semaphore used by the EMAC ISR to wake the EMAC task. */
|
||||
|
@ -224,7 +225,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 );
|
||||
|
@ -270,12 +271,12 @@ xSemaphoreHandle xEMACInit( void )
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
portLONG lEMACSend( void )
|
||||
long lEMACSend( void )
|
||||
{
|
||||
static unsigned portBASE_TYPE uxTxBufferIndex = 0;
|
||||
portBASE_TYPE xWaitCycles = 0;
|
||||
portLONG lReturn = pdPASS;
|
||||
portCHAR *pcBuffer;
|
||||
long lReturn = pdPASS;
|
||||
char *pcBuffer;
|
||||
|
||||
/* Is a buffer available? */
|
||||
while( !( xTxDescriptors[ uxTxBufferIndex ].U_Status.status & AT91C_TRANSMIT_OK ) )
|
||||
|
@ -299,7 +300,7 @@ portCHAR *pcBuffer;
|
|||
if( lReturn == pdPASS )
|
||||
{
|
||||
/* Copy the headers into the Tx buffer. These will be in the uIP buffer. */
|
||||
pcBuffer = ( portCHAR * ) xTxDescriptors[ uxTxBufferIndex ].addr;
|
||||
pcBuffer = ( char * ) xTxDescriptors[ uxTxBufferIndex ].addr;
|
||||
memcpy( ( void * ) pcBuffer, ( void * ) uip_buf, emacTOTAL_FRAME_HEADER_SIZE );
|
||||
|
||||
/* If there is room, also copy in the application data if any. */
|
||||
|
@ -314,7 +315,7 @@ portCHAR *pcBuffer;
|
|||
if( uxTxBufferIndex >= ( NB_TX_BUFFERS - 1 ) )
|
||||
{
|
||||
/* Fill out the necessary in the descriptor to get the data sent. */
|
||||
xTxDescriptors[ uxTxBufferIndex ].U_Status.status = ( uip_len & ( unsigned portLONG ) AT91C_LENGTH_FRAME )
|
||||
xTxDescriptors[ uxTxBufferIndex ].U_Status.status = ( uip_len & ( unsigned long ) AT91C_LENGTH_FRAME )
|
||||
| AT91C_LAST_BUFFER
|
||||
| AT91C_TRANSMIT_WRAP;
|
||||
uxTxBufferIndex = 0;
|
||||
|
@ -322,7 +323,7 @@ portCHAR *pcBuffer;
|
|||
else
|
||||
{
|
||||
/* Fill out the necessary in the descriptor to get the data sent. */
|
||||
xTxDescriptors[ uxTxBufferIndex ].U_Status.status = ( uip_len & ( unsigned portLONG ) AT91C_LENGTH_FRAME )
|
||||
xTxDescriptors[ uxTxBufferIndex ].U_Status.status = ( uip_len & ( unsigned long ) AT91C_LENGTH_FRAME )
|
||||
| AT91C_LAST_BUFFER;
|
||||
uxTxBufferIndex++;
|
||||
}
|
||||
|
@ -336,11 +337,11 @@ portCHAR *pcBuffer;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
unsigned portLONG ulEMACPoll( void )
|
||||
unsigned long ulEMACPoll( void )
|
||||
{
|
||||
static unsigned portBASE_TYPE ulNextRxBuffer = 0;
|
||||
unsigned portLONG ulSectionLength = 0, ulLengthSoFar = 0, ulEOF = pdFALSE;
|
||||
portCHAR *pcSource;
|
||||
unsigned long ulSectionLength = 0, ulLengthSoFar = 0, ulEOF = pdFALSE;
|
||||
char *pcSource;
|
||||
|
||||
/* Skip any fragments. */
|
||||
while( ( xRxDescriptors[ ulNextRxBuffer ].addr & AT91C_OWNERSHIP_BIT ) && !( xRxDescriptors[ ulNextRxBuffer ].U_Status.status & AT91C_SOF ) )
|
||||
|
@ -358,7 +359,7 @@ portCHAR *pcSource;
|
|||
|
||||
while( ( xRxDescriptors[ ulNextRxBuffer ].addr & AT91C_OWNERSHIP_BIT ) && !ulSectionLength )
|
||||
{
|
||||
pcSource = ( portCHAR * )( xRxDescriptors[ ulNextRxBuffer ].addr & emacADDRESS_MASK );
|
||||
pcSource = ( char * )( xRxDescriptors[ ulNextRxBuffer ].addr & emacADDRESS_MASK );
|
||||
ulSectionLength = xRxDescriptors[ ulNextRxBuffer ].U_Status.status & emacRX_LENGTH_FRAME;
|
||||
|
||||
if( ulSectionLength == 0 )
|
||||
|
@ -417,13 +418,13 @@ portCHAR *pcSource;
|
|||
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
|
||||
|
@ -439,7 +440,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. */
|
||||
|
@ -452,8 +453,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 );
|
||||
|
@ -470,12 +471,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 ];
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -513,7 +514,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) -----------------*/
|
||||
|
@ -556,7 +557,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) ----------------------*/
|
||||
|
||||
|
@ -578,7 +579,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) ----------------------*/
|
||||
|
||||
|
@ -601,7 +602,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) -----------------*/
|
||||
|
||||
|
|
|
@ -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 SAM_7_EMAC_H
|
||||
|
@ -60,12 +61,12 @@ xSemaphoreHandle xEMACInit( void );
|
|||
* Send the current uIP buffer. This copies the uIP buffer to one of the
|
||||
* EMAC Tx buffers, then indicates to the EMAC that the buffer is ready.
|
||||
*/
|
||||
portLONG lEMACSend( void );
|
||||
long lEMACSend( void );
|
||||
|
||||
/*
|
||||
* Called in response to an EMAC Rx interrupt. Copies the received frame
|
||||
* into the uIP buffer.
|
||||
*/
|
||||
unsigned portLONG ulEMACPoll( void );
|
||||
unsigned long ulEMACPoll( void );
|
||||
|
||||
#endif
|
||||
|
|
|
@ -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 UIP_TASK_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue