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... | |
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, EP_ATTRIBUTES_1, EP_HID_MOUSE_IN, EP_SIZE_1_FS, EP_SIZE_1_HS, Is_usb_full_speed_mode, SINGLE_BANK, 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().
bool usb_user_read_request | ( | uint8_t | type, |
uint8_t | request | ||
) |
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 EP_CONTROL, GET_DESCRIPTOR, HID_DESCRIPTOR, hid_get_descriptor(), HID_GET_IDLE, HID_GET_PROTOCOL, HID_GET_REPORT, S_usb_user_configuration_descriptor::hid_mouse, HID_PHYSICAL_DESCRIPTOR, HID_REPORT_DESCRIPTOR, HID_REPORT_FEATURE, HID_REPORT_INPUT, HID_REPORT_OUTPUT, HID_SET_IDLE, HID_SET_PROTOCOL, HID_SET_REPORT, Is_usb_control_in_ready, Is_usb_control_out_received, Is_usb_full_speed_mode, Usb_ack_control_in_ready_send, Usb_ack_control_out_received_free, Usb_ack_setup_received_free, usb_conf_desc_fs, usb_conf_desc_hs, usb_hid_get_idle(), usb_hid_report_descriptor_mouse, usb_hid_set_idle(), and Usb_read_endpoint_data.
Referenced by usb_process_request().