参数资料
型号: DM240415
厂商: Microchip Technology
文件页数: 21/63页
文件大小: 0K
描述: ACCESSORY DEVELOPMENT START KIT
设计资源: PIC24F ADK Schematic
特色产品: DM240415 Android? Accessory Starter Kit
标准包装: 1
主要目的: 参考设计,平板式
嵌入式: 是,MCU,16 位
已用 IC / 零件: PIC24F
主要属性: 机器人 OS,附件开发平台,兼容 Arduino
次要属性: 免版税,免软件库许可费
已供物品: 电路板,适配器,调试程序,电源,软件
Microchip's Accessory Framework for Android(tm)
16
#define
#define
#define
#define
#define
USB_SUPPORT_BULK_TRANSFERS
USB_NUM_INTERRUPT_NAKS 3
USB_INITIAL_VBUS_CURRENT (100/2)
USB_INSERT_TIME (250+1)
USB_HOST_APP_EVENT_HANDLER USB_ApplicationEventHandler
#define USBTasks()
{
USBHostTasks();
AndroidTasks();
}
#define USBInitialize(x)
{
USBHostInit(x);
}
For more information about the usb_config.h file, please refer to the MCHPFSUSB stack help file.
4.2.1.4 usb_config.c
The usb_config.c file is only required for those working with the source code implementation of the library. This file is not
used in the pre-compiled version of the library.
There are two main sections to the usb_config.c file. The first is the Targeted Peripheral List (TPL). The TPL is defied by the
USB OTG specification as the list of devices that are allowed to enumerate on the device. The TPL is just an array of
USB_TPL objects that specify the devices that can be attached. There are two ways that these devices are entered into the
table. They are either entered as Class/Subclass/Protocol pairs (CL/SC/P). The second method is by Vendor ID (VID) and
Product ID (PID) pairs. This will allow a specific device, not device type, to enumerate.
There are two entries that are needed for Android devices. Since each Android device may appear different to the host
controller, there isn't an easy way to add support for a given Class/Subclass/Protocol pair since each Android device might
expose different USB interface types. Likewise, since there isn't a list of all VID/PIDs for Android devices, and this
implementation isn't future-proof, you can use the normal VID/PID entry either. For cases like these Microchip has
implemented the VID/PID combination of 0xFFFF/0xFFFF to indicate that this driver should enumerate every device
regardless of its interfaces or its actual VID/PID pair.
The other entry in the table is the entry for the Android device once it has actually entered accessory mode. This can be
either entered using the CL/SC/P of the Accessory interface or the magic VID/PID combinations specified by Google Inc.
The magic VID/PID combination method is probably the preferred method (seen below):
// *****************************************************************************
// USB Embedded Host Targeted Peripheral List (TPL)
// *****************************************************************************
USB_TPL usbTPL[] =
{
/*[1] Device identification information
[2] Initial USB configuration to use
[3] Client driver table entry
[4] Flags (HNP supported, client driver entry, SetConfiguration() commands allowed
---------------------------------------------------------------------
[1] [2][3] [4]
---------------------------------------------------------------------*/
{ INIT_VID_PID( 0x18D1ul, 0x2D00ul ), 0, 0, {0} }, // Android accessory
{ INIT_VID_PID( 0x18D1ul, 0x2D01ul ), 0, 0, {0} }, // Android accessory
{ INIT_VID_PID( 0xFFFFul, 0xFFFFul ), 0, 0, {0} }, // Enumerates everything
};
All of the entries that correspond to the Android accessory device should point to the entry in the Client Driver table the
corresponds to the Android drivers. In the above example all three entries point to the client driver entry 0 (as noted by entry
[3] set to 0). The client driver table needs register the functions used by each driver. The functions that need to be registered
are the Initialization function, the event handler, the data event handler (if implemented), and the initialization flags value
(see example below).
// *****************************************************************************
16
4
相关PDF资料
PDF描述
DM300004-2 BOARD DEMO DSPICDEM.NET 2
DM300014 BOARD DEMO DSPICDEM 1.1 GEN PURP
DM300016 BOARD DEMO DSPICDEM STARTER
DM300017 BOARD DEMO DSPICDEM STARTER
DM300020 BOARD DEV DSPICDEM MC1 MOTORCTRL
相关代理商/技术参数
参数描述
DM2410-0AL1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Optoelectronic
DM2410-0BL1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Optoelectronic
DM2410-0CL1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Optoelectronic
DM2410-0DL1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Optoelectronic
DM2410-0GL1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Optoelectronic