mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
sys/usb/usbus_msc: fix typo in C expression
Rather than setting the correct blk_len, the code only wrote 1 and 0 into the three bytes due to the use of a logic and where a bitwise and should be used.
This commit is contained in:
parent
7ac0b6f821
commit
28c1630f54
@ -163,9 +163,9 @@ static void _scsi_read_format_capacities(usbus_handler_t *handler, uint8_t lun)
|
||||
pkt->type = SCSI_READ_FMT_CAPA_TYPE_FORMATTED;
|
||||
|
||||
/* Manage endianness, bytes 11..9 -> LSB..MSB */
|
||||
pkt->blk_len[0] = (block_size >> 16) && 0xFF;
|
||||
pkt->blk_len[1] = (block_size >> 8) && 0xFF;
|
||||
pkt->blk_len[2] = block_size && 0xFF;
|
||||
pkt->blk_len[0] = (block_size >> 16) & 0xFF;
|
||||
pkt->blk_len[1] = (block_size >> 8) & 0xFF;
|
||||
pkt->blk_len[2] = block_size & 0xFF;
|
||||
|
||||
/* copy into ep buffer */
|
||||
usbdev_ep_xmit(msc->ep_in->ep, (uint8_t *)pkt, sizeof(msc_read_fmt_capa_pkt_t));
|
||||
|
Loading…
Reference in New Issue
Block a user