From 98ebfce4601df14b68634a4cce1a01eb7204bf51 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Wed, 10 May 2023 17:19:35 +0600 Subject: [PATCH] usb: Revert usage of uchar.h --- src/chipset/ali1543.c | 1 - src/chipset/intel_piix.c | 1 - src/chipset/sis_5571.c | 1 - src/chipset/stpc.c | 1 - src/chipset/via_pipc.c | 1 - src/include/86box/usb.h | 14 +++++++++++++- src/usb.c | 1 - 7 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/chipset/ali1543.c b/src/chipset/ali1543.c index 26673edec..2e2f74305 100644 --- a/src/chipset/ali1543.c +++ b/src/chipset/ali1543.c @@ -20,7 +20,6 @@ #include #include #include -#include #define HAVE_STDARG_H #include <86box/86box.h> #include <86box/timer.h> diff --git a/src/chipset/intel_piix.c b/src/chipset/intel_piix.c index f550d9503..470978611 100644 --- a/src/chipset/intel_piix.c +++ b/src/chipset/intel_piix.c @@ -23,7 +23,6 @@ #include #include #include -#include #define HAVE_STDARG_H #include <86box/86box.h> #include "cpu.h" diff --git a/src/chipset/sis_5571.c b/src/chipset/sis_5571.c index a20f5fadd..c158e2d63 100644 --- a/src/chipset/sis_5571.c +++ b/src/chipset/sis_5571.c @@ -20,7 +20,6 @@ #include #include #include -#include #define HAVE_STDARG_H #include <86box/86box.h> #include <86box/device.h> diff --git a/src/chipset/stpc.c b/src/chipset/stpc.c index 822f462ad..2e4b045f2 100644 --- a/src/chipset/stpc.c +++ b/src/chipset/stpc.c @@ -20,7 +20,6 @@ #include #include #include -#include #define HAVE_STDARG_H #include <86box/86box.h> #include <86box/mem.h> diff --git a/src/chipset/via_pipc.c b/src/chipset/via_pipc.c index 067b733a2..c2abc4465 100644 --- a/src/chipset/via_pipc.c +++ b/src/chipset/via_pipc.c @@ -26,7 +26,6 @@ #include #include #include -#include #define HAVE_STDARG_H #include <86box/86box.h> #include "cpu.h" diff --git a/src/include/86box/usb.h b/src/include/86box/usb.h index 455282f71..d0801b99c 100644 --- a/src/include/86box/usb.h +++ b/src/include/86box/usb.h @@ -92,6 +92,18 @@ typedef struct uint8_t bDescriptorType; } usb_desc_base_t; +enum usb_desc_setup_req_types +{ + USB_SETUP_TYPE_DEVICE = 0x0, + USB_SETUP_TYPE_INTERFACE = 0x1, + USB_SETUP_TYPE_ENDPOING = 0x2, + USB_SETUP_TYPE_OTHER = 0x3, +}; + +#define USB_SETUP_TYPE_MAX 0x1F + +#define USB_SETUP_DEV_TO_HOST 0x80 + typedef struct { uint8_t bmRequestType; @@ -137,7 +149,7 @@ typedef struct typedef struct { usb_desc_base_t base; - char16_t bString[]; + uint16_t bString[]; } usb_desc_string_t; typedef struct diff --git a/src/usb.c b/src/usb.c index 5d661bd72..fce5fe0b0 100644 --- a/src/usb.c +++ b/src/usb.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #define HAVE_STDARG_H #include <86box/86box.h>