@CHIP-RTOS C Library V2.06 - USB API
usbDeviceAddSpecificDesc
This function can be used to add class- oder vendor-specific
descriptors to the Configuration, to an interface or an endpoint.
A buffer has to be allocated by the application into which the
descriptor is written. Several descriptors can be written in this
single buffer, but only one buffer can be added to each entity.
The buffer must be available during the whole program execution
because the RTOS USB-driver will not copy it. The specific
descriptors will be concatenated to the resp. standard descriptors. int usbDeviceAddSpecificDesc( unsigned char descriptorType,
unsigned char idNumber,
char far *descriptor,
unsigned char descriptorLength ); Parameters
descriptorType
- Type of entity to which the specific
descriptor is to be added. These are possible values:
- USB_SPEC_DESCRIPTOR_TYPE_CONFIG
- USB_SPEC_DESCRIPTOR_TYPE_INTERFACE
- USB_SPEC_DESCRIPTOR_TYPE_EP
The symbolic names are defined in USB_SPEC.H.
idNumber
- ID/number of entity to which the specific
descriptor is to be added. If the descriptor type is
USB_SPEC_DESCRIPTOR_TYPE_EP this is the endpoint number. If
descriptor type is USB_SPEC_DESCRIPTOR_TYPE_INTERFACE
this is the index of the interface. If descriptor type is
USB_SPEC_DESCRIPTOR_TYPE_CONFIG this parameter should be 0.
descriptor
- Pointer to the buffer containing the descriptor(s)
descriptorLength
- Length of the descriptor(s) in bytes
Return Value
- Error code
Comments
- If a specific descriptor is added to an interface it is added to all
alternate settings.
RTOS API
- This library function uses a dynamic link to reach the function
USB_SERVICE_DEVICE_ADD_SPECIFIC_DESC offered by RTOS USB
Software Interrupt.
Supported since or modified in @CHIP-RTOS version-
SC12 | SC13 | SC11 | SC1x3 |
-
n/a | n/a | n/a | V0.90 |
Supported by @CHIP-RTOS C Library since version
This API List
List of C Libraries
@CHIP-RTOS Main Index
End of document
|