2013-01-08 22:40:58 +08:00
|
|
|
/*
|
2021-03-08 18:19:04 +08:00
|
|
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
2013-01-08 22:40:58 +08:00
|
|
|
*
|
2018-10-14 19:37:18 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2013-01-08 22:40:58 +08:00
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2011-12-12 Yi Qiu first version
|
|
|
|
*/
|
|
|
|
|
2020-04-11 16:06:32 +08:00
|
|
|
#ifndef __ADK_H__
|
|
|
|
#define __ADK_H__
|
2013-01-08 22:40:58 +08:00
|
|
|
|
|
|
|
#include <rtthread.h>
|
|
|
|
|
|
|
|
struct uadkinst
|
|
|
|
{
|
|
|
|
upipe_t pipe_in;
|
|
|
|
upipe_t pipe_out;
|
|
|
|
|
|
|
|
struct rt_device device;
|
2021-03-08 18:19:04 +08:00
|
|
|
};
|
2014-03-04 08:59:53 +08:00
|
|
|
typedef struct uadkinst* uadk_t;
|
2013-01-08 22:40:58 +08:00
|
|
|
|
|
|
|
#define USB_ACCESSORY_VENDOR_ID 0x18D1
|
|
|
|
#define USB_ACCESSORY_PRODUCT_ID 0x2D00
|
|
|
|
#define USB_ACCESSORY_ADB_PRODUCT_ID 0x2D01
|
|
|
|
|
|
|
|
#define ACCESSORY_STRING_MANUFACTURER 0
|
|
|
|
#define ACCESSORY_STRING_MODEL 1
|
|
|
|
#define ACCESSORY_STRING_DESCRIPTION 2
|
|
|
|
#define ACCESSORY_STRING_VERSION 3
|
|
|
|
#define ACCESSORY_STRING_URI 4
|
|
|
|
#define ACCESSORY_STRING_SERIAL 5
|
|
|
|
|
|
|
|
#define USB_REQ_GET_PROTOCOL 51
|
|
|
|
#define USB_REQ_SEND_STRING 52
|
|
|
|
#define USB_REQ_START 53
|
|
|
|
|
|
|
|
#define USB_CLASS_ADK 0xff
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|