diff options
| author | hathach <[email protected]> | 2013-10-25 17:28:31 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-10-25 17:28:31 +0700 |
| commit | 0d00742cf0900fad2e3181bea4284e6aba775105 (patch) | |
| tree | ab6c5cff8e3457b6c1177cd880d61b7f2748a2ea /tinyusb/class/hid.c | |
| parent | 7bf5cbc3fc369939c5af0d675bf9c033db4b826f (diff) | |
more doxygen work
rename tusb_mouse_report_t (keyboard) to hid_mouse_report_t (keyboard)
Diffstat (limited to 'tinyusb/class/hid.c')
| -rw-r--r-- | tinyusb/class/hid.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tinyusb/class/hid.c b/tinyusb/class/hid.c index 2308e24ac..691751ac4 100644 --- a/tinyusb/class/hid.c +++ b/tinyusb/class/hid.c @@ -41,12 +41,12 @@ #if defined DEVICE_CLASS_HID && defined TUSB_CFG_DEVICE #ifdef TUSB_CFG_DEVICE_HID_KEYBOARD -tusb_keyboard_report_t hid_keyboard_report; +hid_keyboard_report_t hid_keyboard_report; static volatile bool bKeyChanged = false; #endif #ifdef TUSB_CFG_DEVICE_HID_MOUSE -tusb_mouse_report_t hid_mouse_report; +hid_mouse_report_t hid_mouse_report; static volatile bool bMouseChanged = false; #endif @@ -68,7 +68,7 @@ ErrorCode_t HID_GetReport( USBD_HANDLE_T hHid, USB_SETUP_PACKET* pSetup, uint8_t #ifdef TUSB_CFG_DEVICE_HID_KEYBOARD case HID_PROTOCOL_KEYBOARD: *pBuffer = (uint8_t*) &hid_keyboard_report; - *plength = sizeof(tusb_keyboard_report_t); + *plength = sizeof(hid_keyboard_report_t); if (!bKeyChanged) { @@ -81,7 +81,7 @@ ErrorCode_t HID_GetReport( USBD_HANDLE_T hHid, USB_SETUP_PACKET* pSetup, uint8_t #ifdef TUSB_CFG_DEVICE_HID_MOUSE case HID_PROTOCOL_MOUSE: *pBuffer = (uint8_t*) &hid_mouse_report; - *plength = sizeof(tusb_mouse_report_t); + *plength = sizeof(hid_mouse_report_t); if (!bMouseChanged) { @@ -132,9 +132,9 @@ ErrorCode_t HID_EpIn_Hdlr (USBD_HANDLE_T hUsb, void* data, uint32_t event) case HID_PROTOCOL_KEYBOARD: if (!bKeyChanged) { - memset(&hid_keyboard_report, 0, sizeof(tusb_keyboard_report_t)); + memset(&hid_keyboard_report, 0, sizeof(hid_keyboard_report_t)); } - ROM_API->hw->WriteEP(hUsb, pHidCtrl->epin_adr, (uint8_t*) &hid_keyboard_report, sizeof(tusb_keyboard_report_t)); + ROM_API->hw->WriteEP(hUsb, pHidCtrl->epin_adr, (uint8_t*) &hid_keyboard_report, sizeof(hid_keyboard_report_t)); bKeyChanged = false; break; #endif @@ -143,9 +143,9 @@ ErrorCode_t HID_EpIn_Hdlr (USBD_HANDLE_T hUsb, void* data, uint32_t event) case HID_PROTOCOL_MOUSE: if (!bMouseChanged) { - memset(&hid_mouse_report, 0, sizeof(tusb_mouse_report_t)); + memset(&hid_mouse_report, 0, sizeof(hid_mouse_report_t)); } - ROM_API->hw->WriteEP(hUsb, pHidCtrl->epin_adr, (uint8_t*) &hid_mouse_report, sizeof(tusb_mouse_report_t)); + ROM_API->hw->WriteEP(hUsb, pHidCtrl->epin_adr, (uint8_t*) &hid_mouse_report, sizeof(hid_mouse_report_t)); bMouseChanged = false; break; #endif @@ -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_KEYBOARD_EP_IN , (uint8_t* ) &hid_keyboard_report , sizeof(tusb_keyboard_report_t) ); // initial packet for IN endpoint , will not work if omitted + ROM_API->hw->WriteEP(hUsb , HID_KEYBOARD_EP_IN , (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(tusb_mouse_report_t) ); // initial packet for IN endpoint, will not work if omitted + 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 #endif return TUSB_ERROR_NONE; |
