Commit dee4bc09 authored by Dean Camera's avatar Dean Camera
Browse files

Fix logic bug in the incomplete Android Accessory Host demo preventing correct...

Fix logic bug in the incomplete Android Accessory Host demo preventing correct detection of an attached Android Accessory Mode device.
parent 84ddf237
......@@ -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;
......
......@@ -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;
......
......@@ -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
*
* <b>Changed:</b>
* - 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)
......
......@@ -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
......
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment