diff --git a/examples/UPS/UPS.ino b/examples/UPS/UPS.ino index e908b1b..ce48327 100644 --- a/examples/UPS/UPS.ino +++ b/examples/UPS/UPS.ino @@ -51,8 +51,6 @@ int iRes=0; void setup() { Serial.begin(57600); - - PowerDevice.begin(); // Serial No is set in a special way as it forms Arduino port name PowerDevice.setSerial(STRING_SERIAL); diff --git a/src/HID/HID.cpp b/src/HID/HID.cpp index e9b969a..49152c9 100644 --- a/src/HID/HID.cpp +++ b/src/HID/HID.cpp @@ -263,9 +263,4 @@ HID_::HID_(void) : PluggableUSBModule(2, 1, epType), PluggableUSB().plug(this); } -int HID_::begin(void) -{ - return 0; -} - #endif /* if defined(USBCON) */ diff --git a/src/HID/HID.h b/src/HID/HID.h index bb55aa2..3eb7f08 100644 --- a/src/HID/HID.h +++ b/src/HID/HID.h @@ -114,7 +114,6 @@ class HID_ : public PluggableUSBModule { public: HID_(void); - int begin(void); int SendReport(uint16_t id, const void* data, int len); int SetFeature(uint16_t id, const void* data, int len); bool LockFeature(uint16_t id, bool lock); diff --git a/src/HIDPowerDevice.cpp b/src/HIDPowerDevice.cpp index 5217e04..56920db 100755 --- a/src/HIDPowerDevice.cpp +++ b/src/HIDPowerDevice.cpp @@ -225,17 +225,11 @@ HIDPowerDevice_::HIDPowerDevice_(void) { static HIDSubDescriptor node(_hidReportDescriptor, sizeof (_hidReportDescriptor)); HID().AppendDescriptor(&node); -} -void HIDPowerDevice_::begin(void) { - HID().begin(); - // set string ID here - HID().SetFeature(HID_PD_IPRODUCT, &bProduct, sizeof(bProduct)); HID().SetFeature(HID_PD_SERIAL, &bSerial, sizeof(bSerial)); HID().SetFeature(HID_PD_MANUFACTURER, &bManufacturer, sizeof(bManufacturer)); - } void HIDPowerDevice_::setOutput(Serial_& out) { @@ -246,9 +240,6 @@ void HIDPowerDevice_::setSerial(const char* s) { HID().setSerial(s); } -void HIDPowerDevice_::end(void) { -} - int HIDPowerDevice_::sendDate(uint16_t id, uint16_t year, uint8_t month, uint8_t day) { uint16_t bval = (year - 1980)*512 + month * 32 + day; return HID().SendReport(id, &bval, sizeof (bval)); diff --git a/src/HIDPowerDevice.h b/src/HIDPowerDevice.h index 888b860..8f3ef75 100755 --- a/src/HIDPowerDevice.h +++ b/src/HIDPowerDevice.h @@ -112,15 +112,11 @@ class HIDPowerDevice_ { public: HIDPowerDevice_(void); - void begin(void); void setOutput(Serial_&); void setSerial(const char*); - - void end(void); - int sendDate(uint16_t id, uint16_t year, uint8_t month, uint8_t day); int sendReport(uint16_t id, const void* bval, int len);