- Main Page
- Modules
- Data Structures
- Files

Defines | Typedefs
USB MUSB Symbols Defined
USB

## Defines
#define | CSL_USB_EP0 (0)
| USB end point numbers.
#define | CSL_USB_EP1 (1)
#define | CSL_USB_EP2 (2)
#define | CSL_USB_EP3 (3)
#define | CSL_USB_EP4 (4)
#define | CSL_USB_IN_TRANSFER (0x80)
| Flags for transfer functions.
#define | CSL_USB_OUT_TRANSFER (0x00)
#define | CSL_USB_MAX_EP0_FIFO_LEN (0x0040)
#define | CSL_USB_SETUP_PACKET_LEN (4)
#define | CSL_USB_EP0_PACKET_SIZE (0x40)
#define | CSL_USB_EP_PACKET_SIZE_FS (0x40)
#define | CSL_USB_EP_PACKET_SIZE_HS (0x200)
#define | CSL_USB_EP1_PACKET_SIZE_FS (0x40)
#define | CSL_USB_EP1_PACKET_SIZE_HS (0x200)
#define | CSL_USB_EP2_PACKET_SIZE_FS (0x40)
#define | CSL_USB_EP2_PACKET_SIZE_HS (0x200)
#define | CSL_USB_EP3_PACKET_SIZE_FS (0x40)
#define | CSL_USB_EP3_PACKET_SIZE_HS (0x200)
#define | CSL_USB_EP4_PACKET_SIZE_FS (0x40)
#define | CSL_USB_EP4_PACKET_SIZE_HS (0x200)
#define | CSL_USB_FIFO_SIZE (512)
#define | CSL_USB_IN_EP_FIFO_START (8)
#define | CSL_USB_OUT_EP_FIFO_START (8)
#define | CSL_USB_TXRXFIFOSZ_TX_SHIFT (0)
| USB TX FIFO size register shift value.
#define | CSL_USB_TXRXFIFOSZ_RX_SHIFT (8)
| USB RX FIFO size register shift value.
#define | CSL_USB_TX_FIFO_SIZE_8 (0)
| USB TX FIFO size - 8 bits.
#define | CSL_USB_TX_FIFO_SIZE_16 (1)
| USB TX FIFO size - 16 bits.
#define | CSL_USB_TX_FIFO_SIZE_32 (2)
| USB TX FIFO size - 32 bits.
#define | CSL_USB_TX_FIFO_SIZE_64 (3)
| USB TX FIFO size - 64 bits.
#define | CSL_USB_TX_FIFO_SIZE_128 (4)
| USB TX FIFO size - 128 bits.
#define | CSL_USB_TX_FIFO_SIZE_256 (5)
| USB TX FIFO size - 256 bits.
#define | CSL_USB_TX_FIFO_SIZE_512 (6)
| USB TX FIFO size - 512 bits.
#define | CSL_USB_TX_FIFO_SIZE_1024 (7)
| USB TX FIFO size - 1024 bits.
#define | CSL_USB_TX_FIFO_SIZE_2048 (8)
| USB TX FIFO size - 2048 bits.
#define | CSL_USB_TX_FIFO_SIZE_4096 (9)
| USB TX FIFO size - 4096 bits.
#define | CSL_USB_RX_FIFO_SIZE_8 (0 << CSL_USB_TXRXFIFOSZ_RX_SHIFT)
| USB RX FIFO size - 8 bits.
#define | CSL_USB_RX_FIFO_SIZE_16 (1 << CSL_USB_TXRXFIFOSZ_RX_SHIFT)
| USB RX FIFO size - 16 bits.
#define | CSL_USB_RX_FIFO_SIZE_32 (2 << CSL_USB_TXRXFIFOSZ_RX_SHIFT)
| USB RX FIFO size - 32 bits.
#define | CSL_USB_RX_FIFO_SIZE_64 (3 << CSL_USB_TXRXFIFOSZ_RX_SHIFT)
| USB RX FIFO size - 64 bits.
#define | CSL_USB_RX_FIFO_SIZE_128 (4 << CSL_USB_TXRXFIFOSZ_RX_SHIFT)
| USB RX FIFO size - 128 bits.
#define | CSL_USB_RX_FIFO_SIZE_256 (5 << CSL_USB_TXRXFIFOSZ_RX_SHIFT)
| USB RX FIFO size - 256 bits.
#define | CSL_USB_RX_FIFO_SIZE_512 (6 << CSL_USB_TXRXFIFOSZ_RX_SHIFT)
| USB RX FIFO size - 512 bits.
#define | CSL_USB_RX_FIFO_SIZE_1024 (7 << CSL_USB_TXRXFIFOSZ_RX_SHIFT)
| USB RX FIFO size - 1024 bits.
#define | CSL_USB_RX_FIFO_SIZE_2048 (8 << CSL_USB_TXRXFIFOSZ_RX_SHIFT)
| USB RX FIFO size - 2048 bits.
#define | CSL_USB_RX_FIFO_SIZE_4096 (9 << CSL_USB_TXRXFIFOSZ_RX_SHIFT)
| USB RX FIFO size - 4096 bits.
#define | CSL_USB_ENDPOINT_COUNT (8)
| USB End point count.
#define | CSL_USB_MAX_OUTEP0BUF_LEN (128)
| USB maximum output buffer length.
#define | CSL_USB_MAX_NUMBER_OF_UI_MSG (2)
| USB maximum number of User Interface messages.
#define | CSL_USB_IOFLAG_NONE (0x0000)
| USB IO Flags.
#define | CSL_USB_IOFLAG_NOSHORT (0x0001)
#define | CSL_USB_IOFLAG_SWAP (0x0002)
#define | CSL_USB_IOFLAG_LNK (0x0004)
#define | CSL_USB_IOFLAG_CAT (0x0008)
#define | CSL_USB_IOFLAG_EOLL (0x0010)
#define | CSL_USB_IOFLAG_NOT (0x0020)
#define | CSL_USB_EVENT_NONE (0x0000)
| USB Events.
#define | CSL_USB_EVENT_RESET (0x0001)
#define | CSL_USB_EVENT_SOF (0x0002)
#define | CSL_USB_EVENT_SUSPEND (0x0004)
#define | CSL_USB_EVENT_RESUME (0x0008)
#define | CSL_USB_EVENT_SETUP (0x0010)
#define | CSL_USB_EVENT_EOT (0x0020)
#define | CSL_USB_EVENT_STPOW (0x0040)
#define | CSL_USB_EVENT_PSOF (0x0080)
#define | CSL_USB_EVENT_HINT (0x0100)
#define | CSL_USB_EVENT_HERR (0x0200)
#define | CSL_USB_EVENT_ISO_TX (0x0400)
#define | CSL_USB_EVENT_ISO_RX (0x0800)
#define | CSL_USB_EVENT_READ_MEDIA (0x1000)
#define | CSL_USB_EVENT_WRITE_MEDIA (0x2000)
#define | CSL_USB_EVENT_HID_REPORT_TX (0x4000)
#define | CSL_USB_GET_STATUS (0x00)
| Standard USB requests.
#define | CSL_USB_CLEAR_FEATURE (0x01)
#define | CSL_USB_SET_FEATURE (0x03)
#define | CSL_USB_SET_ADDRESS (0x05)
#define | CSL_USB_GET_DESCRIPTOR (0x06)
#define | CSL_USB_SET_DESCRIPTOR (0x07)
#define | CSL_USB_GET_CONFIGURATION (0x08)
#define | CSL_USB_SET_CONFIGURATION (0x09)
#define | CSL_USB_GET_INTERFACE (0x0A)
#define | CSL_USB_SET_INTERFACE (0x0B)
#define | CSL_USB_SYNCH_FRAME (0x0C)
#define | CSL_USB_GET_MAX_LUN (0xFE)
#define | CSL_USB_BOT_MSC_RESET (0xFF)
#define | CSL_USB_REQUEST_TYPE_DEVICE_STATUS (0x80)
#define | CSL_USB_REQUEST_TYPE_INTERFACE_STATUS (0x81)
#define | CSL_USB_REQUEST_TYPE_ENDPOINT_STATUS (0x82)
#define | CSL_USB_SET_CUR (0x01)
| Standard USB requests for audio class.
#define | CSL_USB_GET_CUR (0x81)
#define | CSL_USB_SET_MIN (0x02)
#define | CSL_USB_GET_MIN (0x82)
#define | CSL_USB_SET_MAX (0x03)
#define | CSL_USB_GET_MAX (0x83)
#define | CSL_USB_SET_RES (0x04)
#define | CSL_USB_GET_RES (0x84)
#define | CSL_USB_SET_MEM (0x05)
#define | CSL_USB_GET_MEM (0x85)
#define | CSL_USB_GET_STAT (0xFF)
#define | CSL_USB_GET_REPORT (0x01)
| Standard USB requests for HID class.
#define | CSL_USB_GET_IDLE (0x02)
#define | CSL_USB_GET_PROTOCOL (0x03)
#define | CSL_USB_SET_REPORT (0x09)
#define | CSL_USB_SET_IDLE (0x0A)
#define | CSL_USB_SET_PROTOCOL (0x0B)
#define | CSL_USB_DEVICE_DESCRIPTOR_TYPE (0x01)
| USB Descriptor Type Values.
#define | CSL_USB_CONFIGURATION_DESCRIPTOR_TYPE (0x02)
| USB Configuration Descriptor Type Value.
#define | CSL_USB_STRING_DESCRIPTOR_TYPE (0x03)
| USB String Descriptor Type Value.
#define | CSL_USB_INTERFACE_DESCRIPTOR_TYPE (0x04)
| USB Interface Descriptor Type Value.
#define | CSL_USB_ENDPOINT_DESCRIPTOR_TYPE (0x05)
| USB End point Descriptor Type Value.
#define | CSL_USB_DEVICE_QUAL_DESCRIPTOR_TYPE (0x06)
| USB deice qualifier Descriptor Type Value.
#define | CSL_USB_OTHERSPEED_CFG_DESCRIPTOR_TYPE (0x07)
| USB other speed configuration Descriptor Type Value.
#define | CSL_USB_HID_DESCRIPTOR_TYPE (0x21)
| USB HID Descriptor Type Value.
#define | CSL_USB_HID_REPORT_DESCRIPTOR_TYPE (0x22)
| USB HID Report Descriptor Type Value.
#define | CSL_USB_FEATURE_ENDPOINT_STALL (0x0000)
| USB End point Stall Feature.
#define | CSL_USB_FEATURE_REMOTE_WAKEUP (0x0001)
| USB Remote Wakeup Feature.
#define | CSL_USB_GBL_INT_SUSPEND (1<<0)
| USB Interrupt source register bit positions.
#define | CSL_USB_GBL_INT_RESUME (1<<1)
#define | CSL_USB_GBL_INT_RESET (1<<2)
#define | CSL_USB_GBL_INT_SOF (1<<3)
#define | CSL_USB_GBL_INT_DEVCONN (1<<4)
#define | CSL_USB_GBL_INT_DEVDISCONN (1<<5)
#define | CSL_USB_GBL_INT_SRP (1<<6)
#define | CSL_USB_GBL_INT_VBUSERR (1<<7)
#define | CSL_USB_GBL_INT_DRVVBUS (1<<8)
#define | CSL_USB_RX_INT_EP4 (1<<12)
| Bit positions for USB Rx interrupts.
#define | CSL_USB_RX_INT_EP3 (1<<11)
#define | CSL_USB_RX_INT_EP2 (1<<10)
#define | CSL_USB_RX_INT_EP1 (1<<9)
#define | CSL_USB_TX_INT_EP4 (1<<4)
| Bit positions for USB Tx (EP 4 - 1) and Tx & Rx (EP0) interrupts.
#define | CSL_USB_TX_INT_EP3 (1<<3)
#define | CSL_USB_TX_INT_EP2 (1<<2)
#define | CSL_USB_TX_INT_EP1 (1<<1)
#define | CSL_USB_TX_RX_INT_EP0 (1<<0)
#define | CSL_USB_DELAY (0xFF)
| USB delay value.
#define | CSL_USB_DATA_DELAY (0xFFF)
| USB delay value used for data transfer operations.
#define | CSL_USB_RESUME_DELAY (10)
| USB delay for resume protocol (In msecs)
#define | CSL_USB_PER_RESTCOUNT (0x20)
| USB peripheral reset count value.
#define | CSL_USB_INTRUSB_INTRUSBE_DEFVAL (0x7fff)
| USB Interrupt register default values.
#define | CSL_USB_INTMSKSETR1_DEFVAL (0xFFFF)
#define | CSL_USB_INTMSKSETR2_DEFVAL (0xFFF7)
#define | CSL_USB_SYS_CTRL_REG_DEF_VAL (0x6040)
#define | CSL_USB_CLOCKSTOP_REG_DEF_VAL (0x0)
#define | CSL_USB_DMA_SCHED_CTRL1_DEFVAL (0x0001)
| USB Dma registers default values.
#define | CSL_USB_ENTRYLSW_DEFVAL (0x0081)
#define | CSL_USB_RXGCR1_DEFVAL (0x401A)
#define | CSL_USB_RXGCR2_DEFVAL (0x8100)
#define | CSL_USB_LRAM0SIZE_DEFVAL (0x200)
#define | CSL_USB_QMEMRCTRL1_DEFVAL (0x200)
#define | CSL_USB_QMEMRCTRL2_DEFVAL (0x0000)
#define | CSL_USB_16BIT_REG_MASK (0xFFFF)
#define | CSL_USB_16BIT_REG_SHIFT (16)
#define | CSL_USB_PLL_PLLCNTL1_DEFVAL (0x8BE8)
| PLL register default values(100MHz)
#define | CSL_USB_PLL_PLLINCNTL_DEFVAL (0x8000)
#define | CSL_USB_PLL_PLLCNTL2_DEFVAL (0x0806)
#define | CSL_USB_PLL_PLLOUTCNTL_DEFVAL (0x0000)
#define | CSL_USB_PLL_TIMEOUT (0xFFFF)
#define | CSL_USB_INTMASKEDRL_LSB (0)
#define | CSL_USB_INTMASKEDRL_MSB (12)
#define | CSL_USB_INTMASKEDRH_LSB (0)
#define | CSL_USB_INTMASKEDRH_MSB (8)
#define | CSL_USB_INTCLRRL_LSB (0)
#define | CSL_USB_INTCLRRL_MSB (12)
#define | CSL_USB_INTCLRRH_LSB (0)
#define | CSL_USB_INTCLRRH_MSB (8)
#define | CSL_USB_INVALID_MAXPOWER (0xFFFF)
#define | CSL_USB_WORD_ACCESS (0)
#define | CSL_USB_HIGHBYTE_ACCESS (1)
#define | CSL_USB_LOWBYTE_ACCESS (2)
#define | CSL_USB_MIN(a, b) (((a)<(b))?(a):(b))
#define | CSL_USB_CHANGE_ACCESSTYPE(byte) CSL_FINS(CSL_SYSCTRL_REGS->USBSCR, SYS_USBSCR_USBBYTEMODE, byte)
| Macro to enable disable byte access byte = 0 - Enables word access byte = 1 - Enables MSB byte access byte = 2 - Enables LSB byte access.
#define | CSL_USB_BYTESWAP(word) ((((word) >> 8u) & 0xFFu) | (((word) & 0xFFu) << 8u))
## Typedefs
typedef Uint16 | CSL_UsbIoFlags
typedef Uint16 | CSL_UsbEventMask
typedef Uint16 | CSL_UsbByteCount
typedef Uint16 | CSL_UsbFrameNum
typedef void(* | CSL_USB_EVENT_ISR )()
typedef void(* | CSL_USB_APP_CALLBACK )(Uint16 flag)
typedef CSL_Status(* | CSL_USB_APP_TRANSFER_CALLBACK )(void *, void *)

## Define Documentation

#define CSL_USB_16BIT_REG_MASK (0xFFFF)

USB 16 bit register Mask value

Referenced by USB_confDmaRx(), USB_confDmaTx(), and USB_initQueueManager().

#define CSL_USB_16BIT_REG_SHIFT (16)

USB 16 bit register shift value

Referenced by USB_initQueueManager().

#define CSL_USB_BOT_MSC_RESET (0xFF)

Bulk Only transport MSC reset request

#define CSL_USB_BYTESWAP | ( |  | word | ) | ((((word) >> 8u) & 0xFFu) | (((word) & 0xFFu) << 8u))

Swap the MSB with the LSB of a 16 bit integer

#define CSL_USB_CLEAR_FEATURE (0x01)

USB clear feature request

Referenced by USB_coreEventProcessEp0().

#define CSL_USB_CLOCKSTOP_REG_DEF_VAL (0x0)

USB clock stop default value

Referenced by USB_init().

#define CSL_USB_DEVICE_DESCRIPTOR_TYPE (0x01)

USB Descriptor Type Values.

USB Device Descriptor Type Value

Referenced by AC_reqGetDescriptor(), MSC_reqGetDescriptor(), and USB_coreEventProcessEp0().

#define CSL_USB_DMA_SCHED_CTRL1_DEFVAL (0x0001)

USB Dma registers default values.

USB Dma scheduler control register default value

Referenced by USB_initDma().

#define CSL_USB_ENTRYLSW_DEFVAL (0x0081)

USB Dma scheduler table register default value

Referenced by USB_initDma().

#define CSL_USB_EP0 (0)

USB end point numbers.

USB End point 0

Referenced by CDC_eventHandler(), USB_abortTransaction(), USB_clearEndptStall(), USB_coreEventProcessEp0(), USB_epNumToHandle(), USB_flushFifo(), USB_init(), USB_initEndptObj(), USB_postTransaction(), USB_processEP0In(), USB_processEP0Out(), USB_resetDev(), USB_setFullSpeedMode(), and USB_stallEndpt().

#define CSL_USB_EP0_PACKET_SIZE (0x40)

USB EP0 data packet size

Referenced by AC_Open(), CDC_OpenFullspeed(), CDC_Setup(), MSC_OpenFullspeed(), MSC_Setup(), and USB_init().

#define CSL_USB_EP1 (1)

USB End point 1

Referenced by USB_epNumToHandle(), USB_handleTxIntr(), USB_init(), USB_resetDev(), and USB_setConfiguration().

#define CSL_USB_EP1_PACKET_SIZE_FS (0x40)

USB EP1 data packet size in full speed mode

Referenced by CDC_Setup(), MSC_Setup(), and USB_init().

#define CSL_USB_EP1_PACKET_SIZE_HS (0x200)

USB EP1 data packet size in high speed mode

Referenced by CDC_Setup(), MSC_Setup(), and USB_init().

#define CSL_USB_EP2 (2)

USB End point 2

Referenced by USB_epNumToHandle(), USB_handleRxIntr(), USB_init(), USB_isValidDataInFifoOut(), USB_resetDev(), and USB_setConfiguration().

#define CSL_USB_EP2_PACKET_SIZE_FS (0x40)

USB EP2 data packet size in full speed mode

Referenced by USB_init().

#define CSL_USB_EP2_PACKET_SIZE_HS (0x200)

USB EP2 data packet size in high speed mode

Referenced by USB_init().

#define CSL_USB_EP3 (3)

USB End point 3

Referenced by USB_epNumToHandle(), USB_init(), USB_resetDev(), and USB_setConfiguration().

#define CSL_USB_EP3_PACKET_SIZE_FS (0x40)

USB EP3 data packet size in full speed mode

Referenced by USB_init().

#define CSL_USB_EP3_PACKET_SIZE_HS (0x200)

USB EP3 data packet size in high speed mode

Referenced by USB_init().

#define CSL_USB_EP4 (4)

USB End point 4

Referenced by USB_epNumToHandle(), USB_init(), USB_resetDev(), and USB_setConfiguration().

#define CSL_USB_EP4_PACKET_SIZE_FS (0x40)

USB EP4 data packet size in full speed mode

Referenced by USB_init().

#define CSL_USB_EP4_PACKET_SIZE_HS (0x200)

USB EP4 data packet size in high speed mode

Referenced by USB_init().

#define CSL_USB_EP_PACKET_SIZE_FS (0x40)

USB EP data packet size in full speed mode

#define CSL_USB_EP_PACKET_SIZE_HS (0x200)

USB EP data packet size in high speed mode

#define CSL_USB_EVENT_EOT (0x0020)

USB End of posted transaction event

Referenced by AC_Open(), CDC_Setup(), and MSC_Setup().

#define CSL_USB_EVENT_HERR (0x0200)

USB Host Error event

#define CSL_USB_EVENT_HID_REPORT_TX (0x4000)

USB event transmit HID report

#define CSL_USB_EVENT_HINT (0x0100)

USB Host interrupt event

#define CSL_USB_EVENT_ISO_RX (0x0800)

USB event to receive data from isochronous endpoint

Referenced by AC_Iso().

#define CSL_USB_EVENT_ISO_TX (0x0400)

USB event to transmit data to isochronous endpoint

#define CSL_USB_EVENT_NONE (0x0000)

USB Events.

No interrupt received

Referenced by USB_getEvents(), USB_init(), and USB_peekEvents().

#define CSL_USB_EVENT_PSOF (0x0080)

USB Pre Start of Frame event

#define CSL_USB_EVENT_READ_MEDIA (0x1000)

USB event to read data from media

#define CSL_USB_EVENT_RESET (0x0001)

USB Bus Reset event

Referenced by AC_Ctrl(), AC_Open(), CDC_Setup(), MSC_Bulk(), MSC_Ctrl(), and MSC_Setup().

#define CSL_USB_EVENT_RESUME (0x0008)

USB Bus Resume event

Referenced by AC_Ctrl(), AC_Open(), CDC_Setup(), MSC_Ctrl(), and MSC_Setup().

#define CSL_USB_EVENT_SETUP (0x0010)

USB Setup Packet Received event

Referenced by AC_Ctrl(), AC_Open(), CDC_Setup(), MSC_Ctrl(), and MSC_Setup().

#define CSL_USB_EVENT_SOF (0x0002)

USB Start of Frame event

#define CSL_USB_EVENT_STPOW (0x0040)

USB Setup Packet Overwrite event

#define CSL_USB_EVENT_SUSPEND (0x0004)

USB Bus Suspend event

Referenced by AC_Ctrl(), AC_Open(), CDC_Setup(), MSC_Ctrl(), and MSC_Setup().

#define CSL_USB_EVENT_WRITE_MEDIA (0x2000)

USB event to write data to media

Referenced by AC_Iso().

#define CSL_USB_FIFO_SIZE (512)

USB Total FIFO Size 512*8 = 4096 byte

Referenced by USB_initEndptObj().

#define CSL_USB_GBL_INT_DEVCONN (1<<4)

USB Device connect interrupt

#define CSL_USB_GBL_INT_DEVDISCONN (1<<5)

USB Device disconnect interrupt

#define CSL_USB_GBL_INT_DRVVBUS (1<<8)

USB Drive VBus interrupt

#define CSL_USB_GBL_INT_RESET (1<<2)

USB Reset interrupt

#define CSL_USB_GBL_INT_RESUME (1<<1)

USB Resume interrupt

#define CSL_USB_GBL_INT_SOF (1<<3)

USB Start Of Frame interrupt

#define CSL_USB_GBL_INT_SRP (1<<6)

USB SRP interrupt

#define CSL_USB_GBL_INT_SUSPEND (1<<0)

USB Interrupt source register bit positions.

USB Suspend interrupt

#define CSL_USB_GBL_INT_VBUSERR (1<<7)

USB VBus error interrupt

#define CSL_USB_GET_CONFIGURATION (0x08)

USB get configuration request

Referenced by USB_coreEventProcessEp0().

#define CSL_USB_GET_CUR (0x81)

USB request to get current

#define CSL_USB_GET_DESCRIPTOR (0x06)

USB get descriptor request

Referenced by USB_coreEventProcessEp0().

#define CSL_USB_GET_IDLE (0x02)

USB request to get current Idle rate from HID

#define CSL_USB_GET_INTERFACE (0x0A)

USB get interface request

Referenced by USB_coreEventProcessEp0().

#define CSL_USB_GET_MAX (0x83)

USB request to get maximum

#define CSL_USB_GET_MAX_LUN (0xFE)

Get the maximum number of logical units

#define CSL_USB_GET_MEM (0x85)

USB request to get memory

#define CSL_USB_GET_MIN (0x82)

USB request to get minimum

#define CSL_USB_GET_PROTOCOL (0x03)

USB request to get whether boot or report protocol currently active in HID

#define CSL_USB_GET_REPORT (0x01)

Standard USB requests for HID class.

USB request to get Input or Feature report from HID using control transfer

#define CSL_USB_GET_RES (0x84)

USB request to get resolution

#define CSL_USB_GET_STAT (0xFF)

USB request to get status

#define CSL_USB_GET_STATUS (0x00)

Standard USB requests.

USB get status request

Referenced by USB_coreEventProcessEp0().

#define CSL_USB_HIGHBYTE_ACCESS (1)

Enables USB Low Byte Access

#define CSL_USB_IN_EP_FIFO_START (8)

USB IN End point FIFO start address

Referenced by USB_init().

#define CSL_USB_IN_TRANSFER (0x80)

Flags for transfer functions.

USB IN transfer

Referenced by CDC_bulkInHandler(), CDC_putData(), USB_coreEventProcessEp0(), USB_epNumToHandle(), and USB_postTransaction().

#define CSL_USB_INTCLRRH_LSB (0)

USB Interrupt Clear High Register LSB position

#define CSL_USB_INTCLRRH_MSB (8)

USB Interrupt Clear High Register MSB position

#define CSL_USB_INTCLRRL_LSB (0)

USB Interrupt Clear Low Register LSB position

#define CSL_USB_INTCLRRL_MSB (12)

USB Interrupt Clear Low Register MSB position

#define CSL_USB_INTMASKEDRH_LSB (0)

USB Interrupt Masked High Register LSB position

#define CSL_USB_INTMASKEDRH_MSB (8)

USB Interrupt Masked High Register MSB position

#define CSL_USB_INTMASKEDRL_LSB (0)

USB Interrupt Masked Low Register LSB position

#define CSL_USB_INTMASKEDRL_MSB (12)

USB Interrupt Masked Low Register MSB position

#define CSL_USB_INTMSKSETR1_DEFVAL (0xFFFF)

USB Interrupt mask set low register default value

Referenced by USB_resetDev().

#define CSL_USB_INTMSKSETR2_DEFVAL (0xFFF7)

USB Interrupt mask set low register default value

Referenced by USB_resetDev().

#define CSL_USB_INTRUSB_INTRUSBE_DEFVAL (0x7fff)

USB Interrupt register default values.

USB Interrupt enable register default value

Referenced by USB_resetDev().

#define CSL_USB_INVALID_MAXPOWER (0xFFFF)

USB Invalid maximum current value - returned in case of error

Referenced by USB_getMaxPower().

#define CSL_USB_IOFLAG_CAT (0x0008)

concatenate multiple linked list to fill up the data buffer with to max packet size before sending or receiving a data packet

Referenced by AC_reqGetDescriptor(), MSC_reqGetDescriptor(), and USB_coreEventProcessEp0().

#define CSL_USB_IOFLAG_EOLL (0x0010)

Ignore argument byteCnt, transfer

#define CSL_USB_IOFLAG_LNK (0x0004)

Transmit or receive data buffer passed is a linked list

Referenced by AC_reqGetDescriptor(), MSC_reqGetDescriptor(), and USB_coreEventProcessEp0().

#define CSL_USB_IOFLAG_NONE (0x0000)

USB IO Flags.

do not expect or insert a 0 byte

Referenced by AC_Ctrl(), AC_reqGetConfiguration(), AC_reqGetCurrent(), AC_reqGetDescriptor(), AC_reqGetInterface(), AC_reqGetMaximum(), AC_reqGetMaxLUN(), AC_reqGetMinimum(), AC_reqGetResolution(), AC_reqGetStatus(), AC_reqSetCurrent(), CDC_eventHandler(), CDC_reqGetConfiguration(), CDC_reqGetInterface(), CDC_reqGetMaxLUN(), CDC_reqGetStatus(), MSC_Ctrl(), MSC_ExecuteWrite(), MSC_HandlePreventAllowMediaRemoval(), MSC_HandleStartStopUnit(), MSC_HandleStateReset(), MSC_HandleStateSendCSW(), MSC_HandleStateSendData(), MSC_HandleStateSendStall(), MSC_HandleStateWaitForCBW(), MSC_reqGetConfiguration(), MSC_reqGetDescriptor(), MSC_reqGetInterface(), MSC_reqGetMaxLUN(), MSC_reqGetStatus(), and USB_coreEventProcessEp0().

#define CSL_USB_IOFLAG_NOSHORT (0x0001)

packet after a full size packet

Referenced by AC_Iso(), AC_reqGetConfiguration(), AC_reqGetDescriptor(), CDC_eventHandler(), CDC_reqGetConfiguration(), MSC_ExecuteRead(), MSC_ExecuteWrite(), MSC_HandleInquiry(), MSC_HandleModeSense10(), MSC_HandleModeSense6(), MSC_HandleReadCapacity(), MSC_HandleRequestSense(), MSC_HandleStateWaitForCBW(), MSC_HandleTestUnitReady(), MSC_HandleVerify10(), MSC_reqGetConfiguration(), MSC_reqGetDescriptor(), MSC_sendCswWithPhaseError(), and USB_coreEventProcessEp0().

#define CSL_USB_IOFLAG_NOT (0x0020)

Nothing to Transfer

Referenced by MSC_ExecuteRead(), MSC_handleDataDirMisMatch(), MSC_HandleModeSense10(), MSC_HandleModeSense6(), MSC_HandlePreventAllowMediaRemoval(), MSC_HandleStartStopUnit(), MSC_HandleStateSendingShortPkt(), MSC_HandleStateWaitForCBW(), MSC_HandleTestUnitReady(), MSC_HandleVerify10(), and USB_handleTx().

#define CSL_USB_IOFLAG_SWAP (0x0002)

swap hi/lo bytes before data transmit and after data receive

#define CSL_USB_LOWBYTE_ACCESS (2)

Enables USB High Byte Access

#define CSL_USB_LRAM0SIZE_DEFVAL (0x200)

USB Dma Linking ram size default value

Referenced by USB_initQueueManager().

#define CSL_USB_MAX_EP0_FIFO_LEN (0x0040)

USB EP0 maximum FIFO length

Referenced by USB_processEP0In(), and USB_readEP0Buf().

#define CSL_USB_MIN | ( |  | a,
|  |  | b
| ) |  | (((a)<(b))?(a):(b))

Macro to find the minimum of two values

Referenced by USB_handleRx(), USB_handleTx(), USB_processEP0In(), and USB_processEP0Out().

#define CSL_USB_OUT_EP_FIFO_START (8)

USB OUT End point FIFO start address

#define CSL_USB_OUT_TRANSFER (0x00)

USB OUT transfer

Referenced by CDC_bulkOutHandler(), and USB_postTransaction().

#define CSL_USB_PLL_PLLCNTL1_DEFVAL (0x8BE8)

PLL register default values(100MHz)

PLL control1 register default value

Referenced by USB_initPLL().

#define CSL_USB_PLL_PLLCNTL2_DEFVAL (0x0806)

PLL control1 register default value

Referenced by USB_initPLL().

#define CSL_USB_PLL_PLLINCNTL_DEFVAL (0x8000)

PLL IN control register default value

Referenced by USB_initPLL().

#define CSL_USB_PLL_PLLOUTCNTL_DEFVAL (0x0000)

PLL OUT control register default value

Referenced by USB_initPLL().

#define CSL_USB_PLL_TIMEOUT (0xFFFF)

PLL TESTLOCKMON bit timeout value

Referenced by USB_initPLL().

#define CSL_USB_QMEMRCTRL1_DEFVAL (0x200)

USB Dma Queue manager register default value

#define CSL_USB_QMEMRCTRL2_DEFVAL (0x0000)

USB Dma Queue manager register default value

Referenced by USB_initQueueManager().

#define CSL_USB_REQUEST_TYPE_DEVICE_STATUS (0x80)

USB status request types

Referenced by USB_coreEventProcessEp0().

#define CSL_USB_RX_INT_EP1 (1<<9)

USB End Point1 Rx interrupt

#define CSL_USB_RX_INT_EP2 (1<<10)

USB End Point2 Rx interrupt

#define CSL_USB_RX_INT_EP3 (1<<11)

USB End Point3 Rx interrupt

#define CSL_USB_RX_INT_EP4 (1<<12)

Bit positions for USB Rx interrupts.

USB End Point4 Rx interrupt

#define CSL_USB_RXGCR1_DEFVAL (0x401A)

USB Dma receiver config low register default value

Referenced by USB_initDma().

#define CSL_USB_RXGCR2_DEFVAL (0x8100)

USB Dma receiver config high register default value

Referenced by USB_initDma().

#define CSL_USB_SET_ADDRESS (0x05)

USB set address request

Referenced by USB_coreEventProcessEp0().

#define CSL_USB_SET_CONFIGURATION (0x09)

USB set configuration request

Referenced by USB_coreEventProcessEp0().

#define CSL_USB_SET_CUR (0x01)

Standard USB requests for audio class.

USB request to set current

#define CSL_USB_SET_DESCRIPTOR (0x07)

USB set descriptor request

#define CSL_USB_SET_FEATURE (0x03)

USB set feature request

Referenced by USB_coreEventProcessEp0().

#define CSL_USB_SET_IDLE (0x0A)

USB request to limit reporting frequency of interrupt IN endpoint when data hasn't changed since last report

#define CSL_USB_SET_INTERFACE (0x0B)

USB set interface request

Referenced by USB_coreEventProcessEp0().

#define CSL_USB_SET_MAX (0x03)

USB request to set maximum

#define CSL_USB_SET_MEM (0x05)

USB request to set memory

#define CSL_USB_SET_MIN (0x02)

USB request to set minimum

#define CSL_USB_SET_PROTOCOL (0x0B)

USB request specifying whether HID should use boot or report protocol

#define CSL_USB_SET_REPORT (0x09)

USB request to send Output or Feature report to HID using control transfer

#define CSL_USB_SET_RES (0x04)

USB request to set resolution

#define CSL_USB_SETUP_PACKET_LEN (4)

USB EP0 setup packet length

Referenced by USB_getSetupPacket().

#define CSL_USB_SYNCH_FRAME (0x0C)

USB synchronization frame request

#define CSL_USB_SYS_CTRL_REG_DEF_VAL (0x6040)

USB system register default value

Referenced by USB_init().

#define CSL_USB_TX_INT_EP1 (1<<1)

USB End Point1 Tx interrupt

#define CSL_USB_TX_INT_EP2 (1<<2)

USB End Point2 Tx interrupt

#define CSL_USB_TX_INT_EP3 (1<<3)

USB End Point3 Tx interrupt

#define CSL_USB_TX_INT_EP4 (1<<4)

Bit positions for USB Tx (EP 4 - 1) and Tx & Rx (EP0) interrupts.

USB End Point4 Tx interrupt

#define CSL_USB_TX_RX_INT_EP0 (1<<0)

USB End Point0 Tx/Rx interrupt

#define CSL_USB_WORD_ACCESS (0)

Enables USB Word Access

## Typedef Documentation

typedef void(* CSL_USB_APP_CALLBACK)(Uint16 flag)

USB application call back pointer

typedef CSL_Status(* CSL_USB_APP_TRANSFER_CALLBACK)(void *, void *)

USB application call back pointer for data transfers

typedef void(* CSL_USB_EVENT_ISR)()

USB event handler

typedef Uint16 CSL_UsbByteCount

USB Byte count remaining in a transfer

typedef Uint16 CSL_UsbEventMask

USB Event Mask

typedef Uint16 CSL_UsbFrameNum

USB Current Frame number data type

typedef Uint16 CSL_UsbIoFlags

USB IO Flags