diff options
Diffstat (limited to 'LUFA')
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/Audio.c | 4 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/Audio.h | 3 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/CDC.c | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/CDC.h | 3 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/HID.c | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/HID.h | 3 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/MIDI.c | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/MIDI.h | 3 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/MassStorage.c | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/MassStorage.h | 3 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/RNDIS.c | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/RNDIS.h | 3 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/CDC.c | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/HID.c | 2 | ||||
-rw-r--r-- | LUFA/ManPages/ChangeLog.txt | 2 | ||||
-rw-r--r-- | LUFA/ManPages/DirectorySummaries.txt | 2 | ||||
-rw-r--r-- | LUFA/ManPages/MigrationInformation.txt | 2 |
17 files changed, 26 insertions, 16 deletions
diff --git a/LUFA/Drivers/USB/Class/Device/Audio.c b/LUFA/Drivers/USB/Class/Device/Audio.c index 116921e6e..b018d6686 100644 --- a/LUFA/Drivers/USB/Class/Device/Audio.c +++ b/LUFA/Drivers/USB/Class/Device/Audio.c @@ -59,6 +59,8 @@ void Audio_Device_ProcessControlPacket(USB_ClassInfo_Audio_Device_t* const Audio bool Audio_Device_ConfigureEndpoints(USB_ClassInfo_Audio_Device_t* AudioInterfaceInfo)
{
+ memset(&AudioInterfaceInfo->State, 0x00, sizeof(AudioInterfaceInfo->State));
+
if (AudioInterfaceInfo->Config.DataINEndpointNumber)
{
if (!(Endpoint_ConfigureEndpoint(AudioInterfaceInfo->Config.DataINEndpointNumber, EP_TYPE_ISOCHRONOUS,
@@ -78,7 +80,7 @@ bool Audio_Device_ConfigureEndpoints(USB_ClassInfo_Audio_Device_t* AudioInterfac return false;
}
}
-
+
return true;
}
diff --git a/LUFA/Drivers/USB/Class/Device/Audio.h b/LUFA/Drivers/USB/Class/Device/Audio.h index 767f75451..eef7f9049 100644 --- a/LUFA/Drivers/USB/Class/Device/Audio.h +++ b/LUFA/Drivers/USB/Class/Device/Audio.h @@ -91,8 +91,7 @@ * of the Audio Streaming interface.
*/
} State; /**< State data for the USB class interface within the device. All elements in this section
- * <b>may</b> be set to initial values, but may also be ignored to default to sane values when
- * the interface is enumerated.
+ * are reset to their defaults when the interface is enumerated.
*/
} USB_ClassInfo_Audio_Device_t;
diff --git a/LUFA/Drivers/USB/Class/Device/CDC.c b/LUFA/Drivers/USB/Class/Device/CDC.c index 237e1dd2f..0359afe4d 100644 --- a/LUFA/Drivers/USB/Class/Device/CDC.c +++ b/LUFA/Drivers/USB/Class/Device/CDC.c @@ -87,6 +87,8 @@ void CDC_Device_ProcessControlPacket(USB_ClassInfo_CDC_Device_t* CDCInterfaceInf bool CDC_Device_ConfigureEndpoints(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo)
{
+ memset(&CDCInterfaceInfo->State, 0x00, sizeof(CDCInterfaceInfo->State));
+
if (!(Endpoint_ConfigureEndpoint(CDCInterfaceInfo->Config.DataINEndpointNumber, EP_TYPE_BULK,
ENDPOINT_DIR_IN, CDCInterfaceInfo->Config.DataINEndpointSize,
ENDPOINT_BANK_SINGLE)))
diff --git a/LUFA/Drivers/USB/Class/Device/CDC.h b/LUFA/Drivers/USB/Class/Device/CDC.h index 17e9b35d7..2a8f1ecd8 100644 --- a/LUFA/Drivers/USB/Class/Device/CDC.h +++ b/LUFA/Drivers/USB/Class/Device/CDC.h @@ -102,8 +102,7 @@ uint8_t DataBits; /**< Bits of data per character of the virtual serial port */
} LineEncoding;
} State; /**< State data for the USB class interface within the device. All elements in this section
- * <b>may</b> be set to initial values, but may also be ignored to default to sane values when
- * the interface is enumerated.
+ * are reset to their defaults when the interface is enumerated.
*/
} USB_ClassInfo_CDC_Device_t;
diff --git a/LUFA/Drivers/USB/Class/Device/HID.c b/LUFA/Drivers/USB/Class/Device/HID.c index f292c633e..43f11ee7c 100644 --- a/LUFA/Drivers/USB/Class/Device/HID.c +++ b/LUFA/Drivers/USB/Class/Device/HID.c @@ -135,6 +135,8 @@ void HID_Device_ProcessControlPacket(USB_ClassInfo_HID_Device_t* const HIDInterf bool HID_Device_ConfigureEndpoints(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo)
{
+ memset(&HIDInterfaceInfo->State, 0x00, sizeof(HIDInterfaceInfo->State));
+ HIDInterfaceInfo->State.IdleCount = 500;
HIDInterfaceInfo->State.UsingReportProtocol = true;
if (!(Endpoint_ConfigureEndpoint(HIDInterfaceInfo->Config.ReportINEndpointNumber, EP_TYPE_INTERRUPT,
diff --git a/LUFA/Drivers/USB/Class/Device/HID.h b/LUFA/Drivers/USB/Class/Device/HID.h index e4a919ded..87f96c680 100644 --- a/LUFA/Drivers/USB/Class/Device/HID.h +++ b/LUFA/Drivers/USB/Class/Device/HID.h @@ -83,8 +83,7 @@ uint16_t IdleMSRemaining; /**< Total number of ms remaining before the idle period elapsed - this should be
* decremented by the user application if non-zero each millisecond */
} State; /**< State data for the USB class interface within the device. All elements in this section
- * <b>may</b> be set to initial values, but may also be ignored to default to sane values when
- * the interface is enumerated.
+ * are reset to their defaults when the interface is enumerated.
*/
} USB_ClassInfo_HID_Device_t;
diff --git a/LUFA/Drivers/USB/Class/Device/MIDI.c b/LUFA/Drivers/USB/Class/Device/MIDI.c index 364327595..ed3aaa723 100644 --- a/LUFA/Drivers/USB/Class/Device/MIDI.c +++ b/LUFA/Drivers/USB/Class/Device/MIDI.c @@ -40,6 +40,8 @@ void MIDI_Device_ProcessControlPacket(USB_ClassInfo_MIDI_Device_t* const MIDIInt bool MIDI_Device_ConfigureEndpoints(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo)
{
+ memset(&MIDIInterfaceInfo->State, 0x00, sizeof(MIDIInterfaceInfo->State));
+
if (MIDIInterfaceInfo->Config.DataINEndpointNumber)
{
if (!(Endpoint_ConfigureEndpoint(MIDIInterfaceInfo->Config.DataINEndpointNumber, EP_TYPE_BULK,
diff --git a/LUFA/Drivers/USB/Class/Device/MIDI.h b/LUFA/Drivers/USB/Class/Device/MIDI.h index 66330a1d4..980ddc5bf 100644 --- a/LUFA/Drivers/USB/Class/Device/MIDI.h +++ b/LUFA/Drivers/USB/Class/Device/MIDI.h @@ -80,8 +80,7 @@ {
// No state information for this class yet
} State; /**< State data for the USB class interface within the device. All elements in this section
- * <b>may</b> be set to initial values, but may also be ignored to default to sane values when
- * the interface is enumerated.
+ * are reset to their defaults when the interface is enumerated.
*/
} USB_ClassInfo_MIDI_Device_t;
diff --git a/LUFA/Drivers/USB/Class/Device/MassStorage.c b/LUFA/Drivers/USB/Class/Device/MassStorage.c index 9f8688c1d..6160641bf 100644 --- a/LUFA/Drivers/USB/Class/Device/MassStorage.c +++ b/LUFA/Drivers/USB/Class/Device/MassStorage.c @@ -74,6 +74,8 @@ void MS_Device_ProcessControlPacket(USB_ClassInfo_MS_Device_t* const MSInterface bool MS_Device_ConfigureEndpoints(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
{
+ memset(&MSInterfaceInfo->State, 0x00, sizeof(MSInterfaceInfo->State));
+
if (!(Endpoint_ConfigureEndpoint(MSInterfaceInfo->Config.DataINEndpointNumber, EP_TYPE_BULK,
ENDPOINT_DIR_IN, MSInterfaceInfo->Config.DataINEndpointSize,
ENDPOINT_BANK_SINGLE)))
diff --git a/LUFA/Drivers/USB/Class/Device/MassStorage.h b/LUFA/Drivers/USB/Class/Device/MassStorage.h index 22f7160b5..cd7a8ef1d 100644 --- a/LUFA/Drivers/USB/Class/Device/MassStorage.h +++ b/LUFA/Drivers/USB/Class/Device/MassStorage.h @@ -89,8 +89,7 @@ * and that all current Mass Storage operations should immediately abort
*/
} State; /**< State data for the USB class interface within the device. All elements in this section
- * <b>may</b> be set to initial values, but may also be ignored to default to sane values when
- * the interface is enumerated.
+ * are reset to their defaults when the interface is enumerated.
*/
} USB_ClassInfo_MS_Device_t;
diff --git a/LUFA/Drivers/USB/Class/Device/RNDIS.c b/LUFA/Drivers/USB/Class/Device/RNDIS.c index 37771c646..8131d8757 100644 --- a/LUFA/Drivers/USB/Class/Device/RNDIS.c +++ b/LUFA/Drivers/USB/Class/Device/RNDIS.c @@ -112,6 +112,8 @@ void RNDIS_Device_ProcessControlPacket(USB_ClassInfo_RNDIS_Device_t* const RNDIS bool RNDIS_Device_ConfigureEndpoints(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo)
{
+ memset(&RNDISInterfaceInfo->State, 0x00, sizeof(RNDISInterfaceInfo->State));
+
if (!(Endpoint_ConfigureEndpoint(RNDISInterfaceInfo->Config.DataINEndpointNumber, EP_TYPE_BULK,
ENDPOINT_DIR_IN, RNDISInterfaceInfo->Config.DataINEndpointSize,
ENDPOINT_BANK_SINGLE)))
diff --git a/LUFA/Drivers/USB/Class/Device/RNDIS.h b/LUFA/Drivers/USB/Class/Device/RNDIS.h index 2aaf261d6..8855aac17 100644 --- a/LUFA/Drivers/USB/Class/Device/RNDIS.h +++ b/LUFA/Drivers/USB/Class/Device/RNDIS.h @@ -97,8 +97,7 @@ * user application
*/
} State; /**< State data for the USB class interface within the device. All elements in this section
- * <b>may</b> be set to initial values, but may also be ignored to default to sane values when
- * the interface is enumerated.
+ * are reset to their defaults when the interface is enumerated.
*/
} USB_ClassInfo_RNDIS_Device_t;
diff --git a/LUFA/Drivers/USB/Class/Host/CDC.c b/LUFA/Drivers/USB/Class/Host/CDC.c index 4402f3386..9c59b5c2d 100644 --- a/LUFA/Drivers/USB/Class/Host/CDC.c +++ b/LUFA/Drivers/USB/Class/Host/CDC.c @@ -39,6 +39,8 @@ uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* CDCInterfaceInfo, uint {
uint8_t FoundEndpoints = 0;
+ memset(&CDCInterfaceInfo->State, 0x00, sizeof(CDCInterfaceInfo->State));
+
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
return CDC_ENUMERROR_InvalidConfigDescriptor;
diff --git a/LUFA/Drivers/USB/Class/Host/HID.c b/LUFA/Drivers/USB/Class/Host/HID.c index 8639b4836..6652cdcbe 100644 --- a/LUFA/Drivers/USB/Class/Host/HID.c +++ b/LUFA/Drivers/USB/Class/Host/HID.c @@ -39,6 +39,8 @@ uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* HIDInterfaceInfo, uint {
uint8_t FoundEndpoints = 0;
+ memset(&HIDInterfaceInfo->State, 0x00, sizeof(HIDInterfaceInfo->State));
+
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
return HID_ENUMERROR_InvalidConfigDescriptor;
diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index f96168f37..ff34ff2ed 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -62,7 +62,7 @@ * to only unfreeze and check one data pipe at a time) to prevent incorrect device enumerations and freezes while trasferring data
* - Make Pipe_ConfigurePipe() mask the given endpoint number against PIPE_EPNUM_MASK to ensure the endpoint IN direction bit is
* cleared to prevent endpoint type corruption
- * - Fix documentation mentioning Pipe_GetCurrentToken() function when real name is Pipe_GetPipeToken()
+ * - Fixed documentation mentioning Pipe_GetCurrentToken() function when correct function name is Pipe_GetPipeToken()
* - Fixed ADC driver for the ATMEGA32U4 and ATMEGA16U4 (thanks to Opendous Inc.)
* - Fixed CDCHost demo unfreezing the pipes at the point of configuration, rather than use
* - Fixed MassStorage demo not clearing the reset flag when a Mass Storage Reset is issued while not processing a command
diff --git a/LUFA/ManPages/DirectorySummaries.txt b/LUFA/ManPages/DirectorySummaries.txt index 3b2c15fca..c6691d7d8 100644 --- a/LUFA/ManPages/DirectorySummaries.txt +++ b/LUFA/ManPages/DirectorySummaries.txt @@ -33,7 +33,7 @@ *
* This folder contains drivers for several of the AVR internal peripherals such as the USART, compatible only with
* the AT90USBXXX6, AT90USBXXX7 and ATMEGAXXU4 USB AVR models, such as the AT90USB1287. Its contents should <b>not</b> be
- * included by the user application - the dispatch header file located in the parent AT90USBXXX directory should be used
+ * included by the user application - the dispatch header file located in the parent directory should be used
* instead.
*
* \dir LUFA/Drivers/USB
diff --git a/LUFA/ManPages/MigrationInformation.txt b/LUFA/ManPages/MigrationInformation.txt index 5ea8d9c16..be84c36b8 100644 --- a/LUFA/ManPages/MigrationInformation.txt +++ b/LUFA/ManPages/MigrationInformation.txt @@ -35,7 +35,7 @@ * - The \ref CALLBACK_USB_GetDescriptor() function now takes an extra parameter to specify the descriptor's memory space so that
* descriptors in mixed memory spaces can be used. The previous functionality can be returned by defining the USE_FLASH_DESCRIPTORS
* token in the project makefile to fix all descriptors into FLASH space and remove the extra function parameter.
- * - Removed USB_IsSuspended - test \ref USB_DeviceState against \ref DEVICE_STATE_Suspended instead.
+ * - The USB_IsSuspended global has been removed - test \ref USB_DeviceState against \ref DEVICE_STATE_Suspended instead.
*
*
* \section Sec_Migration090605 Migrating from 090510 to 090605
|