Replace blind interface descriptor search in the incomplete AndroidAccessoryHost demo with an intelligent search for the correct interface in the device matching the correct class/subclass/protocol values.
This commit is contained in:
parent
d9c16402b9
commit
55aadf97d5
2 changed files with 43 additions and 10 deletions
|
@ -42,6 +42,10 @@
|
|||
/* Macros: */
|
||||
#define ANDROID_DATA_IN_PIPE 1
|
||||
#define ANDROID_DATA_OUT_PIPE 2
|
||||
|
||||
#define ANDROID_INTERFACE_CLASS 0xFF
|
||||
#define ANDROID_INTERFACE_SUBCLASS 0x42
|
||||
#define ANDROID_INTERFACE_PROTOCOL 0x01
|
||||
|
||||
/* Enums: */
|
||||
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
|
||||
|
@ -57,6 +61,7 @@
|
|||
/* Function Prototypes: */
|
||||
uint8_t ProcessConfigurationDescriptor(void);
|
||||
|
||||
uint8_t DCOMP_NextAndroidAccessoryInterface(void* const CurrentDescriptor);
|
||||
uint8_t DCOMP_NextInterfaceBulkEndpoint(void* CurrentDescriptor);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue