summaryrefslogtreecommitdiff
path: root/tinyusb/class/hid.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-01-18 14:39:42 +0700
committerhathach <[email protected]>2013-01-18 14:39:42 +0700
commitd8c8b9e38ad94ab84c24f22c2ecb79ce4d78b7ba (patch)
tree1090e26f45a534e5113f28d82f8381eef274e358 /tinyusb/class/hid.c
parent7976e2fd55d33a0bf8a74a729eb246a8842d58ee (diff)
add ASSERT POINTER support
add hid host and separate hid host & device update host project setting with EA4357 board add para checking test for hid host
Diffstat (limited to 'tinyusb/class/hid.c')
-rw-r--r--tinyusb/class/hid.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tinyusb/class/hid.c b/tinyusb/class/hid.c
index ec2df6156..dceb4d7db 100644
--- a/tinyusb/class/hid.c
+++ b/tinyusb/class/hid.c
@@ -40,7 +40,7 @@
#if defined DEVICE_CLASS_HID && defined TUSB_CFG_DEVICE
#ifdef TUSB_CFG_DEVICE_HID_KEYBOARD
-USB_HID_KeyboardReport_t hid_keyboard_report;
+tusb_keyboard_report_t hid_keyboard_report;
static volatile bool bKeyChanged = false;
#endif
@@ -67,7 +67,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(USB_HID_KeyboardReport_t);
+ *plength = sizeof(tusb_keyboard_report_t);
if (!bKeyChanged)
{
@@ -131,9 +131,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(USB_HID_KeyboardReport_t));
+ memset(&hid_keyboard_report, 0, sizeof(tusb_keyboard_report_t));
}
- USBD_API->hw->WriteEP(hUsb, pHidCtrl->epin_adr, (uint8_t*) &hid_keyboard_report, sizeof(USB_HID_KeyboardReport_t));
+ USBD_API->hw->WriteEP(hUsb, pHidCtrl->epin_adr, (uint8_t*) &hid_keyboard_report, sizeof(tusb_keyboard_report_t));
bKeyChanged = false;
break;
#endif
@@ -223,7 +223,7 @@ 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
- USBD_API->hw->WriteEP(hUsb , HID_KEYBOARD_EP_IN , (uint8_t* ) &hid_keyboard_report , sizeof(USB_HID_KeyboardReport_t) ); // initial packet for IN endpoint , will not work if omitted
+ USBD_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
#endif
#ifdef TUSB_CFG_DEVICE_HID_MOUSE