Numworks Epsilon  1.4.1
Graphing Calculator Operating System
bos_descriptor.h
Go to the documentation of this file.
1 #ifndef ION_DEVICE_USB_STACK_BOS_DESCRIPTOR_H
2 #define ION_DEVICE_USB_STACK_BOS_DESCRIPTOR_H
3 
4 #include "descriptor.h"
6 
7 namespace Ion {
8 namespace USB {
9 namespace Device {
10 
11 class BOSDescriptor : public Descriptor {
12 public:
13  constexpr BOSDescriptor(
14  uint16_t wTotalLength,
15  uint8_t bNumDeviceCapabilities,
16  const DeviceCapabilityDescriptor * deviceCapabilities) :
17  Descriptor(0x0F),
18  m_wTotalLength(wTotalLength),
19  m_bNumDeviceCaps(bNumDeviceCapabilities),
20  m_deviceCapabilities(deviceCapabilities)
21  {
22  }
23 protected:
24  void push(Channel * c) const override;
25  virtual uint8_t bLength() const override;
26 private:
27  uint16_t m_wTotalLength;
28  uint8_t m_bNumDeviceCaps;
29  const DeviceCapabilityDescriptor * m_deviceCapabilities;
30 };
31 
32 }
33 }
34 }
35 
36 #endif
constexpr BOSDescriptor(uint16_t wTotalLength, uint8_t bNumDeviceCapabilities, const DeviceCapabilityDescriptor *deviceCapabilities)
unsigned short uint16_t
Definition: stdint.h:5
unsigned char uint8_t
Definition: stdint.h:4
virtual uint8_t bLength() const override
void push(Channel *c) const override
c(generic_all_nodes)
Definition: app.cpp:5
Definition: backlight.h:6