Stellaris-USB-CDC-Host-Example
所属分类:处理器开发
开发工具:C/C++
文件大小:366KB
下载次数:63
上传日期:2012-08-27 19:29:30
上 传 者:
psamperl
说明: This example application demonstrates using a USB
Communications Device Class for hosting a FTDI FT232R device.
I m using FTDIs UB232R development module:
http://apple.clickandbuild.com/cnb/shop/ftdichip?op=catalogue-products-null&prodCategoryID=58&title=UB232R
Which has this FTDI chip:
http://www.ftdichip.com/Products/ICs/FT232R.htm
It has USB_CLASS_VEND_SPECIFIC (0xff) Interface Class.
Other CDC drivers could also be added to this example in the future (ACM, Prolific,...).
文件列表:
Stellaris USB CDC Host Example (0, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare (0, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards (0, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96 (0, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc (0, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm (0, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Exe (0, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Exe\usb_host_cdc.bin (16620, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Exe\usb_host_cdc.out (301184, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Exe\usb_host_cdc.sim (16663, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Exe\usb_host_msc.bin (21756, 2012-01-25)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Exe\usb_host_msc.out (291448, 2012-01-25)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Exe\usb_host_msc.sim (22579, 2012-01-25)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\List (0, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\List\usb_host_cdc.map (30616, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\List\usb_host_msc.map (33568, 2012-01-25)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj (0, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj\cmdline.o (6024, 2012-01-10)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj\cmdline.pbi (935, 2012-01-10)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj\fat_usbmsc.o (14908, 2012-01-10)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj\fat_usbmsc.pbi (975, 2012-01-10)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj\ff.o (99572, 2012-01-10)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj\ff.pbi (957, 2012-01-10)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj\kitronix320x240x16_ssd2119_8bit.pbi (1023, 2012-01-10)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj\Pipe.o (11384, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj\Pipe.pbi (841, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj\set_pinout.o (28644, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj\set_pinout.pbi (843, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj\startup_ewarm.o (8760, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj\startup_ewarm.pbi (859, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj\touch.pbi (971, 2012-01-10)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj\uartstdio.o (44508, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj\uartstdio.pbi (799, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj\usb_host_cdc.o (30760, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj\usb_host_cdc.pbd (529, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj\usb_host_cdc.pbi (857, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj\usb_host_msc.o (32088, 2012-01-25)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj\usb_host_msc.pbd (667, 2012-01-25)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj\ustdlib.o (29864, 2012-01-26)
Stellaris USB CDC Host Example\StellarisWare\boards\dk-lm3s9b96\usb_host_cdc\ewarm\Obj\ustdlib.pbi (795, 2012-01-26)
... ...
This example application demonstrates using a USB
Communications Device Class for hosting a FTDI FT232R device.
I'm using FTDIs UB232R development module:
http://apple.clickandbuild.com/cnb/shop/ftdichip?op=catalogue-products-null&prodCategoryID=58&title=UB232R
Which has this FTDI chip:
http://www.ftdichip.com/Products/ICs/FT232R.htm
It has USB_CLASS_VEND_SPECIFIC (0xff) Interface Class.
Other CDC drivers could also be added to this example in the future (ACM, Prolific,...).
Howto:
Copy files to StellarisWare folder
Add usb_host_cdc project to workspace
Add usbhcdc.c and usbhcdcftdi.c to usblib project.
Recompile usblib.
Upload to target.
After device is enumerated it sends FTDI baudrate control transfer.
Baudrate is set to 115200.
When FTDI is connected to USB OTG it will send out "usb_host_cdc echo example" string.
When device is ready everything FTDI receives on RX is send to TX (echo).
FT232R device info:
Device Descriptor:
bcdUSB: 0x0200
bDeviceClass: 0x00
bDeviceSubClass: 0x00
bDeviceProtocol: 0x00
bMaxPacketSize0: 0x08 (8)
idVendor: 0x0403 (Future Technology Devices International Limited)
idProduct: 0x6001
bcdDevice: 0x0600
iManufacturer: 0x01
0x0409: "FTDI"
iProduct: 0x02
0x0409: "MCTEST C"
0x0409: "MCTEST C"
iSerialNumber: 0x03
0x0409: "FTPBG74H"
bNumConfigurations: 0x01
ConnectionStatus: DeviceConnected
Current Config Value: 0x01
Device Bus Speed: Full
Device Address: 0x01
Open Pipes: 2
Endpoint Descriptor:
bEndpointAddress: 0x81 IN
Transfer Type: Bulk
wMaxPacketSize: 0x0040 (***)
bInterval: 0x00
Endpoint Descriptor:
bEndpointAddress: 0x02 OUT
Transfer Type: Bulk
wMaxPacketSize: 0x0040 (***)
bInterval: 0x00
Configuration Descriptor:
wTotalLength: 0x0020
bNumInterfaces: 0x01
bConfigurationValue: 0x01
iConfiguration: 0x00
bmAttributes: 0xA0 (Bus Powered Remote Wakeup)
MaxPower: 0x2D (90 Ma)
Interface Descriptor:
bInterfaceNumber: 0x00
bAlternateSetting: 0x00
bNumEndpoints: 0x02
bInterfaceClass: 0xFF
bInterfaceSubClass: 0xFF
bInterfaceProtocol: 0xFF
iInterface: 0x02
0x0409: "MCTEST C"
0x0409: "MCTEST C"
Endpoint Descriptor:
bEndpointAddress: 0x81 IN
Transfer Type: Bulk
wMaxPacketSize: 0x0040 (***)
bInterval: 0x00
Endpoint Descriptor:
bEndpointAddress: 0x02 OUT
Transfer Type: Bulk
wMaxPacketSize: 0x0040 (***)
bInterval: 0x00
近期下载者:
相关文件:
收藏者: