mirror of https://github.com/ARMmbed/mbed-os.git
USBMSD: implement MODE SENSE (10) command
parent
e4164bee51
commit
c7d9d0af46
|
@ -302,6 +302,7 @@ private:
|
|||
bool infoTransfer(void);
|
||||
void memoryRead(void);
|
||||
bool modeSense6(void);
|
||||
bool modeSense10(void);
|
||||
void testUnitReady(void);
|
||||
bool requestSense(void);
|
||||
void memoryVerify(uint8_t *buf, uint16_t size);
|
||||
|
|
|
@ -706,6 +706,15 @@ bool USBMSD::modeSense6(void)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool USBMSD::modeSense10(void)
|
||||
{
|
||||
uint8_t sense10[] = { 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
if (!write(sense10, sizeof(sense10))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void USBMSD::sendCSW()
|
||||
{
|
||||
_csw.Signature = CSW_Signature;
|
||||
|
@ -826,6 +835,9 @@ void USBMSD::CBWDecode(uint8_t *buf, uint16_t size)
|
|||
sendCSW();
|
||||
_media_removed = true;
|
||||
break;
|
||||
case MODE_SENSE10:
|
||||
modeSense10();
|
||||
break;
|
||||
default:
|
||||
fail();
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue