|  | @@ -474,3 +474,73 @@
 | 
	
		
			
				|  |  |  #define        nCHRG_VBUS_END_ENA  0x0       
 | 
	
		
			
				|  |  |  #define    DISCHRG_VBUS_START_ENA  0x10       /* enable DISCHRG_VBUS_START interrupt */
 | 
	
		
			
				|  |  |  #define   nDISCHRG_VBUS_START_ENA  0x0       
 | 
	
		
			
				|  |  | +#define      DISCHRG_VBUS_END_ENA  0x20       /* enable DISCHRG_VBUS_END interrupt */
 | 
	
		
			
				|  |  | +#define     nDISCHRG_VBUS_END_ENA  0x0       
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/* Bit masks for USB_CSR0 */
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#define                  RXPKTRDY  0x1        /* data packet receive indicator */
 | 
	
		
			
				|  |  | +#define                 nRXPKTRDY  0x0       
 | 
	
		
			
				|  |  | +#define                  TXPKTRDY  0x2        /* data packet in FIFO indicator */
 | 
	
		
			
				|  |  | +#define                 nTXPKTRDY  0x0       
 | 
	
		
			
				|  |  | +#define                STALL_SENT  0x4        /* STALL handshake sent */
 | 
	
		
			
				|  |  | +#define               nSTALL_SENT  0x0       
 | 
	
		
			
				|  |  | +#define                   DATAEND  0x8        /* Data end indicator */
 | 
	
		
			
				|  |  | +#define                  nDATAEND  0x0       
 | 
	
		
			
				|  |  | +#define                  SETUPEND  0x10       /* Setup end */
 | 
	
		
			
				|  |  | +#define                 nSETUPEND  0x0       
 | 
	
		
			
				|  |  | +#define                 SENDSTALL  0x20       /* Send STALL handshake */
 | 
	
		
			
				|  |  | +#define                nSENDSTALL  0x0       
 | 
	
		
			
				|  |  | +#define         SERVICED_RXPKTRDY  0x40       /* used to clear the RxPktRdy bit */
 | 
	
		
			
				|  |  | +#define        nSERVICED_RXPKTRDY  0x0       
 | 
	
		
			
				|  |  | +#define         SERVICED_SETUPEND  0x80       /* used to clear the SetupEnd bit */
 | 
	
		
			
				|  |  | +#define        nSERVICED_SETUPEND  0x0       
 | 
	
		
			
				|  |  | +#define                 FLUSHFIFO  0x100      /* flush endpoint FIFO */
 | 
	
		
			
				|  |  | +#define                nFLUSHFIFO  0x0       
 | 
	
		
			
				|  |  | +#define          STALL_RECEIVED_H  0x4        /* STALL handshake received host mode */
 | 
	
		
			
				|  |  | +#define         nSTALL_RECEIVED_H  0x0       
 | 
	
		
			
				|  |  | +#define                SETUPPKT_H  0x8        /* send Setup token host mode */
 | 
	
		
			
				|  |  | +#define               nSETUPPKT_H  0x0       
 | 
	
		
			
				|  |  | +#define                   ERROR_H  0x10       /* timeout error indicator host mode */
 | 
	
		
			
				|  |  | +#define                  nERROR_H  0x0       
 | 
	
		
			
				|  |  | +#define                  REQPKT_H  0x20       /* Request an IN transaction host mode */
 | 
	
		
			
				|  |  | +#define                 nREQPKT_H  0x0       
 | 
	
		
			
				|  |  | +#define               STATUSPKT_H  0x40       /* Status stage transaction host mode */
 | 
	
		
			
				|  |  | +#define              nSTATUSPKT_H  0x0       
 | 
	
		
			
				|  |  | +#define             NAK_TIMEOUT_H  0x80       /* EP0 halted after a NAK host mode */
 | 
	
		
			
				|  |  | +#define            nNAK_TIMEOUT_H  0x0       
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/* Bit masks for USB_COUNT0 */
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#define              EP0_RX_COUNT  0x7f       /* number of received bytes in EP0 FIFO */
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/* Bit masks for USB_NAKLIMIT0 */
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#define             EP0_NAK_LIMIT  0x1f       /* number of frames/micro frames after which EP0 timeouts */
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/* Bit masks for USB_TX_MAX_PACKET */
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#define         MAX_PACKET_SIZE_T  0x7ff      /* maximum data pay load in a frame */
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/* Bit masks for USB_RX_MAX_PACKET */
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#define         MAX_PACKET_SIZE_R  0x7ff      /* maximum data pay load in a frame */
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/* Bit masks for USB_TXCSR */
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#define                TXPKTRDY_T  0x1        /* data packet in FIFO indicator */
 | 
	
		
			
				|  |  | +#define               nTXPKTRDY_T  0x0       
 | 
	
		
			
				|  |  | +#define          FIFO_NOT_EMPTY_T  0x2        /* FIFO not empty */
 | 
	
		
			
				|  |  | +#define         nFIFO_NOT_EMPTY_T  0x0       
 | 
	
		
			
				|  |  | +#define                UNDERRUN_T  0x4        /* TxPktRdy not set  for an IN token */
 | 
	
		
			
				|  |  | +#define               nUNDERRUN_T  0x0       
 | 
	
		
			
				|  |  | +#define               FLUSHFIFO_T  0x8        /* flush endpoint FIFO */
 | 
	
		
			
				|  |  | +#define              nFLUSHFIFO_T  0x0       
 | 
	
		
			
				|  |  | +#define              STALL_SEND_T  0x10       /* issue a Stall handshake */
 | 
	
		
			
				|  |  | +#define             nSTALL_SEND_T  0x0       
 | 
	
		
			
				|  |  | +#define              STALL_SENT_T  0x20       /* Stall handshake transmitted */
 | 
	
		
			
				|  |  | +#define             nSTALL_SENT_T  0x0       
 | 
	
		
			
				|  |  | +#define        CLEAR_DATATOGGLE_T  0x40       /* clear endpoint data toggle */
 | 
	
		
			
				|  |  | +#define       nCLEAR_DATATOGGLE_T  0x0       
 | 
	
		
			
				|  |  | +#define                INCOMPTX_T  0x80       /* indicates that a large packet is split */
 | 
	
		
			
				|  |  | +#define               nINCOMPTX_T  0x0       
 |