mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-25 00:30:46 +01:00
[usb] Rename WinUSB Descriptors into Microsoft OS Descriptors.
Change-Id: I1d6a5e8c59f113ff60e75da1aaef6754f9eb1211
This commit is contained in:
@@ -17,12 +17,12 @@ usb_objs += $(addprefix ion/src/device/usb/stack/, \
|
||||
dfu_functional_descriptor.o\
|
||||
interface_descriptor.o\
|
||||
language_id_string_descriptor.o \
|
||||
microsoft_os_platform_descriptor.o\
|
||||
platform_device_capability_descriptor.o\
|
||||
streamable.o\
|
||||
string_descriptor.o\
|
||||
url_descriptor.o\
|
||||
webusb_platform_descriptor.o\
|
||||
winusb_platform_descriptor.o\
|
||||
)
|
||||
|
||||
USB_DFU_XIP_FLASH := 0
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#include "winusb_platform_descriptor.h"
|
||||
#include "microsoft_os_platform_descriptor.h"
|
||||
|
||||
namespace Ion {
|
||||
namespace USB {
|
||||
namespace Device {
|
||||
|
||||
constexpr uint8_t WinUSBPlatformDescriptor::k_winUSBUUID[];
|
||||
constexpr uint8_t MicrosoftOSPlatformDescriptor::k_microsoftOSUUID[];
|
||||
|
||||
void WinUSBPlatformDescriptor::push(Channel * c) const {
|
||||
void MicrosoftOSPlatformDescriptor::push(Channel * c) const {
|
||||
PlatformDeviceCapabilityDescriptor::push(c);
|
||||
c->push(m_dwWindowsVersion);
|
||||
c->push(m_wMSOSDescriptorSetTotalLength);
|
||||
@@ -14,7 +14,7 @@ void WinUSBPlatformDescriptor::push(Channel * c) const {
|
||||
c->push(m_bAltEnumCode);
|
||||
}
|
||||
|
||||
uint8_t WinUSBPlatformDescriptor::bLength() const {
|
||||
uint8_t MicrosoftOSPlatformDescriptor::bLength() const {
|
||||
return PlatformDeviceCapabilityDescriptor::bLength() + sizeof(uint32_t) + sizeof(uint16_t) + 2*sizeof(uint8_t);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef ION_DEVICE_USB_STACK_WINUSB_PLATFORM_DESCRIPTOR_H
|
||||
#define ION_DEVICE_USB_STACK_WINUSB_PLATFORM_DESCRIPTOR_H
|
||||
#ifndef ION_DEVICE_USB_STACK_MICROSOFT_OS_PLATFORM_DESCRIPTOR_H
|
||||
#define ION_DEVICE_USB_STACK_MICROSOFT_OS_PLATFORM_DESCRIPTOR_H
|
||||
|
||||
#include "platform_device_capability_descriptor.h"
|
||||
|
||||
@@ -12,10 +12,10 @@ namespace Device {
|
||||
* Different sets of descriptors can be sent to different Windows versions, but
|
||||
* we use one descriptor set only. */
|
||||
|
||||
class WinUSBPlatformDescriptor : public PlatformDeviceCapabilityDescriptor {
|
||||
class MicrosoftOSPlatformDescriptor : public PlatformDeviceCapabilityDescriptor {
|
||||
public:
|
||||
constexpr WinUSBPlatformDescriptor(uint16_t wMSOSDescriptorSetTotalLength, uint8_t bMS_VendorCode) :
|
||||
PlatformDeviceCapabilityDescriptor(k_winUSBUUID),
|
||||
constexpr MicrosoftOSPlatformDescriptor(uint16_t wMSOSDescriptorSetTotalLength, uint8_t bMS_VendorCode) :
|
||||
PlatformDeviceCapabilityDescriptor(k_microsoftOSUUID),
|
||||
m_dwWindowsVersion(0x06030000), // Windows 8.1, it cannot be lower
|
||||
m_wMSOSDescriptorSetTotalLength(wMSOSDescriptorSetTotalLength),
|
||||
m_bMS_VendorCode(bMS_VendorCode),
|
||||
@@ -28,7 +28,7 @@ protected:
|
||||
private:
|
||||
/* Little-endian encoding of {D8DD60DF-4589-4CC7-9CD2-659D9E648A9F}.
|
||||
* See Microsoft OS 2.0 Descriptors Specification. */
|
||||
constexpr static uint8_t k_winUSBUUID[] = {
|
||||
constexpr static uint8_t k_microsoftOSUUID[] = {
|
||||
0xDF, 0x60, 0xDD, 0xD8, 0x89, 0x45, 0xC7, 0x4C,
|
||||
0x9C, 0xD2, 0x65, 0x9D, 0x9E, 0x64, 0x8A, 0x9F};
|
||||
uint32_t m_dwWindowsVersion; // Minimum version of Windows that the descriptor set can be applied to
|
||||
Reference in New Issue
Block a user