24#if !defined(_usb_h_) || defined(__CONFDESCPARSER_H__)
25#error "Never include confdescparser.h directly; include Usb.h instead"
28#define __CONFDESCPARSER_H__
39#define CP_MASK_COMPARE_CLASS 1
40#define CP_MASK_COMPARE_SUBCLASS 2
41#define CP_MASK_COMPARE_PROTOCOL 4
42#define CP_MASK_COMPARE_ALL 7
46template <const u
int8_t CLASS_ID, const u
int8_t SUBCLASS_ID, const u
int8_t PROTOCOL_ID, const u
int8_t MASK>
78template <const u
int8_t CLASS_ID, const u
int8_t SUBCLASS_ID, const u
int8_t PROTOCOL_ID, const u
int8_t MASK>
85 theBuffer.
pValue = varBuffer;
90template <const u
int8_t CLASS_ID, const u
int8_t SUBCLASS_ID, const u
int8_t PROTOCOL_ID, const u
int8_t MASK>
96 if(!ParseDescriptor(&
p, &
cntdn))
102template <const u
int8_t CLASS_ID, const u
int8_t SUBCLASS_ID, const u
int8_t PROTOCOL_ID, const u
int8_t MASK>
106 switch(stateParseDescr) {
125 theBuffer.
pValue = varBuffer + 2;
131 isGoodInterface =
false;
147 confValue =
ucd->bConfigurationValue;
163 isGoodInterface =
true;
164 ifaceNumber =
uid->bInterfaceNumber;
165 ifaceAltSet =
uid->bAlternateSetting;
166 protoValue =
uid->bInterfaceProtocol;
184 theBuffer.
pValue = varBuffer;
190template <const u
int8_t CLASS_ID, const u
int8_t SUBCLASS_ID, const u
int8_t PROTOCOL_ID, const u
int8_t MASK>
192 Notify(
PSTR(
"\r\n\r\nHID Descriptor:\r\n"), 0x80);
214 Notify(
PSTR(
"\r\nwDescriptorLength:\t"), 0x80);
bool Skip(uint8_t **pp, uint16_t *pcntdn, uint16_t bytes_to_skip)
void Initialize(MultiValueBuffer *pbuf)
void Parse(const uint16_t len, const uint8_t *pbuf, const uint16_t &offset)
ConfigDescParser(UsbConfigXtracter *xtractor)
void Initialize(MultiValueBuffer *const pbuf)
bool Parse(uint8_t **pp, uint16_t *pcntdn)
virtual void EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto, const USB_ENDPOINT_DESCRIPTOR *ep)
#define CP_MASK_COMPARE_PROTOCOL
#define CP_MASK_COMPARE_SUBCLASS
#define CP_MASK_COMPARE_CLASS
#define USB_DESCRIPTOR_INTERFACE
#define HID_DESCRIPTOR_HID
#define USB_DESCRIPTOR_CONFIGURATION
#define USB_DESCRIPTOR_ENDPOINT