diff options
Diffstat (limited to 'LUFA')
-rw-r--r-- | LUFA/Drivers/Board/Dataflash.h | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/MassStorage.h | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/StillImage.h | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/HighLevel/StdDescriptors.h | 12 | ||||
-rw-r--r-- | LUFA/Drivers/USB/HighLevel/USBTask.h | 4 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/Endpoint.h | 2 | ||||
-rw-r--r-- | LUFA/ManPages/ChangeLog.txt | 3 | ||||
-rw-r--r-- | LUFA/ManPages/FutureChanges.txt | 6 |
8 files changed, 21 insertions, 12 deletions
diff --git a/LUFA/Drivers/Board/Dataflash.h b/LUFA/Drivers/Board/Dataflash.h index f65298a1d..22f4b10d6 100644 --- a/LUFA/Drivers/Board/Dataflash.h +++ b/LUFA/Drivers/Board/Dataflash.h @@ -111,7 +111,7 @@ #define Dataflash_GetSelectedChip() (DATAFLASH_CHIPCS_PORT & DATAFLASH_CHIPCS_MASK)
#define Dataflash_SelectChip(mask) MACROS{ DATAFLASH_CHIPCS_PORT = ((DATAFLASH_CHIPCS_PORT \
- & ~DATAFLASH_CHIPCS_MASK) | mask); }MACROE
+ & ~DATAFLASH_CHIPCS_MASK) | (mask)); }MACROE
#define Dataflash_DeselectChip() Dataflash_SelectChip(DATAFLASH_NO_CHIP)
#endif
diff --git a/LUFA/Drivers/USB/Class/Host/MassStorage.h b/LUFA/Drivers/USB/Class/Host/MassStorage.h index 584172fe8..aa70733f5 100644 --- a/LUFA/Drivers/USB/Class/Host/MassStorage.h +++ b/LUFA/Drivers/USB/Class/Host/MassStorage.h @@ -267,7 +267,7 @@ #define COMMAND_DIRECTION_DATA_OUT (0 << 7)
#define COMMAND_DIRECTION_DATA_IN (1 << 7)
- #define COMMAND_DATA_TIMEOUT_MS 2000
+ #define COMMAND_DATA_TIMEOUT_MS 10000
#define MS_FOUND_DATAPIPE_IN (1 << 0)
#define MS_FOUND_DATAPIPE_OUT (1 << 1)
diff --git a/LUFA/Drivers/USB/Class/Host/StillImage.h b/LUFA/Drivers/USB/Class/Host/StillImage.h index 4478931e0..f89b59ec6 100644 --- a/LUFA/Drivers/USB/Class/Host/StillImage.h +++ b/LUFA/Drivers/USB/Class/Host/StillImage.h @@ -230,7 +230,7 @@ #define SI_FOUND_DATAPIPE_IN (1 << 1)
#define SI_FOUND_DATAPIPE_OUT (1 << 2)
- #define COMMAND_DATA_TIMEOUT_MS 5000
+ #define COMMAND_DATA_TIMEOUT_MS 10000
/* Function Prototypes: */
#if defined(INCLUDE_FROM_SI_CLASS_HOST_C)
diff --git a/LUFA/Drivers/USB/HighLevel/StdDescriptors.h b/LUFA/Drivers/USB/HighLevel/StdDescriptors.h index 286294424..9b46c0936 100644 --- a/LUFA/Drivers/USB/HighLevel/StdDescriptors.h +++ b/LUFA/Drivers/USB/HighLevel/StdDescriptors.h @@ -82,12 +82,12 @@ #endif
/** Macro to calculate the power value for the device descriptor, from a given number of milliamps. */
- #define USB_CONFIG_POWER_MA(mA) (mA >> 1)
+ #define USB_CONFIG_POWER_MA(mA) ((mA) >> 1)
/** Macro to calculate the Unicode length of a string with a given number of Unicode characters.
* Should be used in string descriptor's headers for giving the string descriptor's byte length.
*/
- #define USB_STRING_LEN(str) (sizeof(USB_Descriptor_Header_t) + (str << 1))
+ #define USB_STRING_LEN(str) (sizeof(USB_Descriptor_Header_t) + ((str) << 1))
/** Macro to encode a given four digit floating point version number (e.g. 01.23) into Binary Coded
* Decimal format for descriptor fields requiring BCD encoding, such as the USB version number in the
@@ -593,10 +593,10 @@ /* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */
- #define VERSION_TENS(x) (int)(x / 10)
- #define VERSION_ONES(x) (int)(x - (10 * VERSION_TENS(x)))
- #define VERSION_TENTHS(x) (int)((x - (int)x) * 10)
- #define VERSION_HUNDREDTHS(x) (int)(((x - (int)x) * 100) - (10 * VERSION_TENTHS(x)))
+ #define VERSION_TENS(x) (int)((x) / 10)
+ #define VERSION_ONES(x) (int)((x) - (10 * VERSION_TENS(x)))
+ #define VERSION_TENTHS(x) (int)(((x) - (int)(x)) * 10)
+ #define VERSION_HUNDREDTHS(x) (int)((((x) - (int)(x)) * 100) - (10 * VERSION_TENTHS(x)))
#endif
/* Disable C linkage for C++ Compilers: */
diff --git a/LUFA/Drivers/USB/HighLevel/USBTask.h b/LUFA/Drivers/USB/HighLevel/USBTask.h index cc0601548..4c9b717a4 100644 --- a/LUFA/Drivers/USB/HighLevel/USBTask.h +++ b/LUFA/Drivers/USB/HighLevel/USBTask.h @@ -175,7 +175,9 @@ #endif
/* Macros: */
- #define HOST_TASK_NONBLOCK_WAIT(duration, nextstate) MACROS{USB_HostState = HOST_STATE_WaitForDevice; WaitMSRemaining = duration; PostWaitState = nextstate; }MACROE
+ #define HOST_TASK_NONBLOCK_WAIT(duration, nextstate) MACROS{ USB_HostState = HOST_STATE_WaitForDevice; \
+ WaitMSRemaining = (duration); \
+ PostWaitState = (nextstate); }MACROE
#endif
/* Disable C linkage for C++ Compilers: */
diff --git a/LUFA/Drivers/USB/LowLevel/Endpoint.h b/LUFA/Drivers/USB/LowLevel/Endpoint.h index b9122e408..eb09a0ddb 100644 --- a/LUFA/Drivers/USB/LowLevel/Endpoint.h +++ b/LUFA/Drivers/USB/LowLevel/Endpoint.h @@ -353,7 +353,7 @@ #if !defined(CONTROL_ONLY_DEVICE)
#define Endpoint_SelectEndpoint(epnum) MACROS{ UENUM = (epnum); }MACROE
#else
- #define Endpoint_SelectEndpoint(epnum) (void)epnum
+ #define Endpoint_SelectEndpoint(epnum) (void)(epnum)
#endif
#define Endpoint_ResetFIFO(epnum) MACROS{ UERST = (1 << (epnum)); UERST = 0; }MACROE
diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index 1fdd96626..f7af9a1e9 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -53,6 +53,9 @@ * - Fixed HID Parser not distributing the Usage Min and Usage Max values across an array of report items
* - Fixed Mass Storage Host Class driver and Low Level demo not clearing the error condition if an attached device returns a
* STALL to a GET MAX LUN request (thanks to Martin Luxen)
+ * - Fixed TeensyHID bootloader not properly shutting down the USB interface to trigger a disconnection on the host before resetting
+ * - Fixed MassStorageHost Class driver demo not having USB_STREAM_TIMEOUT_MS compile time option set properly to prevent slow
+ * devices from timing out the data pipes
*
* \section Sec_ChangeLog091122 Version 091122
*
diff --git a/LUFA/ManPages/FutureChanges.txt b/LUFA/ManPages/FutureChanges.txt index 987ce3d37..3267afc73 100644 --- a/LUFA/ManPages/FutureChanges.txt +++ b/LUFA/ManPages/FutureChanges.txt @@ -26,7 +26,11 @@ * -# Write LUFA tutorials
* - Demos/Projects
* -# Multiple-Report HID device
- * -# Device/Host bridge
+ * -# Device/Host USB bridge
+ * -# Finish BluetoothHost demo
+ * -# Finish MIDI class Bootloader
+ * -# Finish SideShow demo
+ * -# Finish StandaloneProgrammer project
* - Ports
* -# AVR32 UC3B series microcontrollers
* -# Atmel ARM7 series microcontrollers
|