* board, and indicates if they are present and functioning correctly. Only the Self-Test portion of the diagnostic command is\r
* supported.\r
*\r
+ * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with\r
+ *\r
* \return Boolean true if the command completed successfully, false otherwise.\r
*/\r
static bool SCSI_Command_Send_Diagnostic(void)\r
{\r
- uint8_t ReturnByte;\r
-\r
/* Check to see if the SELF TEST bit is not set */\r
if (!(CommandBlock.SCSICommandData[1] & (1 << 2)))\r
{\r
return false;\r
}\r
\r
- /* Test first Dataflash IC is present and responding to commands */\r
- Dataflash_SelectChip(DATAFLASH_CHIP1);\r
- Dataflash_SendByte(DF_CMD_READMANUFACTURERDEVICEINFO);\r
- ReturnByte = Dataflash_ReceiveByte();\r
- Dataflash_DeselectChip();\r
-\r
- /* If returned data is invalid, fail the command */\r
- if (ReturnByte != DF_MANUFACTURER_ATMEL)\r
+ /* Check to see if all attached Dataflash ICs are functional */\r
+ if (!(DataflashManager_CheckDataflashOperation()))\r
{\r
/* Update SENSE key with a hardware error condition and return command fail */\r
SCSI_SET_SENSE(SCSI_SENSE_KEY_HARDWARE_ERROR,\r
\r
return false;\r
}\r
-\r
- #if (DATAFLASH_TOTALCHIPS == 2)\r
- /* Test second Dataflash IC is present and responding to commands */\r
- Dataflash_SelectChip(DATAFLASH_CHIP2);\r
- Dataflash_SendByte(DF_CMD_READMANUFACTURERDEVICEINFO);\r
- ReturnByte = Dataflash_ReceiveByte();\r
- Dataflash_DeselectChip();\r
-\r
- /* If returned data is invalid, fail the command */\r
- if (ReturnByte != DF_MANUFACTURER_ATMEL)\r
- {\r
- /* Update SENSE key with a hardware error condition and return command fail */\r
- SCSI_SET_SENSE(SCSI_SENSE_KEY_HARDWARE_ERROR,\r
- SCSI_ASENSE_NO_ADDITIONAL_INFORMATION,\r
- SCSI_ASENSEQ_NO_QUALIFIER); \r
- \r
- return false;\r
- }\r
- #endif\r
\r
/* Succeed the command and update the bytes transferred counter */\r
CommandBlock.DataTransferLength = 0;\r