/*\r
- FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.\r
+ FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.\r
\r
- This file is part of the FreeRTOS distribution.\r
+ This file is part of the FreeRTOS distribution.\r
\r
- FreeRTOS is free software; you can redistribute it and/or modify it under \r
- the terms of the GNU General Public License (version 2) as published by the \r
- Free Software Foundation and modified by the FreeRTOS exception.\r
- **NOTE** The exception to the GPL is included to allow you to distribute a\r
- combined work that includes FreeRTOS without being obliged to provide the \r
- source code for proprietary components outside of the FreeRTOS kernel. \r
- Alternative commercial license and support terms are also available upon \r
- request. See the licensing section of http://www.FreeRTOS.org for full \r
- license details.\r
+ FreeRTOS is free software; you can redistribute it and/or modify it under\r
+ the terms of the GNU General Public License (version 2) as published by the\r
+ Free Software Foundation and modified by the FreeRTOS exception.\r
+ **NOTE** The exception to the GPL is included to allow you to distribute a\r
+ combined work that includes FreeRTOS without being obliged to provide the\r
+ source code for proprietary components outside of the FreeRTOS kernel.\r
+ Alternative commercial license and support terms are also available upon\r
+ request. See the licensing section of http://www.FreeRTOS.org for full\r
+ license details.\r
\r
- FreeRTOS is distributed in the hope that it will be useful, but WITHOUT\r
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\r
- more details.\r
+ FreeRTOS is distributed in the hope that it will be useful, but WITHOUT\r
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\r
+ more details.\r
\r
- You should have received a copy of the GNU General Public License along\r
- with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59\r
- Temple Place, Suite 330, Boston, MA 02111-1307 USA.\r
+ You should have received a copy of the GNU General Public License along\r
+ with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59\r
+ Temple Place, Suite 330, Boston, MA 02111-1307 USA.\r
\r
\r
- ***************************************************************************\r
- * *\r
- * Looking for a quick start? Then check out the FreeRTOS eBook! *\r
- * See http://www.FreeRTOS.org/Documentation for details *\r
- * *\r
- ***************************************************************************\r
+ ***************************************************************************\r
+ * *\r
+ * The FreeRTOS eBook and reference manual are available to purchase for a *\r
+ * small fee. Help yourself get started quickly while also helping the *\r
+ * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *\r
+ * *\r
+ ***************************************************************************\r
\r
- 1 tab == 4 spaces!\r
+ 1 tab == 4 spaces!\r
\r
- Please ensure to read the configuration and relevant port sections of the\r
- online documentation.\r
+ Please ensure to read the configuration and relevant port sections of the\r
+ online documentation.\r
\r
- http://www.FreeRTOS.org - Documentation, latest information, license and\r
- contact details.\r
+ http://www.FreeRTOS.org - Documentation, latest information, license and\r
+ contact details.\r
\r
- http://www.SafeRTOS.com - A version that is certified for use in safety\r
- critical systems.\r
+ http://www.SafeRTOS.com - A version that is certified for use in safety\r
+ critical systems.\r
\r
- http://www.OpenRTOS.com - Commercial support, development, porting,\r
- licensing and training services.\r
+ http://www.OpenRTOS.com - Commercial support, development, porting,\r
+ licensing and training services.\r
*/\r
\r
/*\r
\r
/* Misc application definitions. */\r
#define usbINTERRUPT_PRIORITY ( 3 )\r
-#define usbFIFO_LENGTH ( ( unsigned portLONG ) 8 )\r
+#define usbFIFO_LENGTH ( ( unsigned long ) 8 )\r
#define usbXUP ( 1 )\r
#define usbXDOWN ( 2 )\r
#define usbYUP ( 3 )\r
#define usbSHORTEST_DELAY ( ( portTickType ) 1 )\r
#define usbINIT_DELAY ( ( portTickType ) 1000 / portTICK_RATE_MS )\r
#define usbSHORT_DELAY ( ( portTickType ) 50 / portTICK_RATE_MS )\r
-#define usbEND_POINT_RESET_MASK ( ( unsigned portLONG ) 0x0f )\r
-#define usbDATA_INC ( ( portCHAR ) 5 )\r
-#define usbEXPECTED_NUMBER_OF_BYTES ( ( unsigned portLONG ) 8 )\r
+#define usbEND_POINT_RESET_MASK ( ( unsigned long ) 0x0f )\r
+#define usbDATA_INC ( ( char ) 5 )\r
+#define usbEXPECTED_NUMBER_OF_BYTES ( ( unsigned long ) 8 )\r
\r
/* Control request types. */\r
#define usbSTANDARD_DEVICE_REQUEST ( 0 )\r
/* Structure used to hold the received requests. */\r
typedef struct \r
{\r
- unsigned portCHAR ucReqType;\r
- unsigned portCHAR ucRequest;\r
- unsigned portSHORT usValue;\r
- unsigned portSHORT usIndex;\r
- unsigned portSHORT usLength;\r
+ unsigned char ucReqType;\r
+ unsigned char ucRequest;\r
+ unsigned short usValue;\r
+ unsigned short usIndex;\r
+ unsigned short usLength;\r
} xUSB_REQUEST;\r
\r
typedef enum\r
/* Structure used to control the data being sent to the host. */\r
typedef struct\r
{\r
- unsigned portCHAR ucTxBuffer[ usbMAX_TX_MESSAGE_SIZE ];\r
- unsigned portLONG ulNextCharIndex;\r
- unsigned portLONG ulTotalDataLength;\r
+ unsigned char ucTxBuffer[ usbMAX_TX_MESSAGE_SIZE ];\r
+ unsigned long ulNextCharIndex;\r
+ unsigned long ulTotalDataLength;\r
} xTX_MESSAGE;\r
\r
/*-----------------------------------------------------------*/\r
* in response to TXCOMP interrupts until the entire buffer has been\r
* sent.\r
*/\r
-static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT usRequestedLength, unsigned portLONG ulLengthLeftToSend, portLONG lSendingDescriptor );\r
+static void prvSendControlData( unsigned char *pucData, unsigned short usRequestedLength, unsigned long ulLengthLeftToSend, long lSendingDescriptor );\r
\r
/*\r
* Examine the Tx buffer to see if there is any more data to be transmitted.\r
* Simple algorithm to ramp up the mouse cursor speed to make it easier to\r
* use.\r
*/\r
-static void prvControlCursorSpeed( signed portCHAR *cVal, unsigned portLONG ulInput, unsigned portLONG ulSwitch1, unsigned portLONG ulSwitch2 );\r
+static void prvControlCursorSpeed( signed char *cVal, unsigned long ulInput, unsigned long ulSwitch1, unsigned long ulSwitch2 );\r
/*-----------------------------------------------------------*/\r
\r
/*\r
Data\r
}\r
*/\r
-const portCHAR pxLanguageStringDescriptor[] =\r
+const char pxLanguageStringDescriptor[] =\r
{\r
4,\r
usbDESCRIPTOR_TYPE_STRING,\r
0x09, 0x04\r
};\r
\r
-const portCHAR pxManufacturerStringDescriptor[] = \r
+const char pxManufacturerStringDescriptor[] = \r
{\r
18,\r
usbDESCRIPTOR_TYPE_STRING,\r
'S', 0x00 \r
};\r
\r
-const portCHAR pxProductStringDescriptor[] = \r
+const char pxProductStringDescriptor[] = \r
{\r
38,\r
usbDESCRIPTOR_TYPE_STRING,\r
'e', 0x00\r
};\r
\r
-const portCHAR pxConfigurationStringDescriptor[] = \r
+const char pxConfigurationStringDescriptor[] = \r
{\r
38,\r
usbDESCRIPTOR_TYPE_STRING,\r
'e', 0x00\r
};\r
\r
-const portCHAR pxInterfaceStringDescriptor[] = \r
+const char pxInterfaceStringDescriptor[] = \r
{\r
30,\r
usbDESCRIPTOR_TYPE_STRING,\r
};\r
\r
/* Enumeration descriptors. */\r
-const portCHAR pxReportDescriptor[] =\r
+const char pxReportDescriptor[] =\r
{\r
0x05, 0x01, /* USAGE_PAGE (Generic Desktop) */\r
0x09, 0x02, /* USAGE (Mouse) */\r
/*-----------------------------------------------------------*/\r
\r
/* File scope state variables. */\r
-static unsigned portCHAR ucUSBConfig = ( unsigned portCHAR ) 0;\r
-static unsigned portLONG ulReceivedAddress = ( unsigned portLONG ) 0;\r
+static unsigned char ucUSBConfig = ( unsigned char ) 0;\r
+static unsigned long ulReceivedAddress = ( unsigned long ) 0;\r
static eDRIVER_STATE eDriverState = eNOTHING;\r
\r
/* Structure used to control the characters being sent to the host. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvControlCursorSpeed( signed portCHAR *cVal, unsigned portLONG ulInput, unsigned portLONG ulSwitch1, unsigned portLONG ulSwitch2 )\r
+static void prvControlCursorSpeed( signed char *cVal, unsigned long ulInput, unsigned long ulSwitch1, unsigned long ulSwitch2 )\r
{\r
-const portCHAR cSpeed = 20;\r
+const char cSpeed = 20;\r
\r
if( !( ulInput & ulSwitch1 ) )\r
{\r
static void prvTransmitSampleValues( void )\r
{\r
/* Variables to hold dummy x, y and z joystick axis data. */\r
-static signed portCHAR x = 0, y = 0, z = 0;\r
-unsigned portLONG ulStatus;\r
+static signed char x = 0, y = 0, z = 0;\r
+unsigned long ulStatus;\r
\r
ulStatus = AT91C_BASE_PIOA->PIO_PDSR;\r
\r
\r
static void prvUSBTransmitNull( void )\r
{\r
-unsigned portLONG ulStatus;\r
+unsigned long ulStatus;\r
\r
/* Wait until the FIFO is free - even though we are not going to use it.\r
THERE IS NO TIMEOUT HERE! */\r
\r
static void prvSendStall( void )\r
{\r
-unsigned portLONG ulStatus;\r
+unsigned long ulStatus;\r
\r
portENTER_CRITICAL();\r
{\r
\r
static void prvResetEndPoints( void )\r
{\r
-unsigned portLONG ulTemp;\r
+unsigned long ulTemp;\r
\r
eDriverState = eJUST_RESET;\r
\r
/* Reset all the end points. */\r
AT91C_BASE_UDP->UDP_RSTEP = usbEND_POINT_RESET_MASK;\r
- AT91C_BASE_UDP->UDP_RSTEP = ( unsigned portLONG ) 0x00;\r
+ AT91C_BASE_UDP->UDP_RSTEP = ( unsigned long ) 0x00;\r
\r
/* Enable data to be sent and received. */\r
AT91C_BASE_UDP->UDP_FADDR = AT91C_UDP_FEN;\r
portENTER_CRITICAL();\r
{\r
ulTemp = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ];\r
- usbCSR_SET_BIT( &ulTemp, ( ( unsigned portLONG ) ( AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_CTRL ) ) );\r
+ usbCSR_SET_BIT( &ulTemp, ( ( unsigned long ) ( AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_CTRL ) ) );\r
AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ] = ulTemp;\r
AT91C_BASE_UDP->UDP_IER = AT91C_UDP_EPINT0;\r
}\r
/* Read the end point for data transfer. */\r
portENTER_CRITICAL();\r
{\r
- unsigned portLONG ulTemp;\r
+ unsigned long ulTemp;\r
\r
ulTemp = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_1 ]; \r
usbCSR_SET_BIT( &ulTemp, AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_INT_IN );\r
{\r
/* We sent an acknowledgement of a SET_ADDRESS request. Move\r
to the addressed state. */\r
- if( ulReceivedAddress != ( unsigned portLONG ) 0 )\r
+ if( ulReceivedAddress != ( unsigned long ) 0 )\r
{ \r
AT91C_BASE_UDP->UDP_GLBSTATE = AT91C_UDP_FADDEN;\r
}\r
if( pxMessage->ulCSR0 & AT91C_UDP_RXSETUP )\r
{\r
xUSB_REQUEST xRequest;\r
- unsigned portCHAR ucRequest;\r
- unsigned portLONG ulRxBytes;\r
+ unsigned char ucRequest;\r
+ unsigned long ulRxBytes;\r
\r
/* A data packet is available. */ \r
ulRxBytes = pxMessage->ulCSR0 >> 16;\r
switch( ( pxRequest->usValue & 0xff00 ) >> 8 )\r
{\r
case usbDESCRIPTOR_TYPE_DEVICE:\r
- prvSendControlData( ( unsigned portCHAR * ) &pxDeviceDescriptor, pxRequest->usLength, sizeof( pxDeviceDescriptor ), pdTRUE );\r
+ prvSendControlData( ( unsigned char * ) &pxDeviceDescriptor, pxRequest->usLength, sizeof( pxDeviceDescriptor ), pdTRUE );\r
break;\r
\r
case usbDESCRIPTOR_TYPE_CONFIGURATION:\r
- prvSendControlData( ( unsigned portCHAR * ) &( pxConfigDescriptor ), pxRequest->usLength, sizeof( pxConfigDescriptor ), pdTRUE );\r
+ prvSendControlData( ( unsigned char * ) &( pxConfigDescriptor ), pxRequest->usLength, sizeof( pxConfigDescriptor ), pdTRUE );\r
break;\r
\r
case usbDESCRIPTOR_TYPE_STRING:\r
switch( pxRequest->usValue & 0xff )\r
{ \r
case usbLANGUAGE_STRING:\r
- prvSendControlData( ( unsigned portCHAR * ) &pxLanguageStringDescriptor, pxRequest->usLength, sizeof(pxLanguageStringDescriptor), pdTRUE );\r
+ prvSendControlData( ( unsigned char * ) &pxLanguageStringDescriptor, pxRequest->usLength, sizeof(pxLanguageStringDescriptor), pdTRUE );\r
break;\r
\r
case usbMANUFACTURER_STRING:\r
- prvSendControlData( ( unsigned portCHAR * ) &pxManufacturerStringDescriptor, pxRequest->usLength, sizeof( pxManufacturerStringDescriptor ), pdTRUE );\r
+ prvSendControlData( ( unsigned char * ) &pxManufacturerStringDescriptor, pxRequest->usLength, sizeof( pxManufacturerStringDescriptor ), pdTRUE );\r
break;\r
\r
case usbPRODUCT_STRING:\r
- prvSendControlData( ( unsigned portCHAR * ) &pxProductStringDescriptor, pxRequest->usLength, sizeof( pxProductStringDescriptor ), pdTRUE );\r
+ prvSendControlData( ( unsigned char * ) &pxProductStringDescriptor, pxRequest->usLength, sizeof( pxProductStringDescriptor ), pdTRUE );\r
break;\r
\r
case usbCONFIGURATION_STRING:\r
- prvSendControlData( ( unsigned portCHAR * ) &pxConfigurationStringDescriptor, pxRequest->usLength, sizeof( pxConfigurationStringDescriptor ), pdTRUE );\r
+ prvSendControlData( ( unsigned char * ) &pxConfigurationStringDescriptor, pxRequest->usLength, sizeof( pxConfigurationStringDescriptor ), pdTRUE );\r
break;\r
\r
case usbINTERFACE_STRING:\r
- prvSendControlData( ( unsigned portCHAR * ) &pxInterfaceStringDescriptor, pxRequest->usLength, sizeof( pxInterfaceStringDescriptor ), pdTRUE );\r
+ prvSendControlData( ( unsigned char * ) &pxInterfaceStringDescriptor, pxRequest->usLength, sizeof( pxInterfaceStringDescriptor ), pdTRUE );\r
break;\r
\r
default:\r
\r
static void prvHandleStandardDeviceRequest( xUSB_REQUEST *pxRequest )\r
{\r
-unsigned portSHORT usStatus = 0;\r
+unsigned short usStatus = 0;\r
\r
switch( pxRequest->ucRequest )\r
{\r
case usbGET_STATUS_REQUEST:\r
/* Just send two byte dummy status. */\r
- prvSendControlData( ( unsigned portCHAR * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE );\r
+ prvSendControlData( ( unsigned char * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE );\r
break;\r
\r
case usbGET_DESCRIPTOR_REQUEST:\r
\r
case usbGET_CONFIGURATION_REQUEST:\r
/* Send selected device configuration */\r
- prvSendControlData( ( unsigned portCHAR * ) &ucUSBConfig, sizeof( ucUSBConfig ), sizeof( ucUSBConfig ), pdFALSE );\r
+ prvSendControlData( ( unsigned char * ) &ucUSBConfig, sizeof( ucUSBConfig ), sizeof( ucUSBConfig ), pdFALSE );\r
break;\r
\r
case usbSET_FEATURE_REQUEST:\r
address and set our state so we know we have received the address. */\r
prvUSBTransmitNull(); \r
eDriverState = eJUST_GOT_ADDRESS; \r
- ulReceivedAddress = ( unsigned portLONG ) pxRequest->usValue;\r
+ ulReceivedAddress = ( unsigned long ) pxRequest->usValue;\r
break;\r
\r
case usbSET_CONFIGURATION_REQUEST:\r
we cannot actually move to the configured state until we get a \r
TXCOMP interrupt from this NULL packet. Therefore we just remember the\r
config and set our state so we know we have received the go ahead. */ \r
- ucUSBConfig = ( unsigned portCHAR ) ( pxRequest->usValue & 0xff );\r
+ ucUSBConfig = ( unsigned char ) ( pxRequest->usValue & 0xff );\r
eDriverState = eJUST_GOT_CONFIG;\r
prvUSBTransmitNull();\r
break;\r
\r
static void prvGetStandardInterfaceDescriptor( xUSB_REQUEST *pxRequest )\r
{\r
- switch( ( pxRequest->usValue & ( unsigned portSHORT ) 0xff00 ) >> 8 )\r
+ switch( ( pxRequest->usValue & ( unsigned short ) 0xff00 ) >> 8 )\r
{\r
case usbHID_REPORT_DESCRIPTOR:\r
- prvSendControlData( ( unsigned portCHAR * ) pxReportDescriptor, pxRequest->usLength, sizeof( pxReportDescriptor ), pdTRUE );\r
+ prvSendControlData( ( unsigned char * ) pxReportDescriptor, pxRequest->usLength, sizeof( pxReportDescriptor ), pdTRUE );\r
break;\r
\r
default:\r
\r
static void prvHandleStandardInterfaceRequest( xUSB_REQUEST *pxRequest )\r
{\r
-unsigned portSHORT usStatus = 0;\r
+unsigned short usStatus = 0;\r
\r
switch( pxRequest->ucRequest )\r
{\r
case usbGET_STATUS_REQUEST:\r
/* Send dummy 2 bytes. */\r
- prvSendControlData( ( unsigned portCHAR * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE );\r
+ prvSendControlData( ( unsigned char * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE );\r
break;\r
\r
case usbGET_DESCRIPTOR_REQUEST:\r
\r
static void vInitUSBInterface( void )\r
{\r
-volatile unsigned portLONG ulTemp;\r
+volatile unsigned long ulTemp;\r
\r
/* Initialise a few state variables. */\r
- pxCharsForTx.ulNextCharIndex = ( unsigned portLONG ) 0;\r
- ucUSBConfig = ( unsigned portCHAR ) 0;\r
+ pxCharsForTx.ulNextCharIndex = ( unsigned long ) 0;\r
+ ucUSBConfig = ( unsigned char ) 0;\r
eDriverState = eNOTHING;\r
\r
/* HARDWARE SETUP */\r
/* When using the USB debugger the peripheral registers do not always get\r
set to the correct default values. To make sure set the relevant registers\r
manually here. */\r
- AT91C_BASE_UDP->UDP_IDR = ( unsigned portLONG ) 0xffffffff;\r
- AT91C_BASE_UDP->UDP_ICR = ( unsigned portLONG ) 0xffffffff;\r
- AT91C_BASE_UDP->UDP_CSR[ 0 ] = ( unsigned portLONG ) 0x00;\r
- AT91C_BASE_UDP->UDP_CSR[ 1 ] = ( unsigned portLONG ) 0x00;\r
+ AT91C_BASE_UDP->UDP_IDR = ( unsigned long ) 0xffffffff;\r
+ AT91C_BASE_UDP->UDP_ICR = ( unsigned long ) 0xffffffff;\r
+ AT91C_BASE_UDP->UDP_CSR[ 0 ] = ( unsigned long ) 0x00;\r
+ AT91C_BASE_UDP->UDP_CSR[ 1 ] = ( unsigned long ) 0x00;\r
AT91C_BASE_UDP->UDP_GLBSTATE = 0;\r
AT91C_BASE_UDP->UDP_FADDR = 0;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT usRequestedLength, unsigned portLONG ulLengthToSend, portLONG lSendingDescriptor )\r
+static void prvSendControlData( unsigned char *pucData, unsigned short usRequestedLength, unsigned long ulLengthToSend, long lSendingDescriptor )\r
{\r
- if( ( ( unsigned portLONG ) usRequestedLength < ulLengthToSend ) )\r
+ if( ( ( unsigned long ) usRequestedLength < ulLengthToSend ) )\r
{\r
/* Cap the data length to that requested. */\r
- ulLengthToSend = ( unsigned portSHORT ) usRequestedLength;\r
+ ulLengthToSend = ( unsigned short ) usRequestedLength;\r
}\r
- else if( ( ulLengthToSend < ( unsigned portLONG ) usRequestedLength ) && lSendingDescriptor )\r
+ else if( ( ulLengthToSend < ( unsigned long ) usRequestedLength ) && lSendingDescriptor )\r
{\r
/* We are sending a descriptor. If the descriptor is an exact \r
multiple of the FIFO length then it will have to be terminated\r
/* Reinitialise the buffer index so we start sending from the start of \r
the data. */\r
pxCharsForTx.ulTotalDataLength = ulLengthToSend;\r
- pxCharsForTx.ulNextCharIndex = ( unsigned portLONG ) 0;\r
+ pxCharsForTx.ulNextCharIndex = ( unsigned long ) 0;\r
\r
/* Send the first 8 bytes now. The rest will get sent in response to \r
TXCOMP interrupts. */\r
\r
static void prvSendNextSegment( void )\r
{\r
-volatile unsigned portLONG ulNextLength, ulStatus, ulLengthLeftToSend;\r
+volatile unsigned long ulNextLength, ulStatus, ulLengthLeftToSend;\r
\r
/* Is there any data to send? */\r
if( pxCharsForTx.ulTotalDataLength > pxCharsForTx.ulNextCharIndex )\r
}\r
\r
/* Write the data to the FIFO. */\r
- while( ulNextLength > ( unsigned portLONG ) 0 )\r
+ while( ulNextLength > ( unsigned long ) 0 )\r
{\r
AT91C_BASE_UDP->UDP_FDR[ usbEND_POINT_0 ] = pxCharsForTx.ucTxBuffer[ pxCharsForTx.ulNextCharIndex ];\r
\r
portENTER_CRITICAL();\r
{\r
ulStatus = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ];\r
- usbCSR_SET_BIT( &ulStatus, ( ( unsigned portLONG ) 0x10 ) );\r
+ usbCSR_SET_BIT( &ulStatus, ( ( unsigned long ) 0x10 ) );\r
AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ] = ulStatus;\r
}\r
portEXIT_CRITICAL();\r