Main Page Modules Alphabetical List Data Structures File List Data Fields Globals # IXP425 USB Driver Public API IXP425 USB Driver Public API. More...
## Data Structures
struct | USBDevice
| USBDevice. More...
struct | USBSetupPacket
| Standard USB Setup packet components, see the USB Specification 1.1. More...
## Defines
#define | IX_USB_MBLK
| Memory buffer.
#define | IX_USB_MBLK_DATA(buf)
| Return pointer to the data in the mbuf.
#define | IX_USB_MBLK_LEN(buf)
| Return pointer to the data length.
#define | IX_USB_MBLK_FREE(buf)
| Returns a buffer to the buffer pool.
#define | IX_USB_MBLK_PKT_LEN(buf)
| Return pointer to the total length of all the data in the mbuf chain for this packet.
#define | IX_USB_HAS_GET_ERROR_STRING
| define to enable ixUSBErrorStringGet()
#define | IX_USB_HAS_ENDPOINT_INFO_SHOW
| define to enable ixUSBEndpointInfoShow()
#define | IX_USB_HAS_STATISTICS_SHOW
| define to enable ixUSBStatisticsShow()
#define | IX_USB_STATS_SHOW_PER_ENDPOINT_INFO
| define to enable per-endpoint information in ixUSBStatisticsShow()
#define | IX_USB_HAS_VERBOSE_WARN_TRACE_MACRO
| define to enable verbose warning tracing
#define | IX_USB_HAS_CRITICAL_DATA_LOCKS
| define to enable critical data sections locking
#define | IX_USB_HAS_ASSERT_MACRO
| define to enable assertion macro
#define | IX_USB_HAS_CT_ASSERT_MACRO
| define to enable compile-time assertion macro
#define | IX_USB_HAS_INT_BIND_MACRO
| define to enable interrupt handler binding for VxWorks
#define | logMsg
#define | UDC_REGISTERS_BASE
| Base I/O address.
#define | UDC_IRQ
| IRQ.
#define | NUM_ENDPOINTS
| Number of endpoints.
#define | SETUP_PACKET_SIZE
| SETUP packet size.
#define | CONTROL_FIFO_SIZE
| CONTROL endpoint FIFO depth.
#define | CONTROL_PACKET_SIZE
| CONTROL endpoint packet size.
#define | INTERRUPT_FIFO_SIZE
| INTERRUPT endpoint FIFO depth.
#define | INTERRUPT_PACKET_SIZE
| INTERRUPT endpoint packet size.
#define | BULK_FIFO_SIZE
| BULK endpoint FIFO depth.
#define | BULK_PACKET_SIZE
| BULK endpoint packet size.
#define | ISOCHRONOUS_FIFO_SIZE
| ISOCHRONOUS endpoint FIFO depth.
#define | ISOCHRONOUS_PACKET_SIZE
| ISOCHRONOUS endpoint packet size.
#define | MAX_TRANSFER_SIZE
| Maximum data size for one transaction in bytes (bulk or control).
#define | MAX_QUEUE_SIZE
| Maximum outgoing queue size per endpoint, in elements Uses MAX_QUEUE_SIZE * (sizeof(void *)) bytes.
#define | MEM_POOL_SIZE
| Memory pool for data transactions.
#define | TRANSACTION_TIMEOUT_RX
| Maximum acceptable delay in transactions (timestamp ticks), Rx, 0 disables.
#define | TRANSACTION_TIMEOUT_TX
| Maximum acceptable delay in transactions (timestamp ticks), Tx, 0 disables.
#define | IX_USB_ERROR_BASE
| USB error base.
#define | IX_USB_ERROR
| error due to unknown reasons
#define | IX_USB_INVALID_DEVICE
| invalid USBDevice structure passed as parameter or no device present
#define | IX_USB_NO_PERMISSION
| no permission for attempted operation
#define | IX_USB_REDUNDANT
| redundant operation
#define | IX_USB_SEND_QUEUE_FULL
| send queue full
#define | IX_USB_NO_ENDPOINT
| invalid endpoint
#define | IX_USB_NO_IN_CAPABILITY
| no IN capability on endpoint
#define | IX_USB_NO_OUT_CAPABILITY
| no OUT capability on endpoint
#define | IX_USB_NO_TRANSFER_CAPABILITY
| transfer type incompatible with endpoint
#define | IX_USB_ENDPOINT_STALLED
| endpoint stalled
#define | IX_USB_INVALID_PARMS
| invalid parameter(s)
#define | IX_USB_DEVICE_DISABLED
| device is disabled
#define | IX_USB_NO_STALL_CAPABILITY
| no STALL capability
#define | EP_DIRECTION(x)
| Macro used to extract the endpoint direction from an EPDescriptorTable[] entry.
#define | EP_TYPE(x)
| Macro used to extract the endpoint type from an EPDescriptorTable[] entry.
#define | MIN(a, b)
| Compares two values and returns the minimum.
#define | MAX(a, b)
| Compares two values and returns the maximum.
#define | QUEUE_WRAP(tail)
| Ajusts the tail of a queue implemented in a circular buffer by wrapping at the buffer boundary.
#define | SWAP_USB_WORD(wPtr)
| USB byte swapping routine for a little endian platform.
#define | REG_GET(reg_ptr)
| read generic register access via register pointers
#define | REG_SET(reg_ptr, val)
| write generic register access via register pointers
#define | DREG_GET(reg_ptr)
| generic data register read access via register pointers
#define | DREG_SET(reg_ptr, val)
| generic data register write access via register pointers
#define | CONTEXT(device)
| get context from device pointer
#define | REGISTERS(device)
| get registers from device pointer
#define | EP0CONTROL(device)
| get endpoint 0 control data from device pointer
#define | EVENTS(device)
| get event processor from device pointer
#define | COUNTERS(device)
| get device counters
#define | OPERATION(device)
| get device operation
#define | EPSTATUS(device, endpointNumber)
| get endpoint status from device pointer and endpoint number
#define | EPQUEUE(device, endpointNumber)
| get endpoint queue from device pointer and endpoint number
#define | EPCOUNTERS(device, endpointNumber)
| get endpoint counters from device pointer and endpoint number
#define | RETURN_OK(device)
| set IX_SUCCESS on device and return IX_SUCCESS
#define | RETURN_ERROR(device)
| set IX_USB_ERROR on device and return IX_FAIL
#define | RETURN_INVALID_PARMS(device)
| set IX_USB_INVALID_PARAMS on device and return IX_FAIL
#define | RETURN_REDUNDANT(device)
| set IX_USB_REDUNDANT on device and return IX_FAIL
#define | RETURN_INVALID_DEVICE(device)
| set IX_USB_INVALID_PARAMS on device and return IX_FAIL
#define | RETURN_NO_ENDPOINT(device)
| set IX_USB_INVALID_PARAMS on device and return IX_FAIL
#define | RETURN_ENDPOINT_STALLED(device)
| set IX_USB_ENDPOINT_STALLED on device and return IX_FAIL
#define | RETURN_SEND_QUEUE_FULL(device)
| set IX_USB_SEND_QUEUE_FULL on device and return IX_FAIL
#define | RETURN_NO_IN_CAPABILITY(device)
| set IX_USB_NO_IN_CAPABILITY on device and return IX_FAIL
#define | RETURN_NO_STALL_CAPABILITY(device)
| set IX_USB_NO_STALL_CAPABILITY on device and return IX_FAIL
#define | RETURN_NO_PERMISSION(device)
| set IX_USB_NO_PERMISSION on device and return IX_FAIL
#define | CHECK_DEVICE(device)
| sanity checks for device existence
#define | CHECK_DEVICE_ENABLED(device)
| sanity checks for device enable status
#define | CHECK_ENDPOINT(device, endpointNumber)
| sanity check for endpoint existence
#define | CHECK_ENDPOINT_STALL(device, endpointNumber)
| sanity check for endpoint stall
#define | CHECK_EVENT_MASK(device, eventMask)
| sanity check for event masks
#define | CHECK_ENDPOINT_QUEUE(epData)
| sanity check for endpoint queue size
#define | CHECK_ENDPOINT_IN_CAPABILITY(epData, device)
| sanity check for endpoint IN capability
#define | IX_USB_TRACE
| no trace macro
#define | IX_USB_LOCK
| dummy critial data section lock
#define | IX_USB_UNLOCK(state)
| dummy critial data section unlock
#define | IX_USB_IRQ_LOCK
| dummy irq lock
#define | IX_USB_IRQ_UNLOCK(state)
| dummy irq unlock
#define | USB_CONTEXT_SIZE
| USB context size.
## Typedefs
typedef UINT16 | USBEventSet
typedef void(* | USBEventCallback )(USBDevice *device, USBEventSet events)
typedef void(* | USBSetupCallback )(USBDevice *device, const char *packet)
typedef void(* | USBReceiveCallback )(USBDevice *device, UINT16 sourceEndpoint, IX_USB_MBLK *receiveBuffer)
## Enumerations
enum | USBEndpointDirection { USB_NO_DATA, USB_IN, USB_OUT, USB_IN_OUT }
| USB endpoint direction. More...
enum | USBEndpointType { USB_CONTROL, USB_BULK, USB_INTERRUPT, USB_ISOCHRONOUS }
| Note: the values are set for compatibility with USBEndpointDirection. More...
enum | USBEventMap { USB_NO_EVENT, USB_RESET, USB_SUSPEND, USB_RESUME, USB_SOF, USB_DEVICE_EVENTS, USB_BUS_EVENTS, USB_ALL_EVENTS }
| USB Event Map. More...
enum | USBDeviceFlags { ENABLE_RX_SEQ, ENABLE_TX_SEQ }
| USB Device Flags. More...
enum | USBEndpointNumber { ENDPOINT_0, ENDPOINT_1, ENDPOINT_2, ENDPOINT_3, ENDPOINT_4, ENDPOINT_5, ENDPOINT_6, ENDPOINT_7, ENDPOINT_8, ENDPOINT_9, ENDPOINT_10, ENDPOINT_11, ENDPOINT_12, ENDPOINT_13, ENDPOINT_14, ENDPOINT_15 }
| USB endpoint number. More...
enum | USBStdRequestType { GET_STATUS_REQUEST, CLEAR_FEATURE_REQUEST, SET_FEATURE_REQUEST, SET_ADDRESS_REQUEST, GET_DESCRIPTOR_REQUEST, SET_DESCRIPTOR_REQUEST, GET_CONFIGURATION_REQUEST, SET_CONFIGURATION_REQUEST, GET_INTERFACE_REQUEST, SET_INTERFACE_REQUEST, SYNCH_FRAME_REQUEST }
| Standard USB request types. More...
enum | USBStdDescriptorType { USB_DEVICE_DESCRIPTOR, USB_CONFIGURATION_DESCRIPTOR, USB_STRING_DESCRIPTOR, USB_INTERFACE_DESCRIPTOR, USB_ENDPOINT_DESCRIPTOR }
| Standard USB descriptor types. More...
enum | USBStdFeatureSelector { ENDPOINT_STALL, DEVICE_REMOTE_WAKEUP }
| Standard USB SET/CLEAR_FEATURE feature selector. More...
enum | USBStdLanguageId { USB_ENGLISH_LANGUAGE }
| Standard language IDs used by USB. More...
enum | USBStdEndpointType { USB_CONTROL_ENDPOINT, USB_ISOCHRONOUS_ENDPOINT, USB_BULK_ENDPOINT, USB_INTERRUPT_ENDPOINT }
| Standard USB endpoint types. More...
enum | USBStdEndpointDirection { USB_ENDPOINT_OUT, USB_ENDPOINT_IN }
| Standard USB directions. More...
## Functions
PUBLIC IX_STATUS | ixUSBDriverInit (USBDevice *device)
| Initialize driver and USB Device Controller.
PUBLIC IX_STATUS | ixUSBDeviceEnable (USBDevice *device, BOOL enableDevice)
| Enable or disable the device.
PUBLIC IX_STATUS | ixUSBEndpointStall (USBDevice *device, UINT16 endpointNumber, BOOL stallFlag)
| Enable or disable endpoint stall (or halt feature).
PUBLIC IX_STATUS | ixUSBEndpointClear (USBDevice *device, UINT16 endpointNumber)
| Free all Rx/Tx buffers associated with an endpoint.
PUBLIC IX_STATUS | ixUSBSignalResume (USBDevice *device)
| Trigger signal resuming on the bus.
PUBLIC IX_STATUS | ixUSBFrameCounterGet (USBDevice *device, UINT16 *counter)
| Retrieve the 11-bit frame counter.
PUBLIC IX_STATUS | ixUSBReceiveCallbackRegister (USBDevice *device, USBReceiveCallback callbackFunction)
| Register a data receive callback.
PUBLIC IX_STATUS | ixUSBSetupCallbackRegister (USBDevice *device, USBSetupCallback callbackFunction)
| Register a setup receive callback.
PUBLIC IX_STATUS | ixUSBBufferSubmit (USBDevice *device, UINT16 destinationEndpoint, IX_USB_MBLK *sendBuffer)
| Submit a buffer for transmit.
PUBLIC IX_STATUS | ixUSBBufferCancel (USBDevice *device, UINT16 destinationEndpoint, IX_USB_MBLK *sendBuffer)
| Cancel a buffer previously submitted for transmitting.
PUBLIC IX_STATUS | ixUSBEventCallbackRegister (USBDevice *device, USBEventCallback eventCallback, USBEventMap eventMap)
| Register an event callback.
PUBLIC IX_STATUS | ixUSBIsEndpointStalled (USBDevice *device, UINT16 endpointNumber, BOOL *stallState)
| Retrieve an endpoint's stall status.
PUBLIC IX_STATUS | ixUSBStatisticsShow (USBDevice *device)
| Display device state and statistics.
PUBLIC const char * | ixUSBErrorStringGet (UINT32 errorCode)
| Convert an error code into a human-readable string error message.
PUBLIC IX_STATUS | ixUSBEndpointInfoShow (USBDevice *device)
| Display endpoint information table.
int | logMsg (char *fmt,...)
## Detailed Description IXP425 USB Driver Public API. ## Define Documentation
#define BULK_FIFO_SIZE
| BULK endpoint FIFO depth. Definition at line 98 of file usbdeviceparam.h.
#define BULK_PACKET_SIZE
| BULK endpoint packet size. Definition at line 101 of file usbdeviceparam.h.
#define CHECK_DEVICE | ( | device |  | ) |
| sanity checks for device existence Definition at line 277 of file usbmacros.h.
#define CHECK_DEVICE_ENABLED | ( | device |  | ) |
| sanity checks for device enable status Definition at line 289 of file usbmacros.h.
#define CHECK_ENDPOINT | ( | device,
|  | endpointNumber |  | ) |
| sanity check for endpoint existence Definition at line 297 of file usbmacros.h.
#define CHECK_ENDPOINT_IN_CAPABILITY | ( | epData,
|  | device |  | ) |
| sanity check for endpoint IN capability Definition at line 330 of file usbmacros.h.
#define CHECK_ENDPOINT_QUEUE | ( | epData |  | ) |
| sanity check for endpoint queue size Definition at line 323 of file usbmacros.h.
#define CHECK_ENDPOINT_STALL | ( | device,
|  | endpointNumber |  | ) |
| sanity check for endpoint stall Definition at line 304 of file usbmacros.h.
#define CHECK_EVENT_MASK | ( | device,
|  | eventMask |  | ) |
| sanity check for event masks Definition at line 316 of file usbmacros.h.
#define CONTEXT | ( | device |  | ) |
| get context from device pointer Definition at line 195 of file usbmacros.h.
#define CONTROL_FIFO_SIZE
| CONTROL endpoint FIFO depth. Definition at line 86 of file usbdeviceparam.h.
#define CONTROL_PACKET_SIZE
| CONTROL endpoint packet size. Definition at line 89 of file usbdeviceparam.h.
#define COUNTERS | ( | device |  | ) |
| get device counters Definition at line 207 of file usbmacros.h.
#define DREG_GET | ( | reg_ptr |  | ) |
| generic data register read access via register pointers Definition at line 168 of file usbmacros.h.
#define DREG_SET | ( | reg_ptr,
|  | val |  | ) |
| generic data register write access via register pointers Definition at line 170 of file usbmacros.h.
#define EP0CONTROL | ( | device |  | ) |
| get endpoint 0 control data from device pointer Definition at line 201 of file usbmacros.h.
#define EP_DIRECTION | ( | x |  | ) |
  | Macro used to extract the endpoint direction from an EPDescriptorTable[] entry. Parameters:
  x | int (in) - the endpoint description entry
Returns: the endpoint direction (USB_IN, USB_OUT or USB_IN_OUT) Definition at line 84 of file usbmacros.h.
#define EP_TYPE | ( | x |  | ) |
  | Macro used to extract the endpoint type from an EPDescriptorTable[] entry. Parameters:
  x | int (in) - the endpoint description entry
Returns: the endpoint type (USB_CONTROL, USB_BULK, USB_ISOCHRONOUS, USB_INTERRUPT) Definition at line 96 of file usbmacros.h.
#define EPCOUNTERS | ( | device,
|  | endpointNumber |  | ) |
| get endpoint counters from device pointer and endpoint number Definition at line 219 of file usbmacros.h.
#define EPQUEUE | ( | device,
|  | endpointNumber |  | ) |
| get endpoint queue from device pointer and endpoint number Definition at line 216 of file usbmacros.h.
#define EPSTATUS | ( | device,
|  | endpointNumber |  | ) |
| get endpoint status from device pointer and endpoint number Definition at line 213 of file usbmacros.h.
#define EVENTS | ( | device |  | ) |
| get event processor from device pointer Definition at line 204 of file usbmacros.h.
#define INTERRUPT_FIFO_SIZE
| INTERRUPT endpoint FIFO depth. Definition at line 92 of file usbdeviceparam.h.
#define INTERRUPT_PACKET_SIZE
| INTERRUPT endpoint packet size. Definition at line 95 of file usbdeviceparam.h.
#define ISOCHRONOUS_FIFO_SIZE
| ISOCHRONOUS endpoint FIFO depth. Definition at line 111 of file usbdeviceparam.h.
#define ISOCHRONOUS_PACKET_SIZE
| ISOCHRONOUS endpoint packet size. Definition at line 114 of file usbdeviceparam.h.
#define IX_USB_DEVICE_DISABLED
| device is disabled Definition at line 105 of file usberrors.h.
#define IX_USB_ENDPOINT_STALLED
| endpoint stalled Definition at line 99 of file usberrors.h.
#define IX_USB_ERROR
| error due to unknown reasons Definition at line 72 of file usberrors.h.
#define IX_USB_ERROR_BASE
| USB error base. Definition at line 68 of file usberrors.h.
#define IX_USB_HAS_ASSERT_MACRO
| define to enable assertion macro Definition at line 134 of file usbconfig.h.
#define IX_USB_HAS_CRITICAL_DATA_LOCKS
| define to enable critical data sections locking Definition at line 130 of file usbconfig.h.
#define IX_USB_HAS_CT_ASSERT_MACRO
| define to enable compile-time assertion macro Definition at line 137 of file usbconfig.h.
#define IX_USB_HAS_ENDPOINT_INFO_SHOW
| define to enable ixUSBEndpointInfoShow() Definition at line 72 of file usbconfig.h.
#define IX_USB_HAS_GET_ERROR_STRING
| define to enable ixUSBErrorStringGet() Definition at line 69 of file usbconfig.h.
#define IX_USB_HAS_INT_BIND_MACRO
| define to enable interrupt handler binding for VxWorks Definition at line 140 of file usbconfig.h.
#define IX_USB_HAS_STATISTICS_SHOW
| define to enable ixUSBStatisticsShow() Definition at line 78 of file usbconfig.h.
#define IX_USB_HAS_VERBOSE_WARN_TRACE_MACRO
| define to enable verbose warning tracing Definition at line 124 of file usbconfig.h.
#define IX_USB_INVALID_DEVICE
| invalid USBDevice structure passed as parameter or no device present Definition at line 75 of file usberrors.h.
#define IX_USB_INVALID_PARMS
| invalid parameter(s) Definition at line 102 of file usberrors.h.
#define IX_USB_IRQ_LOCK
| dummy irq lock Definition at line 533 of file usbmacros.h.
#define IX_USB_IRQ_UNLOCK | ( | state |  | ) |
| dummy irq unlock Definition at line 536 of file usbmacros.h.
#define IX_USB_LOCK
| dummy critial data section lock Definition at line 527 of file usbmacros.h.
#define IX_USB_MBLK
| Memory buffer. Definition at line 91 of file usbbasictypes.h.
#define IX_USB_MBLK_DATA | ( | buf |  | ) |
| Return pointer to the data in the mbuf. Definition at line 94 of file usbbasictypes.h.
#define IX_USB_MBLK_FREE | ( | buf |  | ) |
| Returns a buffer to the buffer pool. Definition at line 100 of file usbbasictypes.h.
#define IX_USB_MBLK_LEN | ( | buf |  | ) |
| Return pointer to the data length. Definition at line 97 of file usbbasictypes.h.
#define IX_USB_MBLK_PKT_LEN | ( | buf |  | ) |
| Return pointer to the total length of all the data in the mbuf chain for this packet. Definition at line 103 of file usbbasictypes.h.
#define IX_USB_NO_ENDPOINT
| invalid endpoint Definition at line 87 of file usberrors.h.
#define IX_USB_NO_IN_CAPABILITY
| no IN capability on endpoint Definition at line 90 of file usberrors.h.
#define IX_USB_NO_OUT_CAPABILITY
| no OUT capability on endpoint Definition at line 93 of file usberrors.h.
#define IX_USB_NO_PERMISSION
| no permission for attempted operation Definition at line 78 of file usberrors.h.
#define IX_USB_NO_STALL_CAPABILITY
| no STALL capability Definition at line 108 of file usberrors.h.
#define IX_USB_NO_TRANSFER_CAPABILITY
| transfer type incompatible with endpoint Definition at line 96 of file usberrors.h.
#define IX_USB_REDUNDANT
| redundant operation Definition at line 81 of file usberrors.h.
#define IX_USB_SEND_QUEUE_FULL
| send queue full Definition at line 84 of file usberrors.h.
#define IX_USB_STATS_SHOW_PER_ENDPOINT_INFO
| define to enable per-endpoint information in ixUSBStatisticsShow() Definition at line 100 of file usbconfig.h.
#define IX_USB_TRACE
| no trace macro Definition at line 379 of file usbmacros.h.
#define IX_USB_UNLOCK | ( | state |  | ) |
| dummy critial data section unlock Definition at line 530 of file usbmacros.h.
#define MAX | ( | a,
|  | b |  | ) |
  | Compares two values and returns the maximum. Parameters:
  a | - first value
  b | - second value
Returns: maximum of the two input values Definition at line 125 of file usbmacros.h.
#define MAX_QUEUE_SIZE
| Maximum outgoing queue size per endpoint, in elements Uses MAX_QUEUE_SIZE * (sizeof(void *)) bytes. Definition at line 75 of file usbdriverparam.h.
#define MAX_TRANSFER_SIZE
| Maximum data size for one transaction in bytes (bulk or control). Definition at line 69 of file usbdriverparam.h.
#define MEM_POOL_SIZE
| Memory pool for data transactions. Definition at line 78 of file usbdriverparam.h.
#define MIN | ( | a,
|  | b |  | ) |
  | Compares two values and returns the minimum. Parameters:
  a | - first value
  b | - second value
Returns: minimum of the two input values Definition at line 110 of file usbmacros.h.
#define NUM_ENDPOINTS
| Number of endpoints. Definition at line 80 of file usbdeviceparam.h.
#define OPERATION | ( | device |  | ) |
| get device operation Definition at line 210 of file usbmacros.h.
#define QUEUE_WRAP | ( | tail |  | ) |
  | Ajusts the tail of a queue implemented in a circular buffer by wrapping at the buffer boundary. Parameters:
  tail | int - virtual tail offset
Returns: the real adjusted tail offset Definition at line 139 of file usbmacros.h.
#define REG_GET | ( | reg_ptr |  | ) |
| read generic register access via register pointers Definition at line 163 of file usbmacros.h.
#define REG_SET | ( | reg_ptr,
|  | val |  | ) |
| write generic register access via register pointers Definition at line 165 of file usbmacros.h.
#define REGISTERS | ( | device |  | ) |
| get registers from device pointer Definition at line 198 of file usbmacros.h.
#define RETURN_ENDPOINT_STALLED | ( | device |  | ) |
| set IX_USB_ENDPOINT_STALLED on device and return IX_FAIL Definition at line 252 of file usbmacros.h.
#define RETURN_ERROR | ( | device |  | ) |
| set IX_USB_ERROR on device and return IX_FAIL Definition at line 227 of file usbmacros.h.
#define RETURN_INVALID_DEVICE | ( | device |  | ) |
| set IX_USB_INVALID_PARAMS on device and return IX_FAIL Definition at line 242 of file usbmacros.h.
#define RETURN_INVALID_PARMS | ( | device |  | ) |
| set IX_USB_INVALID_PARAMS on device and return IX_FAIL Definition at line 232 of file usbmacros.h.
#define RETURN_NO_ENDPOINT | ( | device |  | ) |
| set IX_USB_INVALID_PARAMS on device and return IX_FAIL Definition at line 247 of file usbmacros.h.
#define RETURN_NO_IN_CAPABILITY | ( | device |  | ) |
| set IX_USB_NO_IN_CAPABILITY on device and return IX_FAIL Definition at line 262 of file usbmacros.h.
#define RETURN_NO_PERMISSION | ( | device |  | ) |
| set IX_USB_NO_PERMISSION on device and return IX_FAIL Definition at line 272 of file usbmacros.h.
#define RETURN_NO_STALL_CAPABILITY | ( | device |  | ) |
| set IX_USB_NO_STALL_CAPABILITY on device and return IX_FAIL Definition at line 267 of file usbmacros.h.
#define RETURN_OK | ( | device |  | ) |
| set IX_SUCCESS on device and return IX_SUCCESS Definition at line 222 of file usbmacros.h.
#define RETURN_REDUNDANT | ( | device |  | ) |
| set IX_USB_REDUNDANT on device and return IX_FAIL Definition at line 237 of file usbmacros.h.
#define RETURN_SEND_QUEUE_FULL | ( | device |  | ) |
| set IX_USB_SEND_QUEUE_FULL on device and return IX_FAIL Definition at line 257 of file usbmacros.h.
#define SETUP_PACKET_SIZE
| SETUP packet size. Definition at line 83 of file usbdeviceparam.h.
#define SWAP_USB_WORD | ( | wPtr |  | ) |
| USB byte swapping routine for a little endian platform. Definition at line 154 of file usbmacros.h.
#define TRANSACTION_TIMEOUT_RX
| Maximum acceptable delay in transactions (timestamp ticks), Rx, 0 disables. Definition at line 81 of file usbdriverparam.h.
#define TRANSACTION_TIMEOUT_TX
| Maximum acceptable delay in transactions (timestamp ticks), Tx, 0 disables. Definition at line 84 of file usbdriverparam.h.
#define UDC_IRQ
| IRQ. Definition at line 77 of file usbdeviceparam.h.
#define UDC_REGISTERS_BASE
| Base I/O address. Definition at line 74 of file usbdeviceparam.h.
#define USB_CONTEXT_SIZE
| USB context size. Definition at line 69 of file usbtypes.h.
## Enumeration Type Documentation
enum USBDeviceFlags
| USB Device Flags. Definition at line 108 of file usbconstants.h.
enum USBEndpointDirection
| USB endpoint direction. Definition at line 69 of file usbconstants.h.
enum USBEndpointNumber
| USB endpoint number. Definition at line 117 of file usbconstants.h.
enum USBEndpointType
| Note: the values are set for compatibility with USBEndpointDirection. NB: THESE ARE NOT STANDARD USB ENDPOINT TYPES TO BE USED IN DESCRIPTORS, see usbstd.h Definition at line 82 of file usbconstants.h.
enum USBEventMap
  | USB Event Map. Enumeration values:
  USB_SOF | Start Of Frame.
Definition at line 93 of file usbconstants.h.
enum USBStdDescriptorType
| Standard USB descriptor types. Definition at line 90 of file usbstd.h.
enum USBStdEndpointDirection
| Standard USB directions. Definition at line 130 of file usbstd.h.
enum USBStdEndpointType
| Standard USB endpoint types. Definition at line 119 of file usbstd.h.
enum USBStdFeatureSelector
| Standard USB SET/CLEAR_FEATURE feature selector. Definition at line 102 of file usbstd.h.
enum USBStdLanguageId
| Standard language IDs used by USB. Definition at line 111 of file usbstd.h.
enum USBStdRequestType
| Standard USB request types. Definition at line 72 of file usbstd.h.
## Function Documentation
PUBLIC IX_STATUS ixUSBBufferCancel | ( | USBDevice * | device,
|  | UINT16 | destinationEndpoint,
|  | IX_USB_MBLK * | sendBuffer
| ) |
  | Cancel a buffer previously submitted for transmitting. Parameters:
  device | USBDevice * (in) - a structure identifying the device
  destinationEndpoint | UINT16 (in) - endpoint originally used for transmitting the data buffer
  sendBuffer | IX_USB_MBLK * (in) - sumbitted data buffer
Returns: IX_SUCCESS if the initialization was successful, IX_FAIL otherwise, in which case a detailed error code will be set in the lastError field, unless the device parameter is NULL.
PUBLIC IX_STATUS ixUSBBufferSubmit | ( | USBDevice * | device,
|  | UINT16 | destinationEndpoint,
|  | IX_USB_MBLK * | sendBuffer
| ) |
  | Submit a buffer for transmit. Parameters:
  device | USBDevice * (in) - a structure identifying the device
  destinationEndpoint | UINT16 (in) - endpoint to be used for transmitting the data buffer
  sendBuffer | IX_USB_MBLK * (in) - data buffer
Returns: IX_SUCCESS if the initialization was successful, IX_FAIL otherwise, in which case a detailed error code will be set in the lastError field, unless the device parameter is NULL.
PUBLIC IX_STATUS ixUSBDeviceEnable | ( | USBDevice * | device,
|  | BOOL | enableDevice
| ) |
  | Enable or disable the device. Parameters:
  device | USBDevice * (in) - a structure identifying the device
  enableDevice | BOOL (in) - true to enable the device and false to disable it
This function enables or disables the device. A disabled device doesn't generate events and cannot send or receive data. Disabling the device frees and discards all existent Rx/Tx buffers (received buffers that weren't dispatched yet and buffers waiting to be transmitted) Returns: IX_SUCCESS if the initialization was successful, IX_FAIL otherwise, in which case a detailed error code will be set in the lastError field, unless the device parameter is NULL.
PUBLIC IX_STATUS ixUSBDriverInit | ( | USBDevice * | device | ) |
  | Initialize driver and USB Device Controller. Parameters:
  device | USBDevice * (inout) - a structure identifying the device
This function initializes the UDC and all the data structures used to interact with the controller. It is the responsibility of the caller to create the USBDevice structure and fill in the correct baseIOAddress and interruptLevel fields. After successful initialization the device will be inactive - use ixUSBDeviceEnable to activate the device. Use the flags component of the device structure to pass in additional flags such as ENABLE_RX_SEQ or ENABLE_TX_SEQ. Changing these flags later will have no effect. The driver will assign a device number which will be placed in the deviceIndex field. The initialized device structure must be used for all interations with the USB controller. The same device pointer will be passed in to all the registered client callbacks. The deviceIndex and deviceContext should be treated as read-only fields. A check to verify that the USB device is present is performed and a warning is issued if the device is not present. Warning: This function is not reentrant. Returns: IX_SUCCESS if the initialization was successful; a warning is issued if the specified USB device is not present. IX_FAIL otherwise,in which case a detailed error code will be set in the lastError field, unless the device parameter is NULL.
PUBLIC IX_STATUS ixUSBEndpointClear | ( | USBDevice * | device,
|  | UINT16 | endpointNumber
| ) |
  | Free all Rx/Tx buffers associated with an endpoint. Parameters:
  device | USBDevice * (in) - a structure identifying the device
  endpointNumber | UINT16 (in) - endpoint number
This function discards and frees all Tx/Rx buffers associated with an endpoint. The corresponding endpoint dropped packet counters will also be incremented. Returns: IX_SUCCESS if the initialization was successful, IX_FAIL otherwise, in which case a detailed error code will be set in the lastError field, unless the device parameter is NULL.
PUBLIC void ixUSBEndpointInfoShow | ( | USBDevice * | device | ) |
  | Display endpoint information table. Parameters:
  device | USBDevice * (in) - a structure identifying the device
Returns: none
PUBLIC IX_STATUS ixUSBEndpointStall | ( | USBDevice * | device,
|  | UINT16 | endpointNumber,
|  | BOOL | stallFlag
| ) |
  | Enable or disable endpoint stall (or halt feature). Parameters:
  device | USBDevice * (in) - a structure identifying the device
  endpointNumber | UINT16 (in) - endpoint number
  stallFlag | BOOL (in) - true to set endpoint stall and false to clear it
This function clears or sets the endpoint stall (or halt) feature. Both IN and OUT endpoints can be stalled. A stalled endpoint will not send or receive data. Instead, it will send USB STALL packets in response to IN or OUT tokens. Unstalling endpoints can be done only by using this function with the exception of endpoint 0 which unstalls itself automatically upon receiving a new SETUP packet, as required by the USB 1.1 Specification. Isochronous endpoints cannot be stalled and attempting to do so will return an IX_USB_NO_STALL_CAPABILITY failure. Returns: IX_SUCCESS if the initialization was successful, IX_FAIL otherwise, in which case a detailed error code will be set in the lastError field, unless the device parameter is NULL.
PUBLIC const char * ixUSBErrorStringGet | ( | UINT32 | errorCode | ) |
  | Convert an error code into a human-readable string error message. Parameters:
  errorCode | UINT32 (in) - erorr code as defined in usberrors.h
Returns: a `const char *` pointer to the error message
PUBLIC IX_STATUS ixUSBEventCallbackRegister | ( | USBDevice * | device,
|  | USBEventCallback | eventCallback,
|  | USBEventMap | eventMap
| ) |
  | Register an event callback. Parameters:
  device | USBDevice * (in) - a structure identifying the device
  eventCallback | USBEventCallback (in) - event callback function
  eventMap | USBEventMap (in) - event map
Returns: IX_SUCCESS if the initialization was successful, IX_FAIL otherwise, in which case a detailed error code will be set in the lastError field, unless the device parameter is NULL.
PUBLIC IX_STATUS ixUSBFrameCounterGet | ( | USBDevice * | device,
|  | UINT16 * | counter
| ) |
  | Retrieve the 11-bit frame counter. Parameters:
  device | USBDevice * (in) - a structure identifying the device
  counter | UINT16 * (out) - the 11-bit frame counter
This function returns the hardware USB frame counter. Since the counter is 11-bit wide it rolls over after every 2048 frames. Returns: IX_SUCCESS if the initialization was successful, IX_FAIL otherwise, in which case a detailed error code will be set in the lastError field, unless the device parameter is NULL.
PUBLIC IX_STATUS ixUSBIsEndpointStalled | ( | USBDevice * | device,
|  | UINT16 | endpointNumber,
|  | BOOL * | stallState
| ) |
  | Retrieve an endpoint's stall status. Parameters:
  device | USBDevice * (in) - a structure identifying the device
  endpointNumber | UINT16 (in) - endpoint number
  stallState | BOOL * (out) - stall state; true if the endpoint is stalled (halted) or false otherwisetrue
Returns: IX_SUCCESS or IX_FAIL if the device pointer is invalid or the endpoint doesn't exist
PUBLIC IX_STATUS ixUSBReceiveCallbackRegister | ( | USBDevice * | device,
|  | USBReceiveCallback | callbackFunction
| ) |
  | Register a data receive callback. Parameters:
  device | USBDevice * (in) - a structure identifying the device
  callbackFunction | USBReceiveCallback (in) - receive callback function
Returns: IX_SUCCESS if the initialization was successful, IX_FAIL otherwise, in which case a detailed error code will be set in the lastError field, unless the device parameter is NULL.
PUBLIC IX_STATUS ixUSBSetupCallbackRegister | ( | USBDevice * | device,
|  | USBSetupCallback | callbackFunction
| ) |
  | Register a setup receive callback. Parameters:
  device | USBDevice * (in) - a structure identifying the device
  callbackFunction | USBSetupCallback (in) - setup callback function
Returns: IX_SUCCESS if the initialization was successful, IX_FAIL otherwise, in which case a detailed error code will be set in the lastError field, unless the device parameter is NULL.
PUBLIC IX_STATUS ixUSBSignalResume | ( | USBDevice * | device | ) |
  | Trigger signal resuming on the bus. Parameters:
  device | USBDevice * (in) - a structure identifying the device
This function triggers signal resuming on the bus, waking up the USB host. Is should be used only if the host has enabled the device to do so using the standard SET_FEATURE USB request, otherwise the function will return IX_FAIL and set the lastError field to IX_USB_NO_PERMISSION. Returns: IX_SUCCESS if the initialization was successful, IX_FAIL otherwise, in which case a detailed error code will be set in the lastError field, unless the device parameter is NULL.
PUBLIC IX_STATUS ixUSBStatisticsShow | ( | USBDevice * | device | ) |
  | Display device state and statistics. Parameters:
  device | USBDevice * (in) - a structure identifying the device
Returns: IX_SUCCESS if the initialization was successful, IX_FAIL otherwise, in which case a detailed error code will be set in the lastError field, unless the device parameter is NULL.
Automatically generated from sources. © Intel Corp. 2003