mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-16 12:51:47 +00:00
Update Android Accessory Class driver to be compatible with protocol version 2 devices.
This commit is contained in:
parent
39603f05b2
commit
0223c3668c
@ -8,16 +8,18 @@
|
|||||||
*
|
*
|
||||||
* \section Sec_ChangeLogXXXXXX Version XXXXXX
|
* \section Sec_ChangeLogXXXXXX Version XXXXXX
|
||||||
* <b>New:</b>
|
* <b>New:</b>
|
||||||
* - Library Applications:
|
* - Core:
|
||||||
* - Added new Printer class bootloader
|
|
||||||
* - Added new Mass Storage class bootloader
|
|
||||||
* - Added additional MIDI command definitions to the MIDI class driver (thanks to Daniel Dreibrodt)
|
* - Added additional MIDI command definitions to the MIDI class driver (thanks to Daniel Dreibrodt)
|
||||||
* - Added new CONCAT() and CONCAT_EXPANDED() convenience macros
|
* - Added new CONCAT() and CONCAT_EXPANDED() convenience macros
|
||||||
* - Added new Printer Device Class driver
|
* - Added new Printer Device Class driver
|
||||||
|
* - Library Applications:
|
||||||
|
* - Added new Printer class bootloader
|
||||||
|
* - Added new Mass Storage class bootloader
|
||||||
*
|
*
|
||||||
* <b>Changed:</b>
|
* <b>Changed:</b>
|
||||||
* - Core:
|
* - Core:
|
||||||
* - Updated the BUILD build system module to produce binary BIN files in addition to Intel HEX files
|
* - Updated the BUILD build system module to produce binary BIN files in addition to Intel HEX files
|
||||||
|
* - Updated the Android Accessory Class to accept version 2 protocol devices (with version 1 functionality)
|
||||||
*
|
*
|
||||||
* <b>Fixed:</b>
|
* <b>Fixed:</b>
|
||||||
* - Core:
|
* - Core:
|
||||||
|
@ -114,6 +114,7 @@
|
|||||||
enum AOA_Protocols_t
|
enum AOA_Protocols_t
|
||||||
{
|
{
|
||||||
AOA_PROTOCOL_AccessoryV1 = 0x0001, /**< Android Open Accessory version 1. */
|
AOA_PROTOCOL_AccessoryV1 = 0x0001, /**< Android Open Accessory version 1. */
|
||||||
|
AOA_PROTOCOL_AccessoryV2 = 0x0002, /**< Android Open Accessory version 2. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Disable C linkage for C++ Compilers: */
|
/* Disable C linkage for C++ Compilers: */
|
||||||
|
@ -167,7 +167,7 @@ uint8_t AOA_Host_StartAccessoryMode(USB_ClassInfo_AOA_Host_t* const AOAInterface
|
|||||||
if ((ErrorCode = AOA_Host_GetAccessoryProtocol(&AccessoryProtocol)) != HOST_WAITERROR_Successful)
|
if ((ErrorCode = AOA_Host_GetAccessoryProtocol(&AccessoryProtocol)) != HOST_WAITERROR_Successful)
|
||||||
return ErrorCode;
|
return ErrorCode;
|
||||||
|
|
||||||
if (AccessoryProtocol != CPU_TO_LE16(AOA_PROTOCOL_AccessoryV1))
|
if ((AccessoryProtocol != CPU_TO_LE16(AOA_PROTOCOL_AccessoryV1)) && (AccessoryProtocol != CPU_TO_LE16(AOA_PROTOCOL_AccessoryV2)))
|
||||||
return AOA_ERROR_LOGICAL_CMD_FAILED;
|
return AOA_ERROR_LOGICAL_CMD_FAILED;
|
||||||
|
|
||||||
for (uint8_t PropertyIndex = 0; PropertyIndex < AOA_STRING_TOTAL_STRINGS; PropertyIndex++)
|
for (uint8_t PropertyIndex = 0; PropertyIndex < AOA_STRING_TOTAL_STRINGS; PropertyIndex++)
|
||||||
|
Loading…
Reference in New Issue
Block a user