aboutsummaryrefslogtreecommitdiff
path: root/libraries/HID/HID.cpp
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@arduino.cc>2015-09-29 16:40:27 +0200
committerCristian Maglie <c.maglie@arduino.cc>2015-10-02 11:59:22 +0200
commit7302965552a77c1af000e3870848b3cc35670c51 (patch)
tree90cbf977f606bfe0dc4cdd465a655e83283aa210 /libraries/HID/HID.cpp
parent2aaef8cdad53b645cf8b2a6a0b2194115b970cfa (diff)
[PUSB] PUSBCallback struct has been merged into PUSBListNode
This slightly simplifies PluggableUSB API.
Diffstat (limited to 'libraries/HID/HID.cpp')
-rw-r--r--libraries/HID/HID.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/libraries/HID/HID.cpp b/libraries/HID/HID.cpp
index 42e0ee5..24e6f5c 100644
--- a/libraries/HID/HID.cpp
+++ b/libraries/HID/HID.cpp
@@ -133,19 +133,15 @@ bool HID_Setup(USBSetup& setup, uint8_t i)
HID_::HID_(void)
{
static uint8_t endpointType[1];
-
endpointType[0] = EP_TYPE_INTERRUPT_IN;
- static PUSBCallbacks cb = {
- .setup = &HID_Setup,
- .getInterface = &HID_GetInterface,
- .getDescriptor = &HID_GetDescriptor,
- .numEndpoints = 1,
- .numInterfaces = 1,
- .endpointType = endpointType,
- };
-
- static PUSBListNode node(&cb);
+ static PUSBListNode node;
+ node.setup = &HID_Setup,
+ node.getInterface = &HID_GetInterface,
+ node.getDescriptor = &HID_GetDescriptor,
+ node.numEndpoints = 1,
+ node.numInterfaces = 1,
+ node.endpointType = endpointType,
HID_ENDPOINT_INT = PUSB_AddFunction(&node, &HID_INTERFACE);
}