Skip to content
This repository has been archived by the owner on Oct 13, 2019. It is now read-only.

Commit

Permalink
Update usb.h
Browse files Browse the repository at this point in the history
  • Loading branch information
xerpi committed Aug 25, 2015
1 parent c8f370b commit 3fe2a02
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions include/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ enum libusb_descriptor_type {
LIBUSB_DT_SS_ENDPOINT_COMPANION = 0x30
};

#define LIBUSB_ENDPOINT_ADDRESS_MASK 0x0f
#define LIBUSB_ENDPOINT_DIR_MASK 0x80

enum libusb_endpoint_direction {
LIBUSB_ENDPOINT_IN = 0x80,
LIBUSB_ENDPOINT_OUT = 0x00
};

#define LIBUSB_TRANSFER_TYPE_MASK 0x03

enum libusb_transfer_type {
LIBUSB_TRANSFER_TYPE_CONTROL = 0,
LIBUSB_TRANSFER_TYPE_ISOCHRONOUS = 1,
Expand All @@ -67,16 +77,9 @@ enum libusb_standard_request {
};

enum libusb_request_type {
/** Standard */
LIBUSB_REQUEST_TYPE_STANDARD = (0x00 << 5),

/** Class */
LIBUSB_REQUEST_TYPE_CLASS = (0x01 << 5),

/** Vendor */
LIBUSB_REQUEST_TYPE_VENDOR = (0x02 << 5),

/** Reserved */
LIBUSB_REQUEST_TYPE_RESERVED = (0x03 << 5)
};

Expand Down Expand Up @@ -151,11 +154,6 @@ struct libusb_config_descriptor {
int extra_length;
};

enum libusb_endpoint_direction {
LIBUSB_ENDPOINT_IN = 0x80,
LIBUSB_ENDPOINT_OUT = 0x00
};

typedef struct libusb_device libusb_device;
typedef struct libusb_device_handle libusb_device_handle;

Expand Down

0 comments on commit 3fe2a02

Please sign in to comment.