refractor descriptor

This commit is contained in:
hathach
2013-11-20 12:52:07 +07:00
parent dbfad50d43
commit 850fcf03f0
5 changed files with 74 additions and 74 deletions

View File

@@ -224,11 +224,11 @@ tusb_error_t tusb_hid_init(USBD_HANDLE_T hUsb, USB_INTERFACE_DESCRIPTOR const *c
tusb_error_t tusb_hid_configured(USBD_HANDLE_T hUsb)
{
#ifdef TUSB_CFG_DEVICE_HID_KEYBOARD
ROM_API->hw->WriteEP(hUsb , HID_EDPT_KEYBOARD_ADDR , (uint8_t* ) &hid_keyboard_report , sizeof(hid_keyboard_report_t) ); // initial packet for IN endpoint , will not work if omitted
ROM_API->hw->WriteEP(hUsb , HID_KEYBOARD_EDPT_ADDR , (uint8_t* ) &hid_keyboard_report , sizeof(hid_keyboard_report_t) ); // initial packet for IN endpoint , will not work if omitted
#endif
#ifdef TUSB_CFG_DEVICE_HID_MOUSE
ROM_API->hw->WriteEP(hUsb , HID_MOUSE_EP_IN , (uint8_t* ) &hid_mouse_report , sizeof(hid_mouse_report_t) ); // initial packet for IN endpoint, will not work if omitted
ROM_API->hw->WriteEP(hUsb , HID_MOUSE_EDPT_ADDR , (uint8_t* ) &hid_mouse_report , sizeof(hid_mouse_report_t) ); // initial packet for IN endpoint, will not work if omitted
#endif
return TUSB_ERROR_NONE;