Convert the LowLevel AndroidAccessory demo to use the new class driver constants to reduce code duplication.
Add missing Doxygen documentation.
This commit is contained in:
		
							parent
							
								
									8b5aa61601
								
							
						
					
					
						commit
						7f8dbb4908
					
				
					 9 changed files with 21 additions and 48 deletions
				
			
		| 
						 | 
				
			
			@ -64,8 +64,13 @@
 | 
			
		|||
		#endif
 | 
			
		||||
 | 
			
		||||
	/* Macros: */
 | 
			
		||||
		/** Vendor ID value in a Device Descriptor to indicate an Android device. */
 | 
			
		||||
		#define ANDROID_VENDOR_ID                   0x18D1
 | 
			
		||||
 | 
			
		||||
		/** Product ID value in a Device Descriptor to indicate an Android device in Open Accessory mode. */
 | 
			
		||||
		#define ANDROID_ACCESSORY_PRODUCT_ID        0x2D00
 | 
			
		||||
 | 
			
		||||
		/** Product ID value in a Device Descriptor to indicate an Android device in Open Accessory and Android Debug mode. */
 | 
			
		||||
		#define ANDROID_ACCESSORY_ADB_PRODUCT_ID    0x2D01
 | 
			
		||||
 | 
			
		||||
	/* Enums: */
 | 
			
		||||
| 
						 | 
				
			
			@ -111,7 +116,7 @@
 | 
			
		|||
		/** Enum for the possible Android Open Accessory protocol versions. */
 | 
			
		||||
		enum AOA_Protocols_t
 | 
			
		||||
		{
 | 
			
		||||
			AOA_PROTOCOL_Accessory          = 0x0001, /**< Android Open Accessory version 1. */
 | 
			
		||||
			AOA_PROTOCOL_AccessoryV1        = 0x0001, /**< Android Open Accessory version 1. */
 | 
			
		||||
		};
 | 
			
		||||
 | 
			
		||||
	/* Disable C linkage for C++ Compilers: */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -194,7 +194,7 @@ uint8_t AOA_Host_StartAccessoryMode(USB_ClassInfo_AOA_Host_t* const AOAInterface
 | 
			
		|||
	if ((ErrorCode = AOA_Host_GetAccessoryProtocol(&AccessoryProtocol)) != HOST_WAITERROR_Successful)
 | 
			
		||||
	  return ErrorCode;
 | 
			
		||||
 | 
			
		||||
	if (AccessoryProtocol != CPU_TO_LE16(AOA_PROTOCOL_Accessory))
 | 
			
		||||
	if (AccessoryProtocol != CPU_TO_LE16(AOA_PROTOCOL_AccessoryV1))
 | 
			
		||||
	  return AOA_ERROR_LOGICAL_CMD_FAILED;
 | 
			
		||||
 | 
			
		||||
	for (uint8_t PropertyIndex = 0; PropertyIndex < AOA_STRING_TOTAL_STRINGS; PropertyIndex++)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -87,7 +87,7 @@
 | 
			
		|||
 *
 | 
			
		||||
 *  <table>
 | 
			
		||||
 *  <tr>
 | 
			
		||||
 *   <th width="100px">USB Class</th>
 | 
			
		||||
 *   <th width="200px">USB Class</th>
 | 
			
		||||
 *   <th width="90px">Device Mode</th>
 | 
			
		||||
 *   <th width="90px">Host Mode</th>
 | 
			
		||||
 *  </tr>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue