选择外部时钟源
设置USB
勾选中断
配置USB,选择Custom Human Interface Device Class
外部晶振是25M,设置M,N,P,Q,使USB时钟必须是48M
工程代码修改
在 usbd_custom_hid_if.c 文件里,找到 CUSTOM_HID_ReportDesc_FS 函数,
添加报文文件代码如下:
/** Usb HID report descriptor. */
__ALIGN_BEGIN static uint8_t CUSTOM_HID_ReportDesc_FS[USBD_CUSTOM_HID_REPORT_DESC_SIZE] __ALIGN_END =
{
/*