diff options
-rw-r--r-- | main.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -175,12 +175,17 @@ struct CSW { } __attribute__((packed)); uint32_t nullbuf[16]; +uint32_t fcapbuf[] = { + 0x08000000, + 0x00010000, + 0x00020002 +}; uint32_t capbuf[] = { 0x00010000, 0x00020000 }; uint32_t inquirybuf[] = { - 0x02068020, + 0x02048000, 32, 0x20202020, 0x20202020, @@ -412,6 +417,9 @@ class USB_MSC_BBB : public USB_class_driver { // INQUIRY case 0x12: + if(cmd[2] != 0) { + return false; + } usb.write(1, inquirybuf, cbw.dCBWDataTransferLength); while(!usb.ep_ready(1)); return true; @@ -422,6 +430,12 @@ class USB_MSC_BBB : public USB_class_driver { while(!usb.ep_ready(1)); return true; + // READ FORMAT CAPACITIES + case 0x23: + usb.write(1, fcapbuf, sizeof(fcapbuf)); + while(!usb.ep_ready(1)); + return true; + // READ CAPACITY case 0x25: usb.write(1, capbuf, cbw.dCBWDataTransferLength); |