Changeset f51f193 in mainline for uspace/drv/bus/usb/usbmast/cmds.h


Ignore:
Timestamp:
2011-07-12T03:00:14Z (13 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6817eba
Parents:
eca52a8 (diff), 026793d (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:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbmast/cmds.h

    reca52a8 rf51f193  
    5757} __attribute__((packed)) usb_massstor_csw_t;
    5858
    59 static inline void usb_massstor_cbw_prepare(usb_massstor_cbw_t *cbw,
    60     uint32_t tag, uint32_t transfer_length, usb_direction_t dir,
    61     uint8_t lun, uint8_t cmd_len, uint8_t *cmd)
    62 {
    63         cbw->dCBWSignature = uint32_host2usb(0x43425355);
    64         cbw->dCBWTag = tag;
    65         cbw->dCBWDataTransferLength = transfer_length;
    66 
    67         cbw->bmCBWFlags = 0;
    68         if (dir == USB_DIRECTION_IN) {
    69                 cbw->bmCBWFlags |= (1 << 7);
    70         }
    71 
    72         /* Only lowest 4 bits. */
    73         cbw->bCBWLUN = lun & 0x0F;
    74 
    75         /* Only lowest 5 bits. */
    76         cbw->bCBWBLength = cmd_len & 0x1F;
    77 
    78         memcpy(cbw->CBWCB, cmd, cbw->bCBWBLength);
    79 }
     59extern void usb_massstor_cbw_prepare(usb_massstor_cbw_t *, uint32_t, uint32_t,
     60    usb_direction_t, uint8_t, uint8_t, const uint8_t *);
    8061
    8162#endif
Note: See TracChangeset for help on using the changeset viewer.