update version to v2.1.2

This commit is contained in:
Artery-MCU
2024-01-25 10:08:14 +08:00
parent 9d554c6b91
commit 0a93017e07
105 changed files with 3447 additions and 242 deletions

View File

@@ -283,13 +283,18 @@ static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup)
{
len = MIN(USBD_KEYBOARD_SIZ_REPORT_DESC, setup->wLength);
buf = (uint8_t *)g_usbd_keyboard_report;
usbd_ctrl_send(pudev, (uint8_t *)buf, len);
}
else if(setup->wValue >> 8 == HID_DESCRIPTOR_TYPE)
{
len = MIN(9, setup->wLength);
buf = (uint8_t *)g_keyboard_usb_desc;
usbd_ctrl_send(pudev, (uint8_t *)buf, len);
}
else
{
usbd_ctrl_unsupport(pudev);
}
usbd_ctrl_send(pudev, (uint8_t *)buf, len);
break;
case USB_STD_REQ_GET_INTERFACE:
usbd_ctrl_send(pudev, (uint8_t *)&pkeyboard->alt_setting, 1);