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
4
#include "
platform_device_capability_descriptor.h
"
5
6
namespace
Ion
{
7
namespace
USB
{
8
namespace
Device {
9
10
class
WebUSBPlatformDescriptor
:
public
PlatformDeviceCapabilityDescriptor
{
11
public
:
12
constexpr
WebUSBPlatformDescriptor
(
uint8_t
bVendorCode,
uint8_t
iLandingPage) :
13
PlatformDeviceCapabilityDescriptor
(k_webUSBUUID),
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
Ion::USB::Device::WebUSBPlatformDescriptor
Definition:
webusb_platform_descriptor.h:10
Ion::USB::Device::WebUSBPlatformDescriptor::WebUSBPlatformDescriptor
constexpr WebUSBPlatformDescriptor(uint8_t bVendorCode, uint8_t iLandingPage)
Definition:
webusb_platform_descriptor.h:12
Ion::USB::Device::WebUSBPlatformDescriptor::push
void push(Channel *c) const override
Definition:
webusb_platform_descriptor.cpp:9
Ion::USB::Device::WebUSBPlatformDescriptor::bLength
virtual uint8_t bLength() const override
Definition:
webusb_platform_descriptor.cpp:16
platform_device_capability_descriptor.h
Ion::USB::Device::PlatformDeviceCapabilityDescriptor
Definition:
platform_device_capability_descriptor.h:10
uint16_t
unsigned short uint16_t
Definition:
stdint.h:5
uint8_t
unsigned char uint8_t
Definition:
stdint.h:4
c
c(generic_all_nodes)
USB
Definition:
app.cpp:5
Ion
Definition:
backlight.h:6
epsilon
ion
src
device
usb
stack
webusb_platform_descriptor.h
Generated by
1.8.14