www.beck-ipc.com

@CHIP-RTOS C Library V2.06 - USB API


usbDeviceConfigEp

This function can be used to configure an endpoint. Transfer type and the transfer direction can be configured once for each endpoint. The maximum packet size and the polling interval can be configured for each alternate setting of the interface that the endpoint is associated to.

int usbDeviceConfigEp( unsigned char interfaceId,

unsigned char altSettingId,
unsigned char epNumber,
unsigned char transferType,
UsbBool in,
unsigned maxPacketSize,
unsigned char interval );

Parameters

interfaceId

ID of the interface the endpoint is associated to

altSettingId

ID of the alternate setting to the given interface

epNumber

Number of the endpoint that is to be configured

transferType

Transfer type; possible values are:
  • USB_SPEC_TRANSFER_TYPE_CONTROL
  • USB_SPEC_TRANSFER_TYPE_ISOCHRONOUS
  • USB_SPEC_TRANSFER_TYPE_BULK
  • USB_SPEC_TRANSFER_TYPE_INTERRUPT
The symbolic names are defined in USB_SPEC.H.

in

TRUE, if this is an IN-endpoint, which means that data is transfered from the device to the host. This parameter is ignored for control-endpoints.

maxPacketSize

Maximum size of packets sent/received through this endpoint; Please note that the packet size may also be limited by the USB specification and by the capabilities of the controller.

interval

Polling interval for interrupt and isochronous endpoints; given in 2ms steps.

Return Value

Maximum packet size set (respecting the USB specification and the capabilities of the controller) or Error code

RTOS API

This library function uses a dynamic link to reach the function USB_SERVICE_DEVICE_CONFIG_EP offered by RTOS USB Software Interrupt.

Related Topics

C-library function usbDeviceRegisterInterface()
C-library function usbDeviceRegisterAltSetting()
C-library function usbDeviceGetEps()

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3
    n/an/an/aV0.90

Supported by @CHIP-RTOS C Library since version

    CLIB
    V2.01

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document