|
@@ -544,3 +544,139 @@
|
|
|
#define nCLEAR_DATATOGGLE_T 0x0
|
|
|
#define INCOMPTX_T 0x80 /* indicates that a large packet is split */
|
|
|
#define nINCOMPTX_T 0x0
|
|
|
+#define DMAREQMODE_T 0x400 /* DMA mode (0 or 1) selection */
|
|
|
+#define nDMAREQMODE_T 0x0
|
|
|
+#define FORCE_DATATOGGLE_T 0x800 /* Force data toggle */
|
|
|
+#define nFORCE_DATATOGGLE_T 0x0
|
|
|
+#define DMAREQ_ENA_T 0x1000 /* Enable DMA request for Tx EP */
|
|
|
+#define nDMAREQ_ENA_T 0x0
|
|
|
+#define ISO_T 0x4000 /* enable Isochronous transfers */
|
|
|
+#define nISO_T 0x0
|
|
|
+#define AUTOSET_T 0x8000 /* allows TxPktRdy to be set automatically */
|
|
|
+#define nAUTOSET_T 0x0
|
|
|
+#define ERROR_TH 0x4 /* error condition host mode */
|
|
|
+#define nERROR_TH 0x0
|
|
|
+#define STALL_RECEIVED_TH 0x20 /* Stall handshake received host mode */
|
|
|
+#define nSTALL_RECEIVED_TH 0x0
|
|
|
+#define NAK_TIMEOUT_TH 0x80 /* NAK timeout host mode */
|
|
|
+#define nNAK_TIMEOUT_TH 0x0
|
|
|
+
|
|
|
+/* Bit masks for USB_TXCOUNT */
|
|
|
+
|
|
|
+#define TX_COUNT 0x1fff /* Number of bytes to be written to the selected endpoint Tx FIFO */
|
|
|
+
|
|
|
+/* Bit masks for USB_RXCSR */
|
|
|
+
|
|
|
+#define RXPKTRDY_R 0x1 /* data packet in FIFO indicator */
|
|
|
+#define nRXPKTRDY_R 0x0
|
|
|
+#define FIFO_FULL_R 0x2 /* FIFO not empty */
|
|
|
+#define nFIFO_FULL_R 0x0
|
|
|
+#define OVERRUN_R 0x4 /* TxPktRdy not set for an IN token */
|
|
|
+#define nOVERRUN_R 0x0
|
|
|
+#define DATAERROR_R 0x8 /* Out packet cannot be loaded into Rx FIFO */
|
|
|
+#define nDATAERROR_R 0x0
|
|
|
+#define FLUSHFIFO_R 0x10 /* flush endpoint FIFO */
|
|
|
+#define nFLUSHFIFO_R 0x0
|
|
|
+#define STALL_SEND_R 0x20 /* issue a Stall handshake */
|
|
|
+#define nSTALL_SEND_R 0x0
|
|
|
+#define STALL_SENT_R 0x40 /* Stall handshake transmitted */
|
|
|
+#define nSTALL_SENT_R 0x0
|
|
|
+#define CLEAR_DATATOGGLE_R 0x80 /* clear endpoint data toggle */
|
|
|
+#define nCLEAR_DATATOGGLE_R 0x0
|
|
|
+#define INCOMPRX_R 0x100 /* indicates that a large packet is split */
|
|
|
+#define nINCOMPRX_R 0x0
|
|
|
+#define DMAREQMODE_R 0x800 /* DMA mode (0 or 1) selection */
|
|
|
+#define nDMAREQMODE_R 0x0
|
|
|
+#define DISNYET_R 0x1000 /* disable Nyet handshakes */
|
|
|
+#define nDISNYET_R 0x0
|
|
|
+#define DMAREQ_ENA_R 0x2000 /* Enable DMA request for Tx EP */
|
|
|
+#define nDMAREQ_ENA_R 0x0
|
|
|
+#define ISO_R 0x4000 /* enable Isochronous transfers */
|
|
|
+#define nISO_R 0x0
|
|
|
+#define AUTOCLEAR_R 0x8000 /* allows TxPktRdy to be set automatically */
|
|
|
+#define nAUTOCLEAR_R 0x0
|
|
|
+#define ERROR_RH 0x4 /* TxPktRdy not set for an IN token host mode */
|
|
|
+#define nERROR_RH 0x0
|
|
|
+#define REQPKT_RH 0x20 /* request an IN transaction host mode */
|
|
|
+#define nREQPKT_RH 0x0
|
|
|
+#define STALL_RECEIVED_RH 0x40 /* Stall handshake received host mode */
|
|
|
+#define nSTALL_RECEIVED_RH 0x0
|
|
|
+#define INCOMPRX_RH 0x100 /* indicates that a large packet is split host mode */
|
|
|
+#define nINCOMPRX_RH 0x0
|
|
|
+#define DMAREQMODE_RH 0x800 /* DMA mode (0 or 1) selection host mode */
|
|
|
+#define nDMAREQMODE_RH 0x0
|
|
|
+#define AUTOREQ_RH 0x4000 /* sets ReqPkt automatically host mode */
|
|
|
+#define nAUTOREQ_RH 0x0
|
|
|
+
|
|
|
+/* Bit masks for USB_RXCOUNT */
|
|
|
+
|
|
|
+#define RX_COUNT 0x1fff /* Number of received bytes in the packet in the Rx FIFO */
|
|
|
+
|
|
|
+/* Bit masks for USB_TXTYPE */
|
|
|
+
|
|
|
+#define TARGET_EP_NO_T 0xf /* EP number */
|
|
|
+#define PROTOCOL_T 0xc /* transfer type */
|
|
|
+
|
|
|
+/* Bit masks for USB_TXINTERVAL */
|
|
|
+
|
|
|
+#define TX_POLL_INTERVAL 0xff /* polling interval for selected Tx EP */
|
|
|
+
|
|
|
+/* Bit masks for USB_RXTYPE */
|
|
|
+
|
|
|
+#define TARGET_EP_NO_R 0xf /* EP number */
|
|
|
+#define PROTOCOL_R 0xc /* transfer type */
|
|
|
+
|
|
|
+/* Bit masks for USB_RXINTERVAL */
|
|
|
+
|
|
|
+#define RX_POLL_INTERVAL 0xff /* polling interval for selected Rx EP */
|
|
|
+
|
|
|
+/* Bit masks for USB_DMA_INTERRUPT */
|
|
|
+
|
|
|
+#define DMA0_INT 0x1 /* DMA0 pending interrupt */
|
|
|
+#define nDMA0_INT 0x0
|
|
|
+#define DMA1_INT 0x2 /* DMA1 pending interrupt */
|
|
|
+#define nDMA1_INT 0x0
|
|
|
+#define DMA2_INT 0x4 /* DMA2 pending interrupt */
|
|
|
+#define nDMA2_INT 0x0
|
|
|
+#define DMA3_INT 0x8 /* DMA3 pending interrupt */
|
|
|
+#define nDMA3_INT 0x0
|
|
|
+#define DMA4_INT 0x10 /* DMA4 pending interrupt */
|
|
|
+#define nDMA4_INT 0x0
|
|
|
+#define DMA5_INT 0x20 /* DMA5 pending interrupt */
|
|
|
+#define nDMA5_INT 0x0
|
|
|
+#define DMA6_INT 0x40 /* DMA6 pending interrupt */
|
|
|
+#define nDMA6_INT 0x0
|
|
|
+#define DMA7_INT 0x80 /* DMA7 pending interrupt */
|
|
|
+#define nDMA7_INT 0x0
|
|
|
+
|
|
|
+/* Bit masks for USB_DMAxCONTROL */
|
|
|
+
|
|
|
+#define DMA_ENA 0x1 /* DMA enable */
|
|
|
+#define nDMA_ENA 0x0
|
|
|
+#define DIRECTION 0x2 /* direction of DMA transfer */
|
|
|
+#define nDIRECTION 0x0
|
|
|
+#define MODE 0x4 /* DMA Bus error */
|
|
|
+#define nMODE 0x0
|
|
|
+#define INT_ENA 0x8 /* Interrupt enable */
|
|
|
+#define nINT_ENA 0x0
|
|
|
+#define EPNUM 0xf0 /* EP number */
|
|
|
+#define BUSERROR 0x100 /* DMA Bus error */
|
|
|
+#define nBUSERROR 0x0
|
|
|
+
|
|
|
+/* Bit masks for USB_DMAxADDRHIGH */
|
|
|
+
|
|
|
+#define DMA_ADDR_HIGH 0xffff /* Upper 16-bits of memory source/destination address for the DMA master channel */
|
|
|
+
|
|
|
+/* Bit masks for USB_DMAxADDRLOW */
|
|
|
+
|
|
|
+#define DMA_ADDR_LOW 0xffff /* Lower 16-bits of memory source/destination address for the DMA master channel */
|
|
|
+
|
|
|
+/* Bit masks for USB_DMAxCOUNTHIGH */
|
|
|
+
|
|
|
+#define DMA_COUNT_HIGH 0xffff /* Upper 16-bits of byte count of DMA transfer for DMA master channel */
|
|
|
+
|
|
|
+/* Bit masks for USB_DMAxCOUNTLOW */
|
|
|
+
|
|
|
+#define DMA_COUNT_LOW 0xffff /* Lower 16-bits of byte count of DMA transfer for DMA master channel */
|
|
|
+
|
|
|
+#endif /* _DEF_BF525_H */
|