aboutsummaryrefslogtreecommitdiffstats
path: root/Bootloaders/DFU/BootloaderDFU.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-12-09 00:50:55 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-12-09 00:50:55 +0000
commit7ace314cc12f24c1c3108311bdfb3a2ed484ab37 (patch)
tree5ff719df1d93ea5cfc6393999e42468e0b727d1d /Bootloaders/DFU/BootloaderDFU.h
parent2281750b5fdf046ed606e567eb60cf4e647015dd (diff)
downloadlufa-7ace314cc12f24c1c3108311bdfb3a2ed484ab37.tar.gz
lufa-7ace314cc12f24c1c3108311bdfb3a2ed484ab37.tar.bz2
lufa-7ace314cc12f24c1c3108311bdfb3a2ed484ab37.zip
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.).
Diffstat (limited to 'Bootloaders/DFU/BootloaderDFU.h')
-rw-r--r--Bootloaders/DFU/BootloaderDFU.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Bootloaders/DFU/BootloaderDFU.h b/Bootloaders/DFU/BootloaderDFU.h
index c711e4378..aac341f8c 100644
--- a/Bootloaders/DFU/BootloaderDFU.h
+++ b/Bootloaders/DFU/BootloaderDFU.h
@@ -79,7 +79,7 @@
* \param[in] dataarr Command byte array to check against
* \param[in] cb1 First command byte to check
*/
- #define IS_ONEBYTE_COMMAND(dataarr, cb1) (dataarr[0] == cb1)
+ #define IS_ONEBYTE_COMMAND(dataarr, cb1) (dataarr[0] == (cb1))
/** Convenience macro, used to determine if the issued command is the given two-byte long command.
*
@@ -87,7 +87,7 @@
* \param[in] cb1 First command byte to check
* \param[in] cb2 Second command byte to check
*/
- #define IS_TWOBYTE_COMMAND(dataarr, cb1, cb2) ((dataarr[0] == cb1) && (dataarr[1] == cb2))
+ #define IS_TWOBYTE_COMMAND(dataarr, cb1, cb2) ((dataarr[0] == (cb1)) && (dataarr[1] == (cb2)))
/** Length of the DFU file suffix block, appended to the end of each complete memory write command.
* The DFU file suffix is currently unused (but is designed to give extra file information, such as