
AN758
Rev. 0.1 15
5.3.6. EVENT_USB_Device_ConfigurationChanged
Event handler for the library USB Configuration changed event.
Syntax
void EVENT_USB_Device_ConfigurationChanged(void)
Parameters
None
Return Value
None
Description
This function configures endpoint according USB CDC class interface configuration structure.
Example
EVENT_USB_Device_ConfigurationChanged();
5.3.7. CALLBACK_USB_GetDescriptor
Send back descriptor per Get Descriptor request.
Syntax
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
const uint8_t wIndex,
const void** const DescriptorAddress)
Parameters
None
Return Value
Descriptor size
Description
When the device receives a Get Descriptor request on the control endpoint, this function is called so that the
descriptor details can be passed back and the appropriate descriptor sent back to the USB host.
Example
const void* DescriptorPointer;
uint16_t DescriptorSize;
if ((DescriptorSize = CALLBACK_USB_GetDescriptor(USB_ControlRequest.wValue,
USB_ControlRequest.wIndex,&DescriptorPointer )) == NO_DESCRIPTOR)
{
return;
}
Endpoint_ClearSETUP();
Endpoint_Write_Control_Stream_LE(DescriptorPointer, DescriptorSize);
Comentários a estes Manuais