IPC@CHIP® RTOS-PPC – API Documentation

Header image

Main page


USB constants and data types


Detailed Description

This section describes constants and data types defined by the @CHIP-RTOS-PPC USB API. Besides the entities described here, there are also some additional constants defined in usbSepc.h, which might be interesting for your application.

Data Structures

struct  UsbDevice
struct  UsbConfig
struct  UsbInterface
struct  UsbEp
struct  UsbSpecDeviceRequest

Defines

#define USB_PORT_USB1
 Port number of the USB1 port.
#define USB_PORT_USB2
 Port number of the USB2 port.
#define USB_PORT_MAX
 Port number of the last USB port.
#define USB_SPEC_PID_OUT
 OUT token PID.
#define USB_SPEC_PID_IN
 IN token PID.
#define USB_SPEC_PID_SETUP
 SETUP token PID.
#define USB_SPEC_DEVICE_REQUEST_TYPE_HOST_TO_DEVICE
 Device request with data transfer from host to device.
#define USB_SPEC_DEVICE_REQUEST_TYPE_DEVICE_TO_HOST
 Device request with data transfer from device to host.
#define USB_SPEC_DEVICE_REQUEST_TYPE_STANDARD
 Standard device request.
#define USB_SPEC_DEVICE_REQUEST_TYPE_CLASS_SPECIFIC
 Class-specific device request.
#define USB_SPEC_DEVICE_REQUEST_TYPE_VENDOR_SPECIFIC
 Vendor-specific device request.
#define USB_SPEC_DEVICE_REQUEST_TYPE_RECEIVER_DEVICE
 Device is receiver of the device request.
#define USB_SPEC_DEVICE_REQUEST_TYPE_RECEIVER_INTERFACE
 Interface is receiver of the device request.
#define USB_SPEC_DEVICE_REQUEST_TYPE_RECEIVER_ENDPOINT
 Endpoint is receiver of the device request.
#define USB_SPEC_DEVICE_REQUEST_TYPE_RECEIVER_OTHER
 User-defined entity is receiver of the device request.
#define USB_SPEC_MAX_STRING_LENGTH   126U
 Maximum string length.
#define USB_SPEC_TRANSFER_TYPE_CONTROL
 Transfer type: Control.
#define USB_SPEC_TRANSFER_TYPE_ISOCHRONOUS
 Transfer type: Isochronous.
#define USB_SPEC_TRANSFER_TYPE_BULK
 Transfer type: Bulk.
#define USB_SPEC_TRANSFER_TYPE_INTERRUPT
 Transfer type: Interrupt.
#define USB_SPEC_FEATURE_STALL
 An endpoint's stall feature.
#define USB_SPEC_FEATURE_REMOTE_WAKEUP
 An device's remote wakeup feature.
#define USB_SPEC_MAX_FRAME_NUMBER   0x7FFU
 Highest possible USB frame number.

Typedefs

typedef unsigned char UsbBool
typedef void(* UsbCallback )(unsigned epNumber, UsbEventStatus status, void *buffer, unsigned length, unsigned address)

Enumerations

enum  UsbError {
  USB_ERROR_NO = 0,
  USB_ERROR_ILLEGAL_ARGUMENT = -1,
  USB_ERROR_OUT_OF_MEMORY = -2,
  USB_ERROR_RESOURCE_LACK = -3,
  USB_ERROR_QUEUE_MAXIMUM = -4,
  USB_ERROR_FEATURE_DISABLED = -5,
  USB_ERROR_OUT_OF_INTERFACES = -6,
  USB_ERROR_OUT_OF_ENDPOINTS = -7,
  USB_ERROR_RESET_SETUP = -8,
  USB_ERROR_UNKNOWN_SERVICE = -9,
  USB_ERROR_PROTOCOL = -10,
  USB_ERROR_BUSY = -11,
  USB_ERROR_OUT_OF_DEVICES = -12,
  USB_ERROR_TIMEOUT = -13,
  USB_ERROR_QUEUE_EMPTY = -14
}
enum  UsbEventStatus {
  USB_EVENT_RECEIVED = 0,
  USB_EVENT_SENT = 1,
  USB_EVENT_RESET = 2,
  USB_EVENT_SETUP = 3,
  USB_EVENT_SUSPEND = 4,
  USB_EVENT_RESUME = 5,
  USB_EVENT_SOF = 13,
  USB_EVENT_ATTACH = 14,
  USB_EVENT_DETACH = 15,
  USB_EVENT_RELEASE = 16,
  USB_EVENT_ERROR_BIT_STUFF = 6,
  USB_EVENT_ERROR_DMA = 7,
  USB_EVENT_ERROR_TURNAROUND = 8,
  USB_EVENT_ERROR_DATA_FIELD = 9,
  USB_EVENT_ERROR_CRC16 = 10,
  USB_EVENT_ERROR_CRC5 = 11,
  USB_EVENT_ERROR_PID = 12,
  USB_EVENT_NAK = 17,
  USB_EVENT_STALL = 18,
  USB_EVENT_ERROR_DATA_OVERRUN = 25,
  USB_EVENT_ERROR_DATA_TOGGLE = 19,
  USB_EVENT_ERROR_SOF_LOST = 20,
  USB_EVENT_ERROR_SOF_BANDWIDTH = 21,
  USB_EVENT_ERROR_ATTACH = 22,
  USB_EVENT_ERROR_LOST_EVENT = 23,
  USB_EVENT_ERROR_BANDWIDTH = 24
}





Top of page | Main page

Copyright © 2017 Beck IPC GmbH
Generated on Thu Jan 26 16:21:38 2017 by Doxygen 1.6.1