3 Copyright (C) Dean Camera, 2012.
\r
5 dean [at] fourwalledcubicle [dot] com
\r
10 Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com)
\r
12 Permission to use, copy, modify, distribute, and sell this
\r
13 software and its documentation for any purpose is hereby granted
\r
14 without fee, provided that the above copyright notice appear in
\r
15 all copies and that both that the copyright notice and this
\r
16 permission notice and warranty disclaimer appear in supporting
\r
17 documentation, and that the name of the author not be used in
\r
18 advertising or publicity pertaining to distribution of the
\r
19 software without specific, written prior permission.
\r
21 The author disclaim all warranties with regard to this
\r
22 software, including all implied warranties of merchantability
\r
23 and fitness. In no event shall the author be liable for any
\r
24 special, indirect or consequential damages or any damages
\r
25 whatsoever resulting from loss of use, data or profits, whether
\r
26 in an action of contract, negligence or other tortious action,
\r
27 arising out of or in connection with the use or performance of
\r
32 * \brief Common definitions and declarations for the library USB Android Open Accessory Class driver.
\r
34 * Common definitions and declarations for the library USB Android Open Accessory Class driver.
\r
36 * \note This file should not be included directly. It is automatically included as needed by the USB module driver
\r
37 * dispatch header located in LUFA/Drivers/USB.h.
\r
40 /** \ingroup Group_USBClassAOA
\r
41 * \defgroup Group_USBClassAOACommon Common Class Definitions
\r
43 * \section Sec_ModDescription Module Description
\r
44 * Constants, Types and Enum definitions that are common to both Device and Host modes for the USB
\r
45 * Android Open Accessory Class.
\r
50 #ifndef _AOA_CLASS_COMMON_H_
\r
51 #define _AOA_CLASS_COMMON_H_
\r
54 #include "../../Core/StdDescriptors.h"
\r
56 /* Enable C linkage for C++ Compilers: */
\r
57 #if defined(__cplusplus)
\r
61 /* Preprocessor Checks: */
\r
62 #if !defined(__INCLUDE_FROM_AOA_DRIVER)
\r
63 #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
\r
67 /** Product ID value in a Device Descriptor to indicate an Android device in Open Accessory mode. */
\r
68 #define ANDROID_ACCESSORY_PRODUCT_ID 0x2D00
\r
70 /** Product ID value in a Device Descriptor to indicate an Android device in Open Accessory and Android Debug mode. */
\r
71 #define ANDROID_ACCESSORY_ADB_PRODUCT_ID 0x2D01
\r
74 /** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the
\r
75 * Android Open Accessory class.
\r
77 enum AOA_Descriptor_ClassSubclassProtocol_t
\r
79 AOA_CSCP_AOADataClass = 0xFF, /**< Descriptor Class value indicating that the device or interface
\r
80 * belongs to the AOA data class.
\r
82 AOA_CSCP_AOADataSubclass = 0xFF, /**< Descriptor Subclass value indicating that the device or interface
\r
83 * belongs to AOA data subclass.
\r
85 AOA_CSCP_AOADataProtocol = 0x00, /**< Descriptor Protocol value indicating that the device or interface
\r
86 * belongs to the AOA data class protocol.
\r
90 /** Enum for the Android Open Accessory class specific control requests that can be issued by the USB bus host. */
\r
91 enum AOA_ClassRequests_t
\r
93 AOA_REQ_GetAccessoryProtocol = 0x33, /**< Android Open Accessory control request to retrieve the device's supported Accessory Protocol version. */
\r
94 AOA_REQ_SendString = 0x34, /**< Android Open Accessory control request to set an accessory property string in the device. */
\r
95 AOA_REQ_StartAccessoryMode = 0x35, /**< Android Open Accessory control request to switch the device into Accessory mode. */
\r
98 /** Enum for the possible Android Open Accessory property string indexes. */
\r
101 AOA_STRING_Manufacturer = 0, /**< Index of the Manufacturer property string. */
\r
102 AOA_STRING_Model = 1, /**< Index of the Model Name property string. */
\r
103 AOA_STRING_Description = 2, /**< Index of the Description property string. */
\r
104 AOA_STRING_Version = 3, /**< Index of the Version Number property string. */
\r
105 AOA_STRING_URI = 4, /**< Index of the URI Information property string. */
\r
106 AOA_STRING_Serial = 5, /**< Index of the Serial Number property string. */
\r
108 #if !defined(__DOXYGEN__)
\r
109 AOA_STRING_TOTAL_STRINGS
\r
113 /** Enum for the possible Android Open Accessory protocol versions. */
\r
114 enum AOA_Protocols_t
\r
116 AOA_PROTOCOL_AccessoryV1 = 0x0001, /**< Android Open Accessory version 1. */
\r
119 /* Disable C linkage for C++ Compilers: */
\r
120 #if defined(__cplusplus)
\r