diff options
author | NicoHood <NicoHood@users.noreply.github.com> | 2015-10-07 20:39:50 +0200 |
---|---|---|
committer | NicoHood <NicoHood@users.noreply.github.com> | 2015-10-07 20:39:50 +0200 |
commit | abd6b795c412cf1b2d21338ace3a34f4984add42 (patch) | |
tree | 77f4ac71c452fa3d2c2d1d5e32c768c8d4044f2c /libraries/HID/HID.cpp | |
parent | c4fb153142502646f2441986cb7be95ca7d964a9 (diff) |
[PUSB] Removed unnecessary endpoint and interface function
Diffstat (limited to 'libraries/HID/HID.cpp')
-rw-r--r-- | libraries/HID/HID.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libraries/HID/HID.cpp b/libraries/HID/HID.cpp index fe88ecd..762d170 100644 --- a/libraries/HID/HID.cpp +++ b/libraries/HID/HID.cpp @@ -31,16 +31,16 @@ int HID_::getInterface(uint8_t* interfaceCount) { *interfaceCount += 1; // uses 1 HIDDescriptor hidInterface = { - D_INTERFACE(interface(), 1, 3, 0, 0), + D_INTERFACE(pluggedInterface, 1, 3, 0, 0), D_HIDREPORT(descriptorSize), - D_ENDPOINT(USB_ENDPOINT_IN(endpoint()), USB_ENDPOINT_TYPE_INTERRUPT, USB_EP_SIZE, 0x01) + D_ENDPOINT(USB_ENDPOINT_IN(pluggedEndpoint), USB_ENDPOINT_TYPE_INTERRUPT, USB_EP_SIZE, 0x01) }; return USB_SendControl(0, &hidInterface, sizeof(hidInterface)); } int HID_::getDescriptor(USBSetup& setup) { - if (interface() != setup.wIndex) { + if (pluggedInterface != setup.wIndex) { return 0; } @@ -71,13 +71,13 @@ void HID_::AppendDescriptor(HIDDescriptorListNode *node) void HID_::SendReport(uint8_t id, const void* data, int len) { - USB_Send(endpoint(), &id, 1); - USB_Send(endpoint() | TRANSFER_RELEASE, data, len); + USB_Send(pluggedEndpoint, &id, 1); + USB_Send(pluggedEndpoint | TRANSFER_RELEASE, data, len); } bool HID_::setup(USBSetup& setup) { - if (interface() != setup.wIndex) { + if (pluggedInterface != setup.wIndex) { return false; } |