projects
/
pub
/
lufa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
5c0c032
)
Added new ENDPOINT_*_BusSuspended error code to the Endpoint function, so that the...
author
Dean Camera
<dean@fourwalledcubicle.com>
Mon, 3 May 2010 07:41:22 +0000
(07:41 +0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Mon, 3 May 2010 07:41:22 +0000
(07:41 +0000)
LUFA/Drivers/USB/LowLevel/Endpoint.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/LowLevel/Endpoint.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c
patch
|
blob
|
blame
|
history
LUFA/ManPages/ChangeLog.txt
patch
|
blob
|
blame
|
history
LUFA/ManPages/FutureChanges.txt
patch
|
blob
|
blame
|
history
LUFA/ManPages/LUFAPoweredProjects.txt
patch
|
blob
|
blame
|
history
Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
patch
|
blob
|
blame
|
history
README.txt
patch
|
blob
|
blame
|
history
diff --git
a/LUFA/Drivers/USB/LowLevel/Endpoint.c
b/LUFA/Drivers/USB/LowLevel/Endpoint.c
index
81fef1c
..
5560c80
100644
(file)
--- a/
LUFA/Drivers/USB/LowLevel/Endpoint.c
+++ b/
LUFA/Drivers/USB/LowLevel/Endpoint.c
@@
-120,6
+120,8
@@
uint8_t Endpoint_WaitUntilReady(void)
\r
if (USB_DeviceState == DEVICE_STATE_Unattached)
\r
return ENDPOINT_READYWAIT_DeviceDisconnected;
\r
\r
if (USB_DeviceState == DEVICE_STATE_Unattached)
\r
return ENDPOINT_READYWAIT_DeviceDisconnected;
\r
+ else if (USB_DeviceState == DEVICE_STATE_Suspended)
\r
+ return ENDPOINT_READYWAIT_BusSuspended;
\r
else if (Endpoint_IsStalled())
\r
return ENDPOINT_READYWAIT_EndpointStalled;
\r
\r
else if (Endpoint_IsStalled())
\r
return ENDPOINT_READYWAIT_EndpointStalled;
\r
\r
diff --git
a/LUFA/Drivers/USB/LowLevel/Endpoint.h
b/LUFA/Drivers/USB/LowLevel/Endpoint.h
index
b18ff45
..
93412f5
100644
(file)
--- a/
LUFA/Drivers/USB/LowLevel/Endpoint.h
+++ b/
LUFA/Drivers/USB/LowLevel/Endpoint.h
@@
-442,8
+442,12
@@
*/
\r
ENDPOINT_READYWAIT_DeviceDisconnected = 2, /**< Device was disconnected from the host while
\r
* waiting for the endpoint to become ready.
\r
*/
\r
ENDPOINT_READYWAIT_DeviceDisconnected = 2, /**< Device was disconnected from the host while
\r
* waiting for the endpoint to become ready.
\r
- */
\r
- ENDPOINT_READYWAIT_Timeout = 3, /**< The host failed to accept or send the next packet
\r
+ */
\r
+ ENDPOINT_READYWAIT_BusSuspended = 3, /**< The USB bus has been suspended by the host and
\r
+ * no USB endpoint traffic can occur until the bus
\r
+ * has resumed.
\r
+ */
\r
+ ENDPOINT_READYWAIT_Timeout = 4, /**< The host failed to accept or send the next packet
\r
* within the software timeout period set by the
\r
* \ref USB_STREAM_TIMEOUT_MS macro.
\r
*/
\r
* within the software timeout period set by the
\r
* \ref USB_STREAM_TIMEOUT_MS macro.
\r
*/
\r
@@
-462,11
+466,15
@@
ENDPOINT_RWSTREAM_DeviceDisconnected = 2, /**< Device was disconnected from the host during
\r
* the transfer.
\r
*/
\r
ENDPOINT_RWSTREAM_DeviceDisconnected = 2, /**< Device was disconnected from the host during
\r
* the transfer.
\r
*/
\r
- ENDPOINT_RWSTREAM_Timeout = 3, /**< The host failed to accept or send the next packet
\r
+ ENDPOINT_RWSTREAM_BusSuspended = 3, /**< The USB bus has been suspended by the host and
\r
+ * no USB endpoint traffic can occur until the bus
\r
+ * has resumed.
\r
+ */
\r
+ ENDPOINT_RWSTREAM_Timeout = 4, /**< The host failed to accept or send the next packet
\r
* within the software timeout period set by the
\r
* \ref USB_STREAM_TIMEOUT_MS macro.
\r
*/
\r
* within the software timeout period set by the
\r
* \ref USB_STREAM_TIMEOUT_MS macro.
\r
*/
\r
- ENDPOINT_RWSTREAM_CallbackAborted =
4
, /**< Indicates that the stream's callback function
\r
+ ENDPOINT_RWSTREAM_CallbackAborted =
5
, /**< Indicates that the stream's callback function
\r
* aborted the transfer early.
\r
*/
\r
};
\r
* aborted the transfer early.
\r
*/
\r
};
\r
@@
-482,6
+490,10
@@
ENDPOINT_RWCSTREAM_DeviceDisconnected = 2, /**< Device was disconnected from the host during
\r
* the transfer.
\r
*/
\r
ENDPOINT_RWCSTREAM_DeviceDisconnected = 2, /**< Device was disconnected from the host during
\r
* the transfer.
\r
*/
\r
+ ENDPOINT_RWCSTREAM_BusSuspended = 3, /**< The USB bus has been suspended by the host and
\r
+ * no USB endpoint traffic can occur until the bus
\r
+ * has resumed.
\r
+ */
\r
};
\r
\r
/* Inline Functions: */
\r
};
\r
\r
/* Inline Functions: */
\r
diff --git
a/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c
b/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c
index
6948296
..
92b5396
100644
(file)
--- a/
LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c
+++ b/
LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c
@@
-12,6
+12,8
@@
uint8_t TEMPLATE_FUNC_NAME (void* Buffer, uint16_t Length)
\r
if (USB_DeviceState == DEVICE_STATE_Unattached)
\r
return ENDPOINT_RWCSTREAM_DeviceDisconnected;
\r
\r
if (USB_DeviceState == DEVICE_STATE_Unattached)
\r
return ENDPOINT_RWCSTREAM_DeviceDisconnected;
\r
+ else if (USB_DeviceState == DEVICE_STATE_Suspended)
\r
+ return ENDPOINT_RWCSTREAM_BusSuspended;
\r
\r
if (Endpoint_IsOUTReceived())
\r
{
\r
\r
if (Endpoint_IsOUTReceived())
\r
{
\r
@@
-29,6
+31,8
@@
uint8_t TEMPLATE_FUNC_NAME (void* Buffer, uint16_t Length)
{
\r
if (USB_DeviceState == DEVICE_STATE_Unattached)
\r
return ENDPOINT_RWCSTREAM_DeviceDisconnected;
\r
{
\r
if (USB_DeviceState == DEVICE_STATE_Unattached)
\r
return ENDPOINT_RWCSTREAM_DeviceDisconnected;
\r
+ else if (USB_DeviceState == DEVICE_STATE_Suspended)
\r
+ return ENDPOINT_RWCSTREAM_BusSuspended;
\r
}
\r
\r
return ENDPOINT_RWCSTREAM_NoError;
\r
}
\r
\r
return ENDPOINT_RWCSTREAM_NoError;
\r
diff --git
a/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c
b/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c
index
7868060
..
8a5be11
100644
(file)
--- a/
LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c
+++ b/
LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c
@@
-18,6
+18,8
@@
uint8_t TEMPLATE_FUNC_NAME (const void* Buffer, uint16_t Length)
\r
if (USB_DeviceState == DEVICE_STATE_Unattached)
\r
return ENDPOINT_RWCSTREAM_DeviceDisconnected;
\r
\r
if (USB_DeviceState == DEVICE_STATE_Unattached)
\r
return ENDPOINT_RWCSTREAM_DeviceDisconnected;
\r
+ else if (USB_DeviceState == DEVICE_STATE_Suspended)
\r
+ return ENDPOINT_RWCSTREAM_BusSuspended;
\r
\r
if (Endpoint_IsINReady())
\r
{
\r
\r
if (Endpoint_IsINReady())
\r
{
\r
@@
-38,7
+40,9
@@
uint8_t TEMPLATE_FUNC_NAME (const void* Buffer, uint16_t Length)
while (!(Endpoint_IsOUTReceived()))
\r
{
\r
if (USB_DeviceState == DEVICE_STATE_Unattached)
\r
while (!(Endpoint_IsOUTReceived()))
\r
{
\r
if (USB_DeviceState == DEVICE_STATE_Unattached)
\r
- return ENDPOINT_RWCSTREAM_DeviceDisconnected;
\r
+ return ENDPOINT_RWCSTREAM_DeviceDisconnected;
\r
+ else if (USB_DeviceState == DEVICE_STATE_Suspended)
\r
+ return ENDPOINT_RWCSTREAM_BusSuspended;
\r
}
\r
\r
return ENDPOINT_RWCSTREAM_NoError;
\r
}
\r
\r
return ENDPOINT_RWCSTREAM_NoError;
\r
diff --git
a/LUFA/ManPages/ChangeLog.txt
b/LUFA/ManPages/ChangeLog.txt
index
81e7189
..
8d5a7ab
100644
(file)
--- a/
LUFA/ManPages/ChangeLog.txt
+++ b/
LUFA/ManPages/ChangeLog.txt
@@
-13,6
+13,8
@@
* - Added new Relay Controller Board project (thanks to OBinou)
\r
* - Added board hardware driver support for the Teensy, USBTINY MKII, Benito and JM-DB-U2 lines of third party USB AVR boards
\r
* - Added new ATTR_NO_INIT variable attribute for global variables that should not be automatically cleared on startup
\r
* - Added new Relay Controller Board project (thanks to OBinou)
\r
* - Added board hardware driver support for the Teensy, USBTINY MKII, Benito and JM-DB-U2 lines of third party USB AVR boards
\r
* - Added new ATTR_NO_INIT variable attribute for global variables that should not be automatically cleared on startup
\r
+ * - Added new ENDPOINT_*_BusSuspended error code to the Endpoint function, so that the stream functions early-abort if the bus
\r
+ * is suspended before or during a transfer
\r
*
\r
* <b>Changed:</b>
\r
* - AVRISP programmer project now has a more robust timeout system, allowing for an increase of the software USART speed
\r
*
\r
* <b>Changed:</b>
\r
* - AVRISP programmer project now has a more robust timeout system, allowing for an increase of the software USART speed
\r
@@
-32,7
+34,7
@@
* for them to be enabled (thanks to Andrei Krainev)
\r
* - The Audio_Device_IsSampleReceived() and Audio_Device_IsReadyForNextSample() functions are now inline, to reduce overhead
\r
* - Removed the cast to uint16_t on the set baud rate in the USBtoSerial project, so that the higher >1M baud rates can be
\r
* for them to be enabled (thanks to Andrei Krainev)
\r
* - The Audio_Device_IsSampleReceived() and Audio_Device_IsReadyForNextSample() functions are now inline, to reduce overhead
\r
* - Removed the cast to uint16_t on the set baud rate in the USBtoSerial project, so that the higher >1M baud rates can be
\r
- * selected (thanks to Steffan)
\r
+ * selected (thanks to Steffan
Woltjer
)
\r
*
\r
* <b>Fixed:</b>
\r
* - Fixed software PDI/TPI programming mode in the AVRISP project not correctly toggling just the clock pin
\r
*
\r
* <b>Fixed:</b>
\r
* - Fixed software PDI/TPI programming mode in the AVRISP project not correctly toggling just the clock pin
\r
diff --git
a/LUFA/ManPages/FutureChanges.txt
b/LUFA/ManPages/FutureChanges.txt
index
b0e31e8
..
04a5fc6
100644
(file)
--- a/
LUFA/ManPages/FutureChanges.txt
+++ b/
LUFA/ManPages/FutureChanges.txt
@@
-30,7
+30,6
@@
* -# Alternative (USB-IF endorsed) USB-CDC Ethernet Class
\r
* -# USB Test and Measurement Class
\r
* -# Finish BluetoothHost demo
\r
* -# Alternative (USB-IF endorsed) USB-CDC Ethernet Class
\r
* -# USB Test and Measurement Class
\r
* -# Finish BluetoothHost demo
\r
- * -# Finish MIDI class Bootloader
\r
* -# Finish SideShow demo
\r
* -# Finish StandaloneProgrammer project
\r
* -# Finish MIDIToneGenerator project
\r
* -# Finish SideShow demo
\r
* -# Finish StandaloneProgrammer project
\r
* -# Finish MIDIToneGenerator project
\r
diff --git
a/LUFA/ManPages/LUFAPoweredProjects.txt
b/LUFA/ManPages/LUFAPoweredProjects.txt
index
75c2d6a
..
41a41ae
100644
(file)
--- a/
LUFA/ManPages/LUFAPoweredProjects.txt
+++ b/
LUFA/ManPages/LUFAPoweredProjects.txt
@@
-40,6
+40,7
@@
* - CAMTRIG, a remote Camera Trigger device: http://code.astraw.com/projects/motmot/camtrig
\r
* - CD Driver Emulator Dongle for ISO Files: http://cdemu.blogspot.com/
\r
* - ClockTamer, a configurable clock generator: http://code.google.com/p/clock-tamer/
\r
* - CAMTRIG, a remote Camera Trigger device: http://code.astraw.com/projects/motmot/camtrig
\r
* - CD Driver Emulator Dongle for ISO Files: http://cdemu.blogspot.com/
\r
* - ClockTamer, a configurable clock generator: http://code.google.com/p/clock-tamer/
\r
+ * - EMUCOMBOX, a USB-RS422 adapter for E-Mu Emax samplers: http://users.skynet.be/emxp/EMUCOMBOX.htm
\r
* - "Fingerlicking Wingdinger" (WARNING: Bad Language if no Javascript), a MIDI controller: http://noisybox.net/electronics/wingdinger/
\r
* - Garmin GPS USB to NMEA standard serial sentence translator: http://github.com/nall/garmin-transmogrifier/tree/master
\r
* - Generic HID Device Creator: http://generichid.sourceforge.net/
\r
* - "Fingerlicking Wingdinger" (WARNING: Bad Language if no Javascript), a MIDI controller: http://noisybox.net/electronics/wingdinger/
\r
* - Garmin GPS USB to NMEA standard serial sentence translator: http://github.com/nall/garmin-transmogrifier/tree/master
\r
* - Generic HID Device Creator: http://generichid.sourceforge.net/
\r
diff --git
a/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
b/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
index
6adb24f
..
e2c6fd6
100644
(file)
--- a/
Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
+++ b/
Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
@@
-165,9
+165,9
@@
void XPROGTarget_EnableTargetPDI(void)
BITBANG_PDIDATA_DDR |= BITBANG_PDIDATA_MASK;
\r
BITBANG_PDICLOCK_DDR |= BITBANG_PDICLOCK_MASK;
\r
\r
BITBANG_PDIDATA_DDR |= BITBANG_PDIDATA_MASK;
\r
BITBANG_PDICLOCK_DDR |= BITBANG_PDICLOCK_MASK;
\r
\r
- /* Set DATA line low for at least
90n
s to ensure that the device is ready for PDI mode to be entered */
\r
+ /* Set DATA line low for at least
1m
s to ensure that the device is ready for PDI mode to be entered */
\r
BITBANG_PDIDATA_PORT &= ~BITBANG_PDIDATA_MASK;
\r
BITBANG_PDIDATA_PORT &= ~BITBANG_PDIDATA_MASK;
\r
- _delay_
u
s(1);
\r
+ _delay_
m
s(1);
\r
\r
/* Set DATA line high for at least 90ns to disable /RESET functionality */
\r
BITBANG_PDIDATA_PORT |= BITBANG_PDIDATA_MASK;
\r
\r
/* Set DATA line high for at least 90ns to disable /RESET functionality */
\r
BITBANG_PDIDATA_PORT |= BITBANG_PDIDATA_MASK;
\r
diff --git
a/README.txt
b/README.txt
index
f5dab3e
..
a77b862
100644
(file)
--- a/
README.txt
+++ b/
README.txt
@@
-10,7
+10,7
@@
http://www.fourwalledcubicle.com/LUFA.php
\r
=========================================
\r
\r
http://www.fourwalledcubicle.com/LUFA.php
\r
=========================================
\r
\r
- LUFA
IS DONATION SUPPORTED
. To support LUFA,
\r
+ LUFA
is donation supported
. To support LUFA,
\r
please donate at http://www.fourwalledcubicle.com.
\r
\r
For Commercial Licensing information, see
\r
please donate at http://www.fourwalledcubicle.com.
\r
\r
For Commercial Licensing information, see
\r