mirror of
https://github.com/hathach/tinyusb.git
synced 2026-08-18 11:02:16 +00:00
Merge pull request #3730 from dxbjavid/msc-scsi-cb-bufsize-cap
cap tud_msc_scsi_cb bufsize to endpoint buffer size
This commit is contained in:
@ -545,7 +545,8 @@ bool mscd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t event, uint32_t
|
||||
|
||||
// Invoke user callback if not built-in
|
||||
if ((resplen < 0) && (p_msc->sense_key == 0)) {
|
||||
resplen = tud_msc_scsi_cb(p_cbw->lun, p_cbw->command, _mscd_epbuf.buf, (uint16_t)p_msc->total_len);
|
||||
resplen = tud_msc_scsi_cb(p_cbw->lun, p_cbw->command, _mscd_epbuf.buf,
|
||||
(uint16_t) tu_min32(p_msc->total_len, CFG_TUD_MSC_EP_BUFSIZE));
|
||||
}
|
||||
|
||||
if (resplen < 0) {
|
||||
|
||||
Reference in New Issue
Block a user