Functions | |
void | usb_user_endpoint_init (uint8_t) |
This function configures the endpoints of the device application. More... | |
bool | usb_user_get_descriptor (uint8_t, uint8_t) |
This function returns the size and the pointer on a user information structure. More... | |
uint8_t | usb_user_interface_get (uint16_t wInterface) |
void | usb_user_interface_reset (uint16_t wInterface, uint8_t alternate_setting) |
bool | usb_user_read_request (uint8_t, uint8_t) |
This function is called by the standard USB read request function when the USB request is not supported. More... | |
void usb_user_endpoint_init | ( | uint8_t | conf_nb | ) |
This function configures the endpoints of the device application.
This function is called when the set configuration request has been received.
The core of this function should be correctly rewritten depending on the USB device application characteristics (the USB device application has specific endpoint configuration).
This function is called when the set configuration request has been received.
References DIRECTION_IN, DIRECTION_OUT, DOUBLE_BANK, EP_ATTRIBUTES_IN, EP_ATTRIBUTES_OUT, EP_AUDIO_IN, EP_AUDIO_OUT, EP_KBD_IN, EP_SIZE_IN, EP_SIZE_KBD, EP_SIZE_OUT, SINGLE_BANK, TYPE_INTERRUPT, and Usb_configure_endpoint.
Referenced by usb_set_configuration().
bool usb_user_get_descriptor | ( | uint8_t | , |
uint8_t | |||
) |
This function returns the size and the pointer on a user information structure.
References data_to_transfer, LANG_ID, MAN_INDEX, pbuffer, PROD_INDEX, SN_INDEX, STRING_DESCRIPTOR, usb_user_language_id, usb_user_manufacturer_string_descriptor, usb_user_product_string_descriptor, and usb_user_serial_number.
Referenced by usb_get_descriptor().
uint8_t usb_user_interface_get | ( | uint16_t | wInterface | ) |
void usb_user_interface_reset | ( | uint16_t | wInterface, |
uint8_t | alternate_setting | ||
) |
bool usb_user_read_request | ( | uint8_t | bmRequestType, |
uint8_t | bmRequest | ||
) |
This function is called by the standard USB read request function when the USB request is not supported.
This function returns true when the request is processed. This function returns false if the request is not supported. In this case, a STALL handshake will be automatically sent by the standard USB read request function.
References AUDIO_FU_CONTROL_CS_MUTE, AUDIO_FU_CONTROL_CS_VOLUME, audio_micro_get_mute(), audio_micro_get_vol_cur(), audio_micro_get_vol_max(), audio_micro_get_vol_min(), audio_micro_get_vol_res(), audio_micro_set_mute(), audio_micro_set_volume(), audio_speaker_get_mute(), audio_speaker_get_vol_cur(), audio_speaker_get_vol_max(), audio_speaker_get_vol_min(), audio_speaker_get_vol_res(), audio_speaker_set_mute(), audio_speaker_set_sample_freq(), audio_speaker_set_volume(), check_audio_control_request(), st_audio_cmd::cs, EP_CONTROL, HID_DESCRIPTOR, hid_get_descriptor(), HID_GET_IDLE, HID_GET_PROTOCOL, HID_GET_REPORT, S_usb_user_configuration_descriptor::hid_kbd, HID_PHYSICAL_DESCRIPTOR, HID_REPORT_DESCRIPTOR, HID_REPORT_FEATURE, HID_REPORT_INPUT, HID_REPORT_OUTPUT, HID_SET_IDLE, HID_SET_PROTOCOL, HID_SET_REPORT, LSB, MSB, SETUP_AUDIO_GET_CUR, SETUP_AUDIO_GET_MAX, SETUP_AUDIO_GET_MEM, SETUP_AUDIO_GET_MIN, SETUP_AUDIO_GET_RES, SETUP_AUDIO_GET_STAT, SETUP_AUDIO_SAMPLING_FREQ_CONTROL, SETUP_AUDIO_SET_CUR, SETUP_AUDIO_SET_MAX, SETUP_AUDIO_SET_MEM, SETUP_AUDIO_SET_MIN, SETUP_AUDIO_SET_RES, SETUP_GET_DESCRIPTOR, st_audio_cmd::target, TARGET_MICRO, TARGET_SPEAKER, usb_conf_desc, usb_hid_get_idle(), usb_hid_report_descriptor_kbd, usb_hid_set_idle(), usb_hid_set_report_ouput(), Usb_read_endpoint_data, USB_SETUP_GET_CLASS_ENDPOINT, USB_SETUP_GET_CLASS_INTER, USB_SETUP_GET_STAND_INTERFACE, USB_SETUP_SET_CLASS_ENDPOINT, and USB_SETUP_SET_CLASS_INTER.
Referenced by usb_process_request().