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

Changeset 3f08fd2b in mainline


Ignore:
Timestamp:
2011-07-03T10:41:29Z (11 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
6430ac6
Parents:
b361bdd
Message:

Deinline usb_massstor_cbw_prepare().

Location:
uspace/drv/bus/usb/usbmast
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbmast/Makefile

    rb361bdd r3f08fd2b  
    4444
    4545SOURCES = \
     46        cmds.c \
    4647        inquiry.c \
    4748        main.c \
  • uspace/drv/bus/usb/usbmast/cmds.h

    rb361bdd r3f08fd2b  
    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, uint8_t *);
    8061
    8162#endif
Note: See TracChangeset for help on using the changeset viewer.