#include "conf_usb.h"
#include "usb_drv.h"
#include "usb_descriptors.h"
#include "usb_standard_request.h"
#include "usb_specific_request.h"
Functions | |
static void | hid_get_descriptor (U8 size_of_report, const U8 *p_usb_hid_report) |
This function manages the HID Get_Descriptor request. More... | |
void | usb_hid_get_idle (U8 u8_report_id) |
This function manages hid get idle request. More... | |
void | usb_hid_set_idle (U8 u8_report_id, U8 u8_duration) |
This function manages hid set idle request. More... | |
void | usb_hid_set_report_feature (void) |
void | usb_user_endpoint_init (U8 conf_nb) |
This function configures the endpoints of the device application. More... | |
bool | usb_user_get_descriptor (U8 type, U8 string) |
This function returns the size and the pointer on a user information structure. More... | |
bool | usb_user_read_request (U8 type, U8 request) |
This function is called by the standard USB read request function when the USB request is not supported. More... | |
Variables | |
U16 | data_to_transfer |
U8 | g_u8_report_rate =0 |
int | jump_bootloader =0 |
const void * | pbuffer |
This function manages the HID Get_Descriptor request.
< clear the setup received flag
< zero length packet condition
< send only requested number of data bytes
< Send data until necessary
References data_to_transfer, EP_CONTROL, EP_CONTROL_LENGTH, Is_usb_control_in_ready, Is_usb_control_out_received, Is_usb_nak_out, pbuffer, Usb_ack_control_in_ready_send, Usb_ack_control_out_received_free, Usb_ack_nak_out, Usb_ack_setup_received_free, usb_format_usb_to_mcu_data, Usb_read_endpoint_data, Usb_reset_endpoint_fifo_access, and usb_write_ep_txpacket().
Referenced by usb_user_read_request().
void usb_hid_get_idle | ( | U8 | u8_report_id | ) |
This function manages hid get idle request.
u8_report_id | 0 the idle rate applies to all input reports, else only applies to the Report ID |
References EP_CONTROL, g_u8_report_rate, INTERFACE_NB, Is_usb_control_out_received, Usb_ack_control_in_ready_send, Usb_ack_control_out_received_free, Usb_ack_setup_received_free, Usb_read_endpoint_data, and Usb_write_endpoint_data.
Referenced by usb_user_read_request().
This function manages hid set idle request.
u8_report_id | 0 the idle rate applies to all input reports, else only applies to the Report ID |
u8_duration | When the upper byte of wValue is 0 (zero), the duration is indefinite else from 0.004 to 1.020 seconds |
References EP_CONTROL, g_u8_report_rate, INTERFACE_NB, Is_usb_control_in_ready, Usb_ack_control_in_ready_send, Usb_ack_setup_received_free, and Usb_read_endpoint_data.
Referenced by usb_user_read_request().
U16 data_to_transfer |
Referenced by hid_get_descriptor(), usb_get_descriptor(), usb_set_interface(), usb_user_get_descriptor(), and usb_write_message().
U8 g_u8_report_rate =0 |
Referenced by usb_hid_get_idle(), and usb_hid_set_idle().
int jump_bootloader =0 |
Referenced by hid_report_out(), and usb_hid_set_report_feature().
const void* pbuffer |
Referenced by hid_get_descriptor(), usb_get_descriptor(), usb_set_interface(), and usb_user_get_descriptor().