Numworks Epsilon  1.4.1
Graphing Calculator Operating System
webusb_platform_descriptor.h
Go to the documentation of this file.
1 #ifndef ION_DEVICE_USB_STACK_WEBUSB_PLATFORM_DESCRIPTOR_H
2 #define ION_DEVICE_USB_STACK_WEBUSB_PLATFORM_DESCRIPTOR_H
3 
5 
6 namespace Ion {
7 namespace USB {
8 namespace Device {
9 
11 public:
12  constexpr WebUSBPlatformDescriptor(uint8_t bVendorCode, uint8_t iLandingPage) :
14  m_bcdVersion(0x0100),
15  m_bVendorCode(bVendorCode),
16  m_iLandingPage(iLandingPage)
17  {
18  }
19 protected:
20  void push(Channel * c) const override;
21  virtual uint8_t bLength() const override;
22 private:
23  /* Little-endian encoding of {3408B638-09A9-47A0-8BFD-A0768815B665}.
24  * See https://wicg.github.io/webusb/#webusb-platform-capability-descriptor */
25  constexpr static uint8_t k_webUSBUUID[] = {
26  0x38, 0xB6, 0x08, 0x34, 0xA9, 0x09, 0xA0, 0x47,
27  0x8B, 0xFD, 0xA0, 0x76, 0x88, 0x15, 0xB6, 0x65};
28  uint16_t m_bcdVersion;
29  uint8_t m_bVendorCode;
30  uint8_t m_iLandingPage;
31 };
32 
33 }
34 }
35 }
36 
37 #endif
constexpr WebUSBPlatformDescriptor(uint8_t bVendorCode, uint8_t iLandingPage)
unsigned short uint16_t
Definition: stdint.h:5
unsigned char uint8_t
Definition: stdint.h:4
c(generic_all_nodes)
Definition: app.cpp:5
Definition: backlight.h:6