From 4d91186cd137e91963730f52f280d28f57428adb Mon Sep 17 00:00:00 2001 From: Oleg Mazurov Date: Wed, 14 Aug 2013 14:02:42 -0600 Subject: [PATCH] fixed PrintHex in Kbd example --- BTD.h | 2 +- adk.cpp | 12 ++++++------ cdcacm.cpp | 12 ++++++------ cdcftdi.cpp | 12 ++++++------ confdescparser.h | 14 +++++++------- examples/HID/USBHIDBootKbd/USBHIDBootKbd.ino | 2 +- .../HID/USBHIDJoystick/hidjoystickrptparser.cpp | 12 ++++++------ examples/HID/le3dp/le3dp_rptparser.cpp | 14 +++++++------- 8 files changed, 40 insertions(+), 40 deletions(-) diff --git a/BTD.h b/BTD.h index 556178bf..87c2f4d4 100755 --- a/BTD.h +++ b/BTD.h @@ -28,7 +28,7 @@ #define PS3MOVE_PID 0x03D5 // Motion controller #define IOGEAR_GBU521_VID 0x0A5C // The IOGEAR GBU521 dongle does not presents itself correctly, so we have to check for it manually -#define IOGEAR_GBU521_PID 0x4500 +#define IOGEAR_GBU521_PID 0x21e8 /* Bluetooth dongle data taken from descriptors */ #define BULK_MAXPKTSIZE 64 // max size for ACL data diff --git a/adk.cpp b/adk.cpp index 8bce6723..453833dc 100644 --- a/adk.cpp +++ b/adk.cpp @@ -335,16 +335,16 @@ uint8_t ADK::SndData(uint16_t nbytes, uint8_t *dataptr) { void ADK::PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR* ep_ptr) { Notify(PSTR("Endpoint descriptor:"), 0x80); Notify(PSTR("\r\nLength:\t\t"), 0x80); - D_PrintHex (ep_ptr->bLength, 0x80); + PrintHex (ep_ptr->bLength, 0x80); Notify(PSTR("\r\nType:\t\t"), 0x80); - D_PrintHex (ep_ptr->bDescriptorType, 0x80); + PrintHex (ep_ptr->bDescriptorType, 0x80); Notify(PSTR("\r\nAddress:\t"), 0x80); - D_PrintHex (ep_ptr->bEndpointAddress, 0x80); + PrintHex (ep_ptr->bEndpointAddress, 0x80); Notify(PSTR("\r\nAttributes:\t"), 0x80); - D_PrintHex (ep_ptr->bmAttributes, 0x80); + PrintHex (ep_ptr->bmAttributes, 0x80); Notify(PSTR("\r\nMaxPktSize:\t"), 0x80); - D_PrintHex (ep_ptr->wMaxPacketSize, 0x80); + PrintHex (ep_ptr->wMaxPacketSize, 0x80); Notify(PSTR("\r\nPoll Intrv:\t"), 0x80); - D_PrintHex (ep_ptr->bInterval, 0x80); + PrintHex (ep_ptr->bInterval, 0x80); Notify(PSTR("\r\n"), 0x80); } diff --git a/cdcacm.cpp b/cdcacm.cpp index 1a4e9575..0f9fffde 100644 --- a/cdcacm.cpp +++ b/cdcacm.cpp @@ -334,16 +334,16 @@ uint8_t ACM::SendBreak(uint16_t duration) { void ACM::PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR* ep_ptr) { Notify(PSTR("Endpoint descriptor:"), 0x80); Notify(PSTR("\r\nLength:\t\t"), 0x80); - D_PrintHex (ep_ptr->bLength, 0x80); + PrintHex (ep_ptr->bLength, 0x80); Notify(PSTR("\r\nType:\t\t"), 0x80); - D_PrintHex (ep_ptr->bDescriptorType, 0x80); + PrintHex (ep_ptr->bDescriptorType, 0x80); Notify(PSTR("\r\nAddress:\t"), 0x80); - D_PrintHex (ep_ptr->bEndpointAddress, 0x80); + PrintHex (ep_ptr->bEndpointAddress, 0x80); Notify(PSTR("\r\nAttributes:\t"), 0x80); - D_PrintHex (ep_ptr->bmAttributes, 0x80); + PrintHex (ep_ptr->bmAttributes, 0x80); Notify(PSTR("\r\nMaxPktSize:\t"), 0x80); - D_PrintHex (ep_ptr->wMaxPacketSize, 0x80); + PrintHex (ep_ptr->wMaxPacketSize, 0x80); Notify(PSTR("\r\nPoll Intrv:\t"), 0x80); - D_PrintHex (ep_ptr->bInterval, 0x80); + PrintHex (ep_ptr->bInterval, 0x80); Notify(PSTR("\r\n"), 0x80); } diff --git a/cdcftdi.cpp b/cdcftdi.cpp index ae8c5962..20d1dd66 100644 --- a/cdcftdi.cpp +++ b/cdcftdi.cpp @@ -326,16 +326,16 @@ uint8_t FTDI::SndData(uint16_t nbytes, uint8_t *dataptr) { void FTDI::PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR* ep_ptr) { Notify(PSTR("Endpoint descriptor:"), 0x80); Notify(PSTR("\r\nLength:\t\t"), 0x80); - D_PrintHex (ep_ptr->bLength, 0x80); + PrintHex (ep_ptr->bLength, 0x80); Notify(PSTR("\r\nType:\t\t"), 0x80); - D_PrintHex (ep_ptr->bDescriptorType, 0x80); + PrintHex (ep_ptr->bDescriptorType, 0x80); Notify(PSTR("\r\nAddress:\t"), 0x80); - D_PrintHex (ep_ptr->bEndpointAddress, 0x80); + PrintHex (ep_ptr->bEndpointAddress, 0x80); Notify(PSTR("\r\nAttributes:\t"), 0x80); - D_PrintHex (ep_ptr->bmAttributes, 0x80); + PrintHex (ep_ptr->bmAttributes, 0x80); Notify(PSTR("\r\nMaxPktSize:\t"), 0x80); - D_PrintHex (ep_ptr->wMaxPacketSize, 0x80); + PrintHex (ep_ptr->wMaxPacketSize, 0x80); Notify(PSTR("\r\nPoll Intrv:\t"), 0x80); - D_PrintHex (ep_ptr->bInterval, 0x80); + PrintHex (ep_ptr->bInterval, 0x80); Notify(PSTR("\r\n"), 0x80); } diff --git a/confdescparser.h b/confdescparser.h index a3bc7cc7..7fcb6a27 100644 --- a/confdescparser.h +++ b/confdescparser.h @@ -175,19 +175,19 @@ template ::PrintHidDescriptor(const USB_HID_DESCRIPTOR *pDesc) { Notify(PSTR("\r\n\r\nHID Descriptor:\r\n"), 0x80); Notify(PSTR("bDescLength:\t\t"), 0x80); - D_PrintHex (pDesc->bLength, 0x80); + PrintHex (pDesc->bLength, 0x80); Notify(PSTR("\r\nbDescriptorType:\t"), 0x80); - D_PrintHex (pDesc->bDescriptorType, 0x80); + PrintHex (pDesc->bDescriptorType, 0x80); Notify(PSTR("\r\nbcdHID:\t\t\t"), 0x80); - D_PrintHex (pDesc->bcdHID, 0x80); + PrintHex (pDesc->bcdHID, 0x80); Notify(PSTR("\r\nbCountryCode:\t\t"), 0x80); - D_PrintHex (pDesc->bCountryCode, 0x80); + PrintHex (pDesc->bCountryCode, 0x80); Notify(PSTR("\r\nbNumDescriptors:\t"), 0x80); - D_PrintHex (pDesc->bNumDescriptors, 0x80); + PrintHex (pDesc->bNumDescriptors, 0x80); //Notify(PSTR("\r\nbDescrType:\t\t")); //PrintHex(pDesc->bDescrType); @@ -199,10 +199,10 @@ void ConfigDescParser::PrintHidDescrip HID_CLASS_DESCRIPTOR_LEN_AND_TYPE *pLT = (HID_CLASS_DESCRIPTOR_LEN_AND_TYPE*)&(pDesc->bDescrType); Notify(PSTR("\r\nbDescrType:\t\t"), 0x80); - D_PrintHex (pLT[i].bDescrType, 0x80); + PrintHex (pLT[i].bDescrType, 0x80); Notify(PSTR("\r\nwDescriptorLength:\t"), 0x80); - D_PrintHex (pLT[i].wDescriptorLength, 0x80); + PrintHex (pLT[i].wDescriptorLength, 0x80); } Notify(PSTR("\r\n"), 0x80); } diff --git a/examples/HID/USBHIDBootKbd/USBHIDBootKbd.ino b/examples/HID/USBHIDBootKbd/USBHIDBootKbd.ino index 35155d8b..3820eb5c 100644 --- a/examples/HID/USBHIDBootKbd/USBHIDBootKbd.ino +++ b/examples/HID/USBHIDBootKbd/USBHIDBootKbd.ino @@ -37,7 +37,7 @@ void KbdRptParser::PrintKey(uint8_t m, uint8_t key) Serial.print((mod.bmLeftGUI == 1) ? "G" : " "); Serial.print(" >"); - D_PrintHex(key, 0x80); + PrintHex(key, 0x80); Serial.print("< "); Serial.print((mod.bmRightCtrl == 1) ? "C" : " "); diff --git a/examples/HID/USBHIDJoystick/hidjoystickrptparser.cpp b/examples/HID/USBHIDJoystick/hidjoystickrptparser.cpp index 684dd527..ef6444b5 100644 --- a/examples/HID/USBHIDJoystick/hidjoystickrptparser.cpp +++ b/examples/HID/USBHIDJoystick/hidjoystickrptparser.cpp @@ -63,22 +63,22 @@ void JoystickReportParser::Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t void JoystickEvents::OnGamePadChanged(const GamePadEventData *evt) { Serial.print("X: "); - D_PrintHex(evt->X, 0x80); + PrintHex(evt->X, 0x80); Serial.print("\tY: "); - D_PrintHex(evt->Y, 0x80); + PrintHex(evt->Y, 0x80); Serial.print("\tZ: "); - D_PrintHex(evt->Z1, 0x80); + PrintHex(evt->Z1, 0x80); Serial.print("\tZ: "); - D_PrintHex(evt->Z2, 0x80); + PrintHex(evt->Z2, 0x80); Serial.print("\tRz: "); - D_PrintHex(evt->Rz, 0x80); + PrintHex(evt->Rz, 0x80); Serial.println(""); } void JoystickEvents::OnHatSwitch(uint8_t hat) { Serial.print("Hat Switch: "); - D_PrintHex(hat, 0x80); + PrintHex(hat, 0x80); Serial.println(""); } diff --git a/examples/HID/le3dp/le3dp_rptparser.cpp b/examples/HID/le3dp/le3dp_rptparser.cpp index b42478ed..baece13b 100644 --- a/examples/HID/le3dp/le3dp_rptparser.cpp +++ b/examples/HID/le3dp/le3dp_rptparser.cpp @@ -26,18 +26,18 @@ void JoystickReportParser::Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t void JoystickEvents::OnGamePadChanged(const GamePadEventData *evt) { Serial.print("X: "); - D_PrintHex(evt->x, 0x80); + PrintHex(evt->x, 0x80); Serial.print(" Y: "); - D_PrintHex(evt->y, 0x80); + PrintHex(evt->y, 0x80); Serial.print(" Hat Switch: "); - D_PrintHex(evt->hat, 0x80); + PrintHex(evt->hat, 0x80); Serial.print(" Twist: "); - D_PrintHex(evt->twist, 0x80); + PrintHex(evt->twist, 0x80); Serial.print(" Slider: "); - D_PrintHex(evt->slider, 0x80); + PrintHex(evt->slider, 0x80); Serial.print(" Buttons A: "); - D_PrintHex(evt->buttons_a, 0x80); + PrintHex(evt->buttons_a, 0x80); Serial.print(" Buttons B: "); - D_PrintHex(evt->buttons_b, 0x80); + PrintHex(evt->buttons_b, 0x80); Serial.println(""); }