Ignore:
Timestamp:
2011-12-26T17:21:21Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9b56a8dd
Parents:
cf5c05c0 (diff), 7e1b130 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Mainline changes.

File:
1 edited

Legend:

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

    rcf5c05c0 rb39eb79  
    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_GET_RECIPIENT(rec) (rec & 0x1f)
     87#define SETUP_REQUEST_TO_HOST(type, recipient) \
     88    (uint8_t)((1 << 7) | ((type & 0x3) << 5) | (recipient & 0x1f))
     89#define SETUP_REQUEST_TO_DEVICE(type, recipient) \
     90    (uint8_t)(((type & 0x3) << 5) | (recipient & 0x1f))
    8591
    8692        /** Request identification. */
Note: See TracChangeset for help on using the changeset viewer.