Numworks Epsilon  1.4.1
Graphing Calculator Operating System
configuration_descriptor.h
Go to the documentation of this file.
1 #ifndef ION_DEVICE_USB_STACK_CONFIGURATION_DESCRIPTOR_H
2 #define ION_DEVICE_USB_STACK_CONFIGURATION_DESCRIPTOR_H
3 
4 #include "descriptor.h"
5 #include "interface_descriptor.h"
6 
7 namespace Ion {
8 namespace USB {
9 namespace Device {
10 
12 public:
14  uint16_t wTotalLength,
15  uint8_t bNumInterfaces,
16  uint8_t bConfigurationValue,
17  uint8_t iConfiguration,
18  uint8_t bmAttributes,
19  uint8_t bMaxPower,
20  const InterfaceDescriptor * interfaces) :
21  Descriptor(0x02),
22  m_wTotalLength(wTotalLength),
23  m_bNumInterfaces(bNumInterfaces),
24  m_bConfigurationValue(bConfigurationValue),
25  m_iConfiguration(iConfiguration),
26  m_bmAttributes(bmAttributes),
27  m_bMaxPower(bMaxPower),
28  m_interfaces(interfaces)
29  {
30  }
31 protected:
32  void push(Channel * c) const override;
33  virtual uint8_t bLength() const override;
34 private:
35  uint16_t m_wTotalLength;
36  uint8_t m_bNumInterfaces;
37  uint8_t m_bConfigurationValue;
38  uint8_t m_iConfiguration;
39  uint8_t m_bmAttributes;
40  uint8_t m_bMaxPower;
41  const InterfaceDescriptor * m_interfaces;
42 };
43 
44 }
45 }
46 }
47 
48 #endif
unsigned short uint16_t
Definition: stdint.h:5
unsigned char uint8_t
Definition: stdint.h:4
c(generic_all_nodes)
Definition: app.cpp:5
constexpr ConfigurationDescriptor(uint16_t wTotalLength, uint8_t bNumInterfaces, uint8_t bConfigurationValue, uint8_t iConfiguration, uint8_t bmAttributes, uint8_t bMaxPower, const InterfaceDescriptor *interfaces)
Definition: backlight.h:6