Skip to content

Commit 1840080

Browse files
committed
SIMPLIFY: Remove iProduct from HID descriptor.
1 parent d7c4e9f commit 1840080

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

src/HIDPowerDevice.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ static const uint8_t _hidReportDescriptor[] PROGMEM = {
3838
0x95, 0x01, // REPORT_COUNT (1)
3939
0x15, 0x00, // LOGICAL_MINIMUM (0)
4040
0x26, 0xFF, 0x00, // LOGICAL_MAXIMUM (255)
41-
0x85, HID_PD_IPRODUCT, // REPORT_ID (1)
42-
0x09, 0xFE, // USAGE (iProduct)
43-
0x79, IPRODUCT, // STRING INDEX (2)
44-
0xB1, 0x23, // FEATURE (Constant, Variable, Absolute, No Wrap, Linear, No Preferred, No Null Position, Nonvolatile, Bitfield)
4541
0x05, 0x85, // USAGE_PAGE (Battery System) ====================
4642
0x85, HID_PD_CAPACITYMODE, // REPORT_ID (22)
4743
0x09, 0x2C, // USAGE (CapacityMode)
@@ -101,9 +97,6 @@ HIDPowerDevice_::HIDPowerDevice_(void) {
10197
static HIDSubDescriptor node(_hidReportDescriptor, sizeof (_hidReportDescriptor));
10298

10399
HID().AppendDescriptor(&node);
104-
105-
// set string ID here
106-
HID().SetFeature(HID_PD_IPRODUCT, &bProduct, sizeof(bProduct));
107100
}
108101

109102
void HIDPowerDevice_::setOutput(Serial_& out) {

src/HIDPowerDevice.h

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

42-
#define HID_PD_IPRODUCT 0x01 // FEATURE ONLY
43-
4442
#define HID_PD_PRESENTSTATUS 0x07 // INPUT OR FEATURE(required by Windows)
4543
#define HID_PD_VOLTAGE 0x0B // 11 INPUT (NA) OR FEATURE(implemented)
4644
#define HID_PD_REMAININGCAPACITY 0x0C // 12 INPUT OR FEATURE(required by Windows)
@@ -65,11 +63,6 @@ static_assert(sizeof(PresentStatus) == sizeof(uint8_t));
6563

6664

6765
class HIDPowerDevice_ {
68-
69-
private:
70-
71-
const byte bProduct = IPRODUCT;
72-
7366
public:
7467
HIDPowerDevice_(void);
7568

0 commit comments

Comments
 (0)