Numworks Epsilon  1.4.1
Graphing Calculator Operating System
descriptor.h
Go to the documentation of this file.
1 #ifndef ION_DEVICE_USB_STACK_DESCRIPTOR_H
2 #define ION_DEVICE_USB_STACK_DESCRIPTOR_H
3 
4 #include "streamable.h"
5 
6 namespace Ion {
7 namespace USB {
8 namespace Device {
9 
10 class InterfaceDescriptor;
11 
12 class Descriptor : public Streamable {
13  friend class InterfaceDescriptor;
14 public:
15  constexpr Descriptor(uint8_t bDescriptorType) :
16  m_bDescriptorType(bDescriptorType)
17  {
18  }
19  uint8_t type() const { return m_bDescriptorType; }
20 protected:
21  void push(Channel * c) const override;
22  virtual uint8_t bLength() const { return 2*sizeof(uint8_t); }
23 private:
24  uint8_t m_bDescriptorType;
25 };
26 
27 
28 }
29 }
30 }
31 
32 #endif
unsigned char uint8_t
Definition: stdint.h:4
c(generic_all_nodes)
void push(Channel *c) const override
Definition: descriptor.cpp:8
Definition: app.cpp:5
Definition: backlight.h:6
constexpr Descriptor(uint8_t bDescriptorType)
Definition: descriptor.h:15
virtual uint8_t bLength() const
Definition: descriptor.h:22