X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/899df7d3318e478859d940ec8debe679888476a5..3642ea0b9715cdf0196b10c9fc97898940eaefa6:/Projects/Webserver/Lib/SCSI.c diff --git a/Projects/Webserver/Lib/SCSI.c b/Projects/Webserver/Lib/SCSI.c index a13fd1a35..7518dfd51 100644 --- a/Projects/Webserver/Lib/SCSI.c +++ b/Projects/Webserver/Lib/SCSI.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2011. + Copyright (C) Dean Camera, 2015. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -18,7 +18,7 @@ advertising or publicity pertaining to distribution of the software without specific, written prior permission. - The author disclaim all warranties with regard to this + The author disclaims all warranties with regard to this software, including all implied warranties of merchantability and fitness. In no event shall the author be liable for any special, indirect or consequential damages or any damages @@ -86,7 +86,7 @@ static SCSI_Request_Sense_Response_t SenseData = * * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with * - * \return Boolean true if the command completed successfully, false otherwise + * \return Boolean \c true if the command completed successfully, \c false otherwise */ bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) { @@ -116,6 +116,7 @@ bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) case SCSI_CMD_MODE_SENSE_6: CommandSuccess = SCSI_Command_ModeSense_6(MSInterfaceInfo); break; + case SCSI_CMD_START_STOP_UNIT: case SCSI_CMD_TEST_UNIT_READY: case SCSI_CMD_PREVENT_ALLOW_MEDIUM_REMOVAL: case SCSI_CMD_VERIFY_10: @@ -149,7 +150,7 @@ bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) * * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with * - * \return Boolean true if the command completed successfully, false otherwise. + * \return Boolean \c true if the command completed successfully, \c false otherwise. */ static bool SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) { @@ -187,7 +188,7 @@ static bool SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* const MSInterfaceInf * * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with * - * \return Boolean true if the command completed successfully, false otherwise. + * \return Boolean \c true if the command completed successfully, \c false otherwise. */ static bool SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) { @@ -209,7 +210,7 @@ static bool SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* const MSInterf * * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with * - * \return Boolean true if the command completed successfully, false otherwise. + * \return Boolean \c true if the command completed successfully, \c false otherwise. */ static bool SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) { @@ -232,7 +233,7 @@ static bool SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* const MSInt * * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with * - * \return Boolean true if the command completed successfully, false otherwise. + * \return Boolean \c true if the command completed successfully, \c false otherwise. */ static bool SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) { @@ -271,7 +272,7 @@ static bool SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* const MSInte * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with * \param[in] IsDataRead Indicates if the command is a READ (10) command or WRITE (10) command (DATA_READ or DATA_WRITE) * - * \return Boolean true if the command completed successfully, false otherwise. + * \return Boolean \c true if the command completed successfully, \c false otherwise. */ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const bool IsDataRead) @@ -287,7 +288,7 @@ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa SCSI_ASENSE_WRITE_PROTECTED, SCSI_ASENSEQ_NO_QUALIFIER); - return false; + return false; } /* Load in the 32-bit block address (SCSI uses big-endian, so have to reverse the byte order) */ @@ -306,7 +307,7 @@ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa return false; } - + /* Determine if the packet is a READ (10) or WRITE (10) command, call appropriate function */ if (IsDataRead == DATA_READ) DataflashManager_ReadBlocks(MSInterfaceInfo, BlockAddress, TotalBlocks); @@ -324,7 +325,7 @@ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa * * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with * - * \return Boolean true if the command completed successfully, false otherwise. + * \return Boolean \c true if the command completed successfully, \c false otherwise. */ static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) { @@ -340,3 +341,4 @@ static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfac return true; } +