From e071f3897a0946c6be1e1b5e1f78eda8dcbf6fc7 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Tue, 21 Jul 2009 13:31:21 +0000 Subject: Added new USB_DeviceState variable to keep track of the current Device mode USB state. Added new Endpoint_ClearStatusStage() convenience function to assist with the status stages of control transfers. Removed vague USB_IsConnected global - test USB_DeviceState or USB_HostState explicitly to gain previous functionality. Removed USB_IsSuspended global - test USB_DeviceState against DEVICE_STATE_Suspended instead. Fixed possible enumeration errors from spinloops which may fail to exit if the USB connection is severed before the exit condition becomes true. --- LUFA/ManPages/ChangeLog.txt | 6 ++++++ LUFA/ManPages/CompileTimeTokens.txt | 2 +- LUFA/ManPages/MigrationInformation.txt | 8 +++++++- 3 files changed, 14 insertions(+), 2 deletions(-) (limited to 'LUFA/ManPages') diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index 0c51940ed..b2500b0c4 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -29,6 +29,8 @@ * - Added new USE_FLASH_DESCRIPTORS and TOTAL_NUM_CONFIGURATIONS compile time options * - Added support for the new ATMEGA32U2, ATMEGA16U2 and ATMEGA8U2 AVR models * - Added new PrinterHost demo (thanks to John Andrews) + * - Added new USB_DeviceState variable to keep track of the current Device mode USB state + * - Added new Endpoint_ClearStatusStage() convenience function to assist with the status stages of control transfers * * Changed: * - Deprecated psuedo-scheduler and removed dynamic memory allocator from the library (first no longer needed and second unused) @@ -47,6 +49,8 @@ * descriptor is located can be specified. This means that descriptors can now be located in multiple memory spaces within a device. * - Host mode demos now use sane terminal escape codes, so that text is always readable and events/program output is visually distinguished * from oneanother using foreground colours + * - Removed vague USB_IsConnected global - test USB_DeviceState or USB_HostState explicitly to gain previous functionality + * - Removed USB_IsSuspended global - test USB_DeviceState against DEVICE_STATE_Suspended instead * * Fixed: * - Changed bootloaders to use FLASHEND rather than the existence of RAMPZ to determine if far FLASH pointers are needed to fix @@ -91,6 +95,8 @@ * LUFA/Drivers/USB/Class/ directory to LUFA/Drivers/USB/HighLevel/ in preperation for the new USB class APIs * - Moved out each demos' functionality library files (e.g. Ring Buffer library) to /Lib directories for a better directory structure * - Removed Tx interrupt from the USBtoSerial demo; now sends characters via polling to ensure more time for the Rx interrupt + * - Fixed possible enumeration errors from spinloops which may fail to exit if the USB connection is severed before the exit condition + * becomes true * * * \section Sec_ChangeLog090510 Version 090510 diff --git a/LUFA/ManPages/CompileTimeTokens.txt b/LUFA/ManPages/CompileTimeTokens.txt index 2d9ec7a95..f11dff2e1 100644 --- a/LUFA/ManPages/CompileTimeTokens.txt +++ b/LUFA/ManPages/CompileTimeTokens.txt @@ -157,7 +157,7 @@ * On the smaller USB AVRs, the USB controller lacks VBUS events to determine the physical connection state of the USB bus to a host. In lieu of * VBUS events, the library attempts to determine the connection state via the bus suspension and wake up events instead. This however may be * slightly inaccurate due to the possibility of the host suspending the bus while the device is still connected. If accurate connection status is - * required, the VBUS line of the USB connector should be routed to an AVR pin to detect its level, so that the USB_IsConnected global + * required, the VBUS line of the USB connector should be routed to an AVR pin to detect its level, so that the USB_DeviceState global * can be accurately set and the USB_Connect and USB_Disconnect events manually raised by the RAISE_EVENT macro. When defined, this token disables * the library's auto-detection of the connection state by the aforementioned suspension and wake up events. * diff --git a/LUFA/ManPages/MigrationInformation.txt b/LUFA/ManPages/MigrationInformation.txt index 945406d61..5ea8d9c16 100644 --- a/LUFA/ManPages/MigrationInformation.txt +++ b/LUFA/ManPages/MigrationInformation.txt @@ -19,17 +19,23 @@ * - The "Dynamic Memory Block Allocator" has been removed, as it was unused in (and unrelated to) the LUFA library and never * used in user applications. The library is available from the author's website for those wishing to still use it in their * applications. + * - The USB_IsConnected global has been removed, as it is too vague for general use. Test \ref USB_DeviceState or \ref USB_HostState + * explicitly to ensure the device is in the desired state instead. * * Host Mode * - The HIDParser.c module has moved from LUFA/Drivers/USB/Class/ to LUFA/Drivers/USB/Class/Host/. - * - The USB_GetDeviceConfigDescriptor() function now requires the desired configuration index within the device as its first + * - The \ref USB_GetDeviceConfigDescriptor() function now requires the desired configuration index within the device as its first * parameter, to add support for multi-configuration devices. Existing code should use a configuration index of 1 to indicate the * first configuration descriptor within the device. + * - The non-standard "Ready" host state has been removed. Existing \ref HOST_STATE_Configured code should be moved to the end of + * the existing \ref HOST_STATE_Addressed state, and the existing HOST_STATE_Ready state code should be moved to the \ref HOST_STATE_Configured + * state. * * Device Mode * - 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. * * * \section Sec_Migration090605 Migrating from 090510 to 090605 -- cgit v1.2.3