Skip to content

Commit e5df22a

Browse files
committed
SIMPLIFY: Remove iSerialNumber from HID descriptor.
1 parent 6611794 commit e5df22a

File tree

3 files changed

+0
-11
lines changed

3 files changed

+0
-11
lines changed

examples/UPS/UPS.ino

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ int iIntTimer=0;
1111

1212
// String constants
1313
const char STRING_DEVICECHEMISTRY[] PROGMEM = "LiP";
14-
const char STRING_SERIAL[] PROGMEM = "UPS10";
1514

1615
const byte bDeviceChemistry = IDEVICECHEMISTRY;
1716

@@ -37,9 +36,6 @@ void setup() {
3736

3837
Serial.begin(57600);
3938

40-
// Serial No is set in a special way as it forms Arduino port name
41-
PowerDevice.setSerial(STRING_SERIAL);
42-
4339
// Used for debugging purposes.
4440
PowerDevice.setOutput(Serial);
4541

src/HIDPowerDevice.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ static const uint8_t _hidReportDescriptor[] PROGMEM = {
4242
0x09, 0xFE, // USAGE (iProduct)
4343
0x79, IPRODUCT, // STRING INDEX (2)
4444
0xB1, 0x23, // FEATURE (Constant, Variable, Absolute, No Wrap, Linear, No Preferred, No Null Position, Nonvolatile, Bitfield)
45-
0x85, HID_PD_SERIAL, // REPORT_ID (2)
46-
0x09, 0xFF, // USAGE (iSerialNumber)
47-
0x79, ISERIAL, // STRING INDEX (3)
48-
0xB1, 0x23, // FEATURE (Constant, Variable, Absolute, No Wrap, Linear, No Preferred, No Null Position, Nonvolatile, Bitfield)
4945
0x85, HID_PD_MANUFACTURER, // REPORT_ID (3)
5046
0x09, 0xFD, // USAGE (iManufacturer)
5147
0x79, IMANUFACTURER, // STRING INDEX (1)
@@ -121,7 +117,6 @@ HIDPowerDevice_::HIDPowerDevice_(void) {
121117

122118
// set string ID here
123119
HID().SetFeature(HID_PD_IPRODUCT, &bProduct, sizeof(bProduct));
124-
HID().SetFeature(HID_PD_SERIAL, &bSerial, sizeof(bSerial));
125120
HID().SetFeature(HID_PD_MANUFACTURER, &bManufacturer, sizeof(bManufacturer));
126121
}
127122

src/HIDPowerDevice.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
//================================================================================
4141

4242
#define HID_PD_IPRODUCT 0x01 // FEATURE ONLY
43-
#define HID_PD_SERIAL 0x02 // FEATURE ONLY
4443
#define HID_PD_MANUFACTURER 0x03 // FEATURE ONLY
4544
#define IDEVICECHEMISTRY 0x04
4645

@@ -77,7 +76,6 @@ class HIDPowerDevice_ {
7776

7877
const byte bProduct = IPRODUCT;
7978
const byte bManufacturer = IMANUFACTURER;
80-
const byte bSerial = ISERIAL;
8179

8280
public:
8381
HIDPowerDevice_(void);

0 commit comments

Comments
 (0)