Numworks Epsilon  1.4.1
Graphing Calculator Operating System
interface_descriptor.h
Go to the documentation of this file.
1 #ifndef ION_DEVICE_USB_STACK_INTERFACE_DESCRIPTOR_H
2 #define ION_DEVICE_USB_STACK_INTERFACE_DESCRIPTOR_H
3 
4 #include "descriptor.h"
5 
6 namespace Ion {
7 namespace USB {
8 namespace Device {
9 
10 class ConfigurationDescriptor;
11 
14 public:
16  uint8_t bInterfaceNumber,
17  uint8_t bAlternateSetting,
18  uint8_t bNumEndpoints,
19  uint8_t bInterfaceClass,
20  uint8_t bInterfaceSubClass,
21  uint8_t bInterfaceProtocol,
22  uint8_t iInterface,
23  Descriptor * additionalDescriptor) :
24  Descriptor(0x04),
25  m_bInterfaceNumber(bInterfaceNumber),
26  m_bAlternateSetting(bAlternateSetting),
27  m_bNumEndpoints(bNumEndpoints),
28  m_bInterfaceClass(bInterfaceClass),
29  m_bInterfaceSubClass(bInterfaceSubClass),
30  m_bInterfaceProtocol(bInterfaceProtocol),
31  m_iInterface(iInterface),
32  m_additionalDescriptor(additionalDescriptor)
33  /* There could be more than one additional descriptor, but we do not need
34  * this for now. */
35  {
36  }
37 protected:
38  void push(Channel * c) const override;
39  virtual uint8_t bLength() const override;
40 private:
41  uint8_t m_bInterfaceNumber;
42  uint8_t m_bAlternateSetting;
43  uint8_t m_bNumEndpoints;
44  uint8_t m_bInterfaceClass;
45  uint8_t m_bInterfaceSubClass;
46  uint8_t m_bInterfaceProtocol;
47  uint8_t m_iInterface;
48  const Descriptor * m_additionalDescriptor;
49 };
50 
51 }
52 }
53 }
54 
55 #endif
constexpr InterfaceDescriptor(uint8_t bInterfaceNumber, uint8_t bAlternateSetting, uint8_t bNumEndpoints, uint8_t bInterfaceClass, uint8_t bInterfaceSubClass, uint8_t bInterfaceProtocol, uint8_t iInterface, Descriptor *additionalDescriptor)
virtual uint8_t bLength() const override
unsigned char uint8_t
Definition: stdint.h:4
c(generic_all_nodes)
Definition: app.cpp:5
void push(Channel *c) const override
Definition: backlight.h:6