From 7ace314cc12f24c1c3108311bdfb3a2ed484ab37 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Wed, 9 Dec 2009 00:50:55 +0000 Subject: Increase timeout of Mass Storage and Still Image host commands to 10 seconds (up from 5) to account for slow-processing devices. Added brace guards to macros with parameters to prevent unintended changed evaluation of the macro expression. Minor code cleanups (remove redundant comments, fix spacing, etc.). --- Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.h | 8 ++++---- Demos/Device/ClassDriver/MassStorage/Lib/SCSI.h | 6 +++--- Demos/Device/ClassDriver/MassStorage/MassStorage.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'Demos/Device/ClassDriver/MassStorage') diff --git a/Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.h b/Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.h index 2deac0963..dcd5deec8 100644 --- a/Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.h +++ b/Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.h @@ -42,10 +42,10 @@ #include "MassStorage.h" #include "Descriptors.h" - #include // Function Attribute, Atomic, Debug and ISR Macros - #include // USB Functionality - #include // Mass Storage Class Driver - #include // Dataflash chip driver + #include + #include + #include + #include /* Preprocessor Checks: */ #if (DATAFLASH_PAGE_SIZE % 16) diff --git a/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.h b/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.h index a1cbf675b..9d71e14c6 100644 --- a/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.h +++ b/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.h @@ -56,9 +56,9 @@ * \param[in] acode New SCSI additional sense key to set the additional sense code to * \param[in] aqual New SCSI additional sense key qualifier to set the additional sense qualifier code to */ - #define SCSI_SET_SENSE(key, acode, aqual) MACROS{ SenseData.SenseKey = key; \ - SenseData.AdditionalSenseCode = acode; \ - SenseData.AdditionalSenseQualifier = aqual; }MACROE + #define SCSI_SET_SENSE(key, acode, aqual) MACROS{ SenseData.SenseKey = (key); \ + SenseData.AdditionalSenseCode = (acode); \ + SenseData.AdditionalSenseQualifier = (aqual); }MACROE /** Macro for the SCSI_Command_ReadWrite_10() function, to indicate that data is to be read from the storage medium. */ #define DATA_READ true diff --git a/Demos/Device/ClassDriver/MassStorage/MassStorage.h b/Demos/Device/ClassDriver/MassStorage/MassStorage.h index fca288d7c..5fb37f140 100644 --- a/Demos/Device/ClassDriver/MassStorage/MassStorage.h +++ b/Demos/Device/ClassDriver/MassStorage/MassStorage.h @@ -65,7 +65,7 @@ #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3) /** LED mask for the library LED driver, to indicate that the USB interface is busy. */ - #define LEDMASK_USB_BUSY (LEDS_LED2) + #define LEDMASK_USB_BUSY LEDS_LED2 /** Total number of logical drives within the device - must be non-zero. */ #define TOTAL_LUNS 1 -- cgit v1.2.3