Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 2f80b86 in mainline


Ignore:
Timestamp:
2011-12-06T15:09:31Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
e65cd3c4
Parents:
890a3454
Message:

libusbdev: Add bitfield interpretation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/include/usb/dev/request.h

    r890a3454 r2f80b86  
    8383        uint8_t request_type;
    8484#define SETUP_REQUEST_TYPE_DEVICE_TO_HOST (1 << 7)
     85#define SETUP_REQUEST_TYPE_GET_TYPE(rt) ((rt >> 5) & 0x3)
     86#define SETUP_REQUEST_TYPE_STANDART 0
     87#define SETUP_REQUEST_TYPE_CLASS    1
     88#define SETUP_REQUEST_TYPE_VENDOR   2
     89#define SETUP_REQUEST_TYPE_GET_RECIPIENT(rt) (rt & 0x1f)
     90#define SETUP_REQUEST_TYPE_REC_DEVICE    0
     91#define SETUP_REQUEST_TYPE_REC_INTERFACE 1
     92#define SETUP_REQUEST_TYPE_REC_ENDPOINT  2
     93#define SETUP_REQUEST_TYPE_REC_OTHER     3
    8594
    8695        /** Request identification. */
Note: See TracChangeset for help on using the changeset viewer.