aboutsummaryrefslogtreecommitdiff
path: root/libraries/HID/HID.cpp
diff options
context:
space:
mode:
authorMartino Facchin <m.facchin@arduino.cc>2015-10-13 15:13:31 +0200
committerMartino Facchin <m.facchin@arduino.cc>2015-10-21 15:23:56 +0200
commitced062988bf0df175e54b77b658132685100b350 (patch)
tree5c95d5a374af46ed508e9b05870e6a658f38c3f4 /libraries/HID/HID.cpp
parentf42b26c257859f1b76094972727c4ebc2b412a62 (diff)
[USB] use plugged modules name to create iSerial field
Diffstat (limited to 'libraries/HID/HID.cpp')
-rw-r--r--libraries/HID/HID.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/libraries/HID/HID.cpp b/libraries/HID/HID.cpp
index 411529e..1a432ff 100644
--- a/libraries/HID/HID.cpp
+++ b/libraries/HID/HID.cpp
@@ -57,6 +57,16 @@ int HID_::getDescriptor(USBSetup& setup)
return total;
}
+uint8_t HID_::getShortName(char *name)
+{
+ name[0] = 'H';
+ name[1] = 'I';
+ name[2] = 'D';
+ name[3] = 'A' + (descriptorSize & 0x0F);
+ name[4] = 'A' + ((descriptorSize >> 4) & 0x0F);
+ return 5;
+}
+
void HID_::AppendDescriptor(HIDSubDescriptor *node)
{
if (!rootNode) {