AN050
GD32 USBFS&USBHS Firmware Library User Guide
46
Request name
value
Functional description
GET_PROTOCOL
0x03
Get protocol
SET_REPORT
0x09
Set report
SET_IDLE
0x0A
Set idle
SET_PROTOCOL
0x0B
Set protocol
HID user interface
HID user interface is enumerated as keyboard, which is shown in below structure.
hid_fop_handler fop_handler
=
{
.
hid_itf_config
=
key_config
,
.
hid_itf_data_process
=
hid_key_data_send
};
Table 5-22
. HID user interface functions
Function/variable name
Functional description
key_config
Key configuration
hid_key_data_send
Send key value
HID routine operation guide
Download the HID rountine to EVAL board, a newly added HID device is visible in device
Figure 5-20. HID device class
Press Wakeup key, output “b”; Press Tamper key, output “a”; Press User key, output “c”. The
below step show how to verify USB remote wakeup function.
1. configure PC to be sleep mode;
2. wait PC host to be sleep mode completely;
3. press wakeup key;
4. if the host is waked up, indicate that remote wakeup function is successful, otherwise it is