From b7b64858a66ef2cb37ea60a8e95ba995accebb86 Mon Sep 17 00:00:00 2001 From: yellows8 Date: Fri, 30 Nov 2018 18:57:08 -0500 Subject: [PATCH] Added usb_standard_request from libusb. --- nx/include/switch/services/usb.h | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/nx/include/switch/services/usb.h b/nx/include/switch/services/usb.h index 82ea07b3..d8739f63 100644 --- a/nx/include/switch/services/usb.h +++ b/nx/include/switch/services/usb.h @@ -147,6 +147,53 @@ enum usb_transfer_type { USB_TRANSFER_TYPE_BULK_STREAM = 4, }; +/// Imported from libusb, with changed names. +enum usb_standard_request { + /** Request status of the specific recipient */ + USB_REQUEST_GET_STATUS = 0x00, + + /** Clear or disable a specific feature */ + USB_REQUEST_CLEAR_FEATURE = 0x01, + + /* 0x02 is reserved */ + + /** Set or enable a specific feature */ + USB_REQUEST_SET_FEATURE = 0x03, + + /* 0x04 is reserved */ + + /** Set device address for all future accesses */ + USB_REQUEST_SET_ADDRESS = 0x05, + + /** Get the specified descriptor */ + USB_REQUEST_GET_DESCRIPTOR = 0x06, + + /** Used to update existing descriptors or add new descriptors */ + USB_REQUEST_SET_DESCRIPTOR = 0x07, + + /** Get the current device configuration value */ + USB_REQUEST_GET_CONFIGURATION = 0x08, + + /** Set device configuration */ + USB_REQUEST_SET_CONFIGURATION = 0x09, + + /** Return the selected alternate setting for the specified interface */ + USB_REQUEST_GET_INTERFACE = 0x0A, + + /** Select an alternate interface for the specified interface */ + USB_REQUEST_SET_INTERFACE = 0x0B, + + /** Set then report an endpoint's synchronization frame */ + USB_REQUEST_SYNCH_FRAME = 0x0C, + + /** Sets both the U1 and U2 Exit Latency */ + USB_REQUEST_SET_SEL = 0x30, + + /** Delay from the time a host transmits a packet to the time it is + * received by the device. */ + USB_SET_ISOCH_DELAY = 0x31, +}; + /// Imported from libusb, with changed names. enum usb_iso_sync_type { USB_ISO_SYNC_TYPE_NONE = 0,