From dee4bc097309b289d0ba5995edc6a140529e153a Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Mon, 27 Jun 2011 05:57:25 +0000 Subject: [PATCH] Fix logic bug in the incomplete Android Accessory Host demo preventing correct detection of an attached Android Accessory Mode device. --- .../Incomplete/AndroidAccessoryHost/AndroidAccessoryHost.c | 2 ++ Demos/Host/Incomplete/AndroidAccessoryHost/DeviceDescriptor.c | 3 ++- LUFA/ManPages/ChangeLog.txt | 3 ++- LUFA/ManPages/FutureChanges.txt | 1 + LUFA/ManPages/LUFAPoweredProjects.txt | 3 +++ 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Demos/Host/Incomplete/AndroidAccessoryHost/AndroidAccessoryHost.c b/Demos/Host/Incomplete/AndroidAccessoryHost/AndroidAccessoryHost.c index 69202f7cd0..9b5ffbea6b 100644 --- a/Demos/Host/Incomplete/AndroidAccessoryHost/AndroidAccessoryHost.c +++ b/Demos/Host/Incomplete/AndroidAccessoryHost/AndroidAccessoryHost.c @@ -191,6 +191,8 @@ void Android_Host_Task(void) /* Send the control request for the Android device to switch to accessory mode */ Pipe_SelectPipe(PIPE_CONTROLPIPE); USB_Host_SendControlRequest(NULL); + + puts_P(PSTR("Switching to Accessory Mode.\r\n")); /* Wait until USB device disconnected */ USB_HostState = HOST_STATE_WaitForDeviceRemoval; diff --git a/Demos/Host/Incomplete/AndroidAccessoryHost/DeviceDescriptor.c b/Demos/Host/Incomplete/AndroidAccessoryHost/DeviceDescriptor.c index 4e5a1d4d68..360dfad30c 100644 --- a/Demos/Host/Incomplete/AndroidAccessoryHost/DeviceDescriptor.c +++ b/Demos/Host/Incomplete/AndroidAccessoryHost/DeviceDescriptor.c @@ -59,7 +59,8 @@ uint8_t ProcessDeviceDescriptor(void) if (DeviceDescriptor.VendorID != ANDROID_VENDOR_ID) return IncorrectAndroidDevice; - if ((DeviceDescriptor.ProductID != ANDROID_ACCESSORY_PRODUCT_ID) || + /* Check the product ID to determine if the Android device is in accessory mode */ + if ((DeviceDescriptor.ProductID != ANDROID_ACCESSORY_PRODUCT_ID) && (DeviceDescriptor.ProductID != ANDROID_ACCESSORY_ADB_PRODUCT_ID)) { return NonAccessoryModeAndroidDevice; diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index c7c11d9b77..394fd59012 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -29,6 +29,7 @@ * - Added new AudioOutputHost Host ClassDriver demo * - Added new AudioInputHost Host LowLevel demo * - Added new AudioOutputHost Host LowLevel demo + * - Added new "checksource" target to all library project makefiles * * Changed: * - Core: @@ -136,7 +137,7 @@ * - Fixed incorrect definition of the HID_KEYBOARD_SC_D constant in the HID class driver (thanks to Opendous Inc.) * - Fixed incorrect definition of the HID_KEYBOARD_SC_RIGHT_ARROW constant in the HID class driver (thanks to Joby Taffey) * - Fixed incorrect endpoint initialisation order in the several device demos (thanks to Rick Drolet) - * - Fixed inverted Minimum board LEDs + * - Fixed inverted Minimus board LEDs * - Fixed incorrect byte ordering in the Audio_Device_WriteSample24 function (thanks to WZab) * - Fixed several functions in the Host mode Still Image Class driver returning an error code from the incorrect * error code enum (thanks to Daniel Seibert) diff --git a/LUFA/ManPages/FutureChanges.txt b/LUFA/ManPages/FutureChanges.txt index b2cbf0b335..938503923e 100644 --- a/LUFA/ManPages/FutureChanges.txt +++ b/LUFA/ManPages/FutureChanges.txt @@ -23,6 +23,7 @@ * -# Add a LUFA_YIELD macro for integration into a third-party RTOS * -# Abstract out Mass Storage byte send/receive to prevent low level API use in projects * -# Consider switch from endpoint numbers to full endpoint addresses to ease future architecture expansion + * -# Fix HID report parser usage support for array types * - Documentation/Support * -# Add detailed overviews of how each demo works * -# Add board overviews diff --git a/LUFA/ManPages/LUFAPoweredProjects.txt b/LUFA/ManPages/LUFAPoweredProjects.txt index 0792d7b89f..33c4c80cdb 100644 --- a/LUFA/ManPages/LUFAPoweredProjects.txt +++ b/LUFA/ManPages/LUFAPoweredProjects.txt @@ -41,6 +41,8 @@ * - Bicycle POV: http://www.code.google.com/p/bicycleledpov/ * - Bus Ninja, an AVR clone of the popular BusPirate project: http://blog.hodgepig.org/busninja/ * - CAMTRIG, a remote Camera Trigger device: http://code.astraw.com/projects/motmot/camtrig + * - Collection of alternative Arduino Uno firmwares: http://hunt.net.nz/users/darran/ + * - Dashkey, a custom PC keyboard controller: http://geekhack.org/showwiki.php?title=Island:19096 * - CD Driver Emulator Dongle for ISO Files: http://cdemu.blogspot.com/ * - ClockTamer, a configurable clock generator: http://code.google.com/p/clock-tamer/ * - CULFW, a 868MHz RF packet encoder/decoder: http://www.koeniglich.de/culfw/culfw.html @@ -80,6 +82,7 @@ * - SD Card reader: http://elasticsheep.com/2010/04/teensy2-usb-mass-storage-with-an-sd-card/ * - SEGA Megadrive/Genesis Development Cartridge: http://www.makestuff.eu/wordpress/?page_id=398 * - Serial Line bus analyser: http://www.pjrc.com/teensy/projects/SerialAnalyzer.html + * - SmartportVHD Apple II Mass Storage adapter: http://pcedric3.free.fr/SmartportVHD/ * - Stripe Snoop, a Magnetic Card reader: http://www.ossguy.com/ss_usb/ * - Teensy SD Card .WAV file player: http://elasticsheep.com/2010/04/teensy2-usb-wav-player-part-1/ * - Touchscreen Input Device: http://capnstech.blogspot.com/2010/07/touchscreen-update.html