Prusa MINI Firmware overview
ConfigDescParser< CLASS_ID, SUBCLASS_ID, PROTOCOL_ID, MASK > Class Template Reference

#include <confdescparser.h>

Inheritance diagram for ConfigDescParser< CLASS_ID, SUBCLASS_ID, PROTOCOL_ID, MASK >:
Collaboration diagram for ConfigDescParser< CLASS_ID, SUBCLASS_ID, PROTOCOL_ID, MASK >:

Public Member Functions

void SetOR ()
 
 ConfigDescParser (UsbConfigXtracter *xtractor)
 
void Parse (const uint16_t len, const uint8_t *pbuf, const uint16_t &offset)
 

Constructor & Destructor Documentation

◆ ConfigDescParser()

template<const uint8_t CLASS_ID, const uint8_t SUBCLASS_ID, const uint8_t PROTOCOL_ID, const uint8_t MASK>
ConfigDescParser< CLASS_ID, SUBCLASS_ID, PROTOCOL_ID, MASK >::ConfigDescParser ( UsbConfigXtracter xtractor)
78  :
79  theXtractor(xtractor),
80  stateParseDescr(0),
81  dscrLen(0),
82  dscrType(0),
83  UseOr(false) {
84  theBuffer.pValue = varBuffer;
85  valParser.Initialize(&theBuffer);
86  theSkipper.Initialize(&theBuffer);
87  };
Here is the call graph for this function:

Member Function Documentation

◆ SetOR()

template<const uint8_t CLASS_ID, const uint8_t SUBCLASS_ID, const uint8_t PROTOCOL_ID, const uint8_t MASK>
void ConfigDescParser< CLASS_ID, SUBCLASS_ID, PROTOCOL_ID, MASK >::SetOR ( )
72 { UseOr = true; }

◆ Parse()

template<const uint8_t CLASS_ID, const uint8_t SUBCLASS_ID, const uint8_t PROTOCOL_ID, const uint8_t MASK>
void ConfigDescParser< CLASS_ID, SUBCLASS_ID, PROTOCOL_ID, MASK >::Parse ( const uint16_t  len,
const uint8_t pbuf,
const uint16_t &  offset 
)
virtual

Implements USBReadParser.

90  {
91  uint16_t cntdn = (uint16_t)len;
92  uint8_t *p = (uint8_t*)pbuf;
93  while (cntdn) if (!ParseDescriptor(&p, &cntdn)) return;
94 }
pbuf::len
u16_t len
Definition: pbuf.h:159
ByteSkipper::Initialize
void Initialize(MultiValueBuffer *pbuf)
Definition: parsetools.h:66
MultiByteValueParser::Initialize
void Initialize(MultiValueBuffer *const pbuf)
Definition: parsetools.h:48
uint8_t
const uint8_t[]
Definition: 404_html.c:3
MultiValueBuffer::pValue
void * pValue
Definition: parsetools.h:33
pbuf
Definition: pbuf.h:142