fl16: Remove MSOS2 descriptor

Signed-off-by: Daniel Schaefer <dhs@frame.work>
This commit is contained in:
Daniel Schaefer 2023-12-01 10:55:19 +08:00
parent 1ad69d4b5f
commit 43bac408c6
2 changed files with 11 additions and 0 deletions

View File

@ -74,6 +74,7 @@ static void keyboard_idle_timer_cb(struct ch_virtual_timer *, void *arg);
report_keyboard_t keyboard_report_sent = {{0}}; report_keyboard_t keyboard_report_sent = {{0}};
report_mouse_t mouse_report_sent = {0}; report_mouse_t mouse_report_sent = {0};
#if defined(MSOS2_CAP)
static uint8_t msos_descriptor_set[] __attribute__((aligned(4))) = { static uint8_t msos_descriptor_set[] __attribute__((aligned(4))) = {
// //
// Microsoft OS 2.0 Descriptor Set Header // Microsoft OS 2.0 Descriptor Set Header
@ -105,6 +106,7 @@ static uint8_t msos_descriptor_set[] __attribute__((aligned(4))) = {
0x04, 0x00, // wPropertyDataLength 4 bytes 0x04, 0x00, // wPropertyDataLength 4 bytes
0x00, 0x00, 0x00, 0x00 // PropertyData - 0x00000001 0x00, 0x00, 0x00, 0x00 // PropertyData - 0x00000001
}; };
#endif
union { union {
uint8_t report_id; uint8_t report_id;
@ -767,6 +769,7 @@ static bool usb_request_hook_cb(USBDriver *usbp) {
return TRUE; return TRUE;
} }
#if defined(MSOS2_CAP)
/* Handle Vendor Specific Request */ /* Handle Vendor Specific Request */
//if (((usbp->setup[0] & USB_RTYPE_TYPE_MASK) == USB_RTYPE_TYPE_VENDOR) && ((usbp->setup[0] & USB_RTYPE_RECIPIENT_MASK) == USB_RTYPE_RECIPIENT_DEVICE)) { //if (((usbp->setup[0] & USB_RTYPE_TYPE_MASK) == USB_RTYPE_TYPE_VENDOR) && ((usbp->setup[0] & USB_RTYPE_RECIPIENT_MASK) == USB_RTYPE_RECIPIENT_DEVICE)) {
// Type=Vendor, Direction=Host2Dev, Recipient=Device // Type=Vendor, Direction=Host2Dev, Recipient=Device
@ -792,6 +795,7 @@ static bool usb_request_hook_cb(USBDriver *usbp) {
return TRUE; return TRUE;
} }
//dprint("zoid: After\n"); //dprint("zoid: After\n");
#endif
for (int i = 0; i < NUM_USB_DRIVERS; i++) { for (int i = 0; i < NUM_USB_DRIVERS; i++) {
if (drivers.array[i].config.int_in) { if (drivers.array[i].config.int_in) {

View File

@ -493,8 +493,13 @@ const USB_Descriptor_Bos_t PROGMEM BosDescriptor = {
}, },
// 3 Bytes (=> 5 Bytes) // 3 Bytes (=> 5 Bytes)
// Value must be header + each cap // Value must be header + each cap
#if defined(MSOS2_CAP)
.TotalLength = 0x0028, .TotalLength = 0x0028,
.NumDeviceCaps = 0x02, .NumDeviceCaps = 0x02,
#else
.TotalLength = 0x000C,
.NumDeviceCaps = 0x01,
#endif
.Usb20ExtensionDevCap = { .Usb20ExtensionDevCap = {
// 2 Bytes (=> 7 Bytes) // 2 Bytes (=> 7 Bytes)
@ -507,6 +512,7 @@ const USB_Descriptor_Bos_t PROGMEM BosDescriptor = {
.Bytes = {0x00, 0x00, 0x00, 0x00}, .Bytes = {0x00, 0x00, 0x00, 0x00},
}, },
#ifdef MSOS2_CAP
// 28 Bytes (0x1C) // 28 Bytes (0x1C)
.MsosCap = { .MsosCap = {
// 2 Bytes (=> 7 Bytes) // 2 Bytes (=> 7 Bytes)
@ -531,6 +537,7 @@ const USB_Descriptor_Bos_t PROGMEM BosDescriptor = {
.AltEnumCode = 0, .AltEnumCode = 0,
}}, }},
}, },
#endif
}; };
#ifndef USB_MAX_POWER_CONSUMPTION #ifndef USB_MAX_POWER_CONSUMPTION