亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? cdc acm readme.html

?? USB CDC using C8051F320/340, virtual COM port thru usb connection
?? HTML
字號:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>	<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />	<title>CDC ACM ReadMe</title></head><body><b>USB CDC (Communication Device Class) implementation for 'F32x and 'F34x</b><br><br>Posted to: http://www.cygnal.org/ubb/Forum9/HTML/000945.html<br><br>USB_CDC_skeleton_15.zip<br><br>History<br>&nbsp; &nbsp; v1.0 (July 19, 2006)<br>&nbsp; &nbsp; &nbsp; &nbsp; Initial release<br>&nbsp; &nbsp; v1.1 (July 21, 2006)<br>&nbsp; &nbsp; &nbsp; &nbsp; Added support for 'F34x<br>&nbsp; &nbsp; &nbsp; &nbsp; Renamed the project and file names, not to include 'F32x_'<br>&nbsp; &nbsp; &nbsp; &nbsp; Delete Low-speed support<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Actually, low-speed is achieved using interrupt endpoints instead of bulk.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; But it is out of spec for CDC ACM.<br>&nbsp; &nbsp; &nbsp; &nbsp; The temporary buffer in line coding handling was moved<br>&nbsp; &nbsp; &nbsp; &nbsp; from unused USB FIFO to IDATA, for 'F34x compatibility<br>&nbsp; &nbsp; v1.2 (Aug 14, 2006)<br>&nbsp; &nbsp; &nbsp; &nbsp; Revised USB interrupt setting after USB bus reset.<br>&nbsp; &nbsp; &nbsp; &nbsp; Deleted 'reset data toggle' code in Set_Configuration, because it is done <br>&nbsp; &nbsp; &nbsp; &nbsp; by USB bus reset (from personal communication with SiLabs)<br>&nbsp; &nbsp; v1.3 (Aug 18, 2006)<br>&nbsp; &nbsp; &nbsp; &nbsp; Optimized setup stage handling in the device request handler.<br>&nbsp; &nbsp; &nbsp; &nbsp; This optimization reduces the code size about 150 bytes for Keil,<br>&nbsp; &nbsp; &nbsp; &nbsp; 230 bytes for SDCC<br>&nbsp; &nbsp; v1.4 (Sep 5, 2006)<br>&nbsp; &nbsp; &nbsp; &nbsp; Optimized class-specific request handling. As the check of interface number is common, <br>&nbsp; &nbsp; &nbsp; &nbsp; it is done before dispatcher.<br>&nbsp; &nbsp; &nbsp; &nbsp; Reviced Usb0_Init in USB_Main.c : enabled USB reset interrupt.<br>&nbsp; &nbsp; &nbsp; &nbsp; Reviced Set_Configuration in USB_Standard_Requests.c : recovered 'reset data toggle'<br>&nbsp; &nbsp; &nbsp; &nbsp; Reviced Usb_Suspend in USB_ISR.c, to match to the peripheral initialization in Port_Init.<br>&nbsp; &nbsp; &nbsp; &nbsp; Commented out USB Resume interrupt handling, It does nothing in this implementation.<br>&nbsp; &nbsp; &nbsp; &nbsp; Bug fix: F32x occasionally fails SET_LINE_CODING on high-speed hub.<br>&nbsp; &nbsp; &nbsp; &nbsp; This bug was fixed by deleting DATAEND of SUEND event handling in Handle_Setup (USB_ISR.c)<br>&nbsp; &nbsp; v1.5 (May 10, 2008)<br>&nbsp; &nbsp; &nbsp; &nbsp; Rewrote most of the source code to fit to composite device<br>&nbsp; &nbsp; &nbsp; &nbsp; Added ZLP to terminate the bulk IN transfer<br>&nbsp; &nbsp; &nbsp; &nbsp; Fixed bug of FIFO_Read_generic()<br>&nbsp; &nbsp; &nbsp; &nbsp; Revised the INF file to support Vista<br><br><br>Applying CDC ACM, the device is recognized as 'virtual' COM port using built-in device driver, in most of major OS including Windows, MacOS and Linux.<br><br>In this code, the USB side is fully implemented, but no UART is attached. Instead, support routines to connect peripherals to it are provided. The purpose of this implementation is to place a start point for further modification. For simple USB-serial conversion, I recommend you to use existing USB-serial chips.<br><br>The code is based on SiLabs USB_INT (release 1.3). Though the original comments by SiLabs are preserved to respect their work, this implementation has no relation to them. (I also have no relation to SiLabs ;)) Use it on your own risk as usual.<br><br>Thanks Patryk, your advices in <a href="http://www.cygnal.org/ubb/Forum9/HTML/000938.html">"Optimization of SiLabs USB examples in code size"</a> are fully reflected to this implementation. Also, thanks Maarten and Frieder, your suggestions in the topic, <a href="http://www.cygnal.org/ubb/Forum10/HTML/000025.html">"Help to convert sample code of USB_INT to compile under SDCC"</a> help me much on this implementation.<br><br>Tsuneo<br><br><br><b>Note</b><br><b>A) Compilation</b><br>This code was checked on SiLabs 'F320 and 'F340 dev board.<br>Select one of appropriate include file for the device in 'USB_CDC_Type.h'<br><br>#include &lt;c8051f320.h&gt;<br>//#include &lt;c8051f340.h&gt;<br><br>The code is compiled with Keil or SDCC. The conditional compilation on the code automatically detects the compiler. The work space files, 'Keil_USB_CDC_skeleton.wsp' and 'SDCC_USB_CDC_skeleton.wsp', are provided for SiLabs IDE.<br><br>SMALL memory model<br>Code size<br>&nbsp; &nbsp; &nbsp; Keil full version and 4K eval (SiLabs)<br>&nbsp; &nbsp; &nbsp; &nbsp; 3754 (F320 and F340) bytes<br>&nbsp; &nbsp; &nbsp; SDCC 2.6.0 #4290 (20060718-4290)<br>&nbsp; &nbsp; &nbsp; &nbsp; 4105 (F320 and F340) bytes<br><br><br>USB spec compliance was checked using <a href="http://www.usb.org/developers/tools/">USBCV R1.3 beta</a> on Chapter 9.<br><br>Unfortunately, 'F326/7 cannot be supported because these devices has only two EP other than EP0.<br><br><br><b>B) Installation</b><br>Download the code to 'F320DK and connect the board to an USB port of your PC. 'New Hardware' wizard asks you to locate an INF(.inf) file. Specify the 'CDC_ACM.inf' in the INF folder in the zip file.<br><br>When installed successfully, the device appears on your PC as a COM port.<br><br><b>C) Demonstration</b><br>This implementation simply echoes back the TX output of COM port to RX port. Using a terminal software, such as <a href="http://realterm.sourceforge.net/">RealTerm</a>, you can confirm it by keyboard and file transfer.<br><br>Following transfer speed was observed on loop back, simultaneous bi-direction transfer (WinXP SP2).<br><pre><font size="2">       SYSCLK  Speed (Kbytes/sec)<br>F320DK  24MHz  150 <br>F340DK  48MHz  280</font></pre><br>Though I didn't check about transfer speed of single direction transfer, it'll be much faster, from the record of bus analyzer.<br><br>LEDs and SWs on the 'F320DK are connected to RTS, DTR and CTS, DSR, respectively. But RTS and CTS don't work well because usbser.sys on Windows is weird as noted below.<br><br><b>D) Modification</b><br>VID/PID of this implementation was bought from <a href="http://www.voti.nl/shop/catalog.html?USB-PID-10">VOTI</a> to puslish it on the web. You can use this VID/PID in your lab, but get your own VID/PID when you distribute your products. VID/PID is defined in 'USB_Descriptor.h' and INF file.<br><br>TX and RX from PC over USB are attached to ring buffers respectively in 'USB_CDC_UART.c'.<br>The data received from PC is stored in TX buffer.<br>'bit TXReady' shows the TX buffer has any data<br>'UINT TXcount' holds the number of bytes on the TX buffer.<br>'BYTE COMGetByte(void)' retrieves a byte from the TX buffer, and decrements 'TXcount'<br><br>The data sent to PC is held in RX buffer.<br>'bit RXReady' shows that RX buffer has room to store another data<br>'UINT RXcount' holds the number of bytes on the RX buffer.<br>'void COMPutByte( BYTE )' put the data to RX buffer.<br><br>The size and memory space allocation for the TX and RX buffer are defined in 'USB_CDC_UART.h'.<br><br>In this implementation, these output and input of ring buffers are connected directly together in the main loop, 'USB_Main.c', for demonstration. In your modification, these main stream buffers will be connected to the input and output of your peripheral.<br><br>Ring buffer is easy to use, but its speed performance is not so good. To handle an IN transfer (device -> PC) of steady transfer rate, such as ADC, a double buffer is suitable. Also when the packet size of single transfer is always the same, a double buffer works better. You can find an example of double buffer in the topic <a href="http://www.cygnal.org/ubb/Forum9/HTML/000292.html">'256000 bytes/sec Isochronous transfer'</a> on this forum.<br><br>Other than these main data transfer path, you'll need to exchange 'trigger' and 'parameters' between the device and the PC.<br><br>In 'USB_CDC_UART.c',<br>- The COM port setting (baudrate, data bits, stop bits, parity) from PC is received in Set_Line_Coding(). <br>- DTR setting from PC is received in Set_Line_State().<br>- Break signaling from PC is received in Send_Break().<br>- DSR and other UART status (parity, frame error, etc.) are returned to PC in Update_Line_State().<br>See following 'COM session examples' how these functions on the firmware corresponds to the PC COM APIs.<br><br>These handshake signals and setting parameters are completely independent from the main data transfer path. ie. Even if you set the baudrate to either 9600 or 115200 on the PC, it has nothing to do with the transfer rate of the TX and RX. Therefore, these signals and setting parameters are used for 'command' from PC and 'reply' from the device.<br><br>Using or modifying these functions, you can connect any peripherals to PC COM port.<br><br>Turning macro POLL_READ_BYTE/POLL_WRITE_BYTE into functions saves about 310 bytes in Keil, 130bytes in SDCC. When the code size is more essential for your project than execution speed, apply this modification. To convert these macro to function, comment out these macros at the bottom of USB_Register.h.<br><br>Edit the INF file, 'CDC_ACM.inf', in the INF folder with your favorite text editor.<br>The VID/PID specified in the INF file must match to that of the device.<br>See the comments in the INF file for another points to edit.<br><br><b>Q and A</b><br>Q1. What are the resources of C8051F340 which are used by to implement this functionality ?<br>A1. <br>&nbsp; On-chip peripherals:<br>&nbsp; - USB0 - absolutely yes  <br>&nbsp; - Internal OSC - for USB clock with clock recovery<br>&nbsp; - - SYSCLK: no restriction, select appropriate one for your task<br>&nbsp; - USB0 interrupt - required, priority (high/low) - either will do<br><br>&nbsp; Memories (bytes) - v1.4<br>&nbsp; 'xdata' is used for RX/TX buffer - tunable on its size and memory assignment<br>&nbsp; KEIL - code: 3754, data: 73.5, xdata: 512<br>&nbsp; SDCC - code: 4105, data: 0x00 - 0x46, except stack, xdata: 512<br><br>&nbsp; For the demonstration only - not the absolute requirement<br>&nbsp; - Timer2 and Timer2 interrupt<br>&nbsp; - - To debounce the switch inputs on the dev board<br>&nbsp; - Ports on 'F34x dev board<br>&nbsp; - - P2.0 and P2.1 - switch<br>&nbsp; - - P2.2 and P2.3 - LED<br>&nbsp; The ports (P0,P1,P2) are configured to fit to the jumper setting of the dev board. But it is not the absolute requirement.<br><br>Q2. In addtion to virtual com port, can this device equip another USB functions at the same time?<br>A2. Unfortunately, Windows built-in device driver, usbser.sys, doesn't accept it.<br>As the USB CDC spec allows it, a custom device driver can support composite device of CDC and other USB class, such as HID, MSC. But I don't know any free device driver which replaces usbser.sys. You must make it by yourself, or buy a commercial one.<br><br><b>E) Weird usbser.sys</b><br>The usbser.sys (built-in device driver of Windows) is weird in several points.<br><br>WinXP SP2, usbser.sys (5.1.2699.2180)<br><br>When the transfer size is just the multiple of 64 bytes (max packet size of bulk IN EP), ReadFile doesn't finish until zero length packet is received, even if the actual transfer size is equal to the requested size.<br><br>The requests issued (or not issued) by usbser.sys are as follows. You'll find how usbser.sys is weird.<br><pre><font size="2">a) Just after device configuration  GET_LINE_CODING  SET_CONTROL_LINE_STATE(0x00) - RTS:0, DTR:0b) COM session: example 1  RTS doesn't match between PC and device until SetCommState.  Even though usbser.sys issues SET_CONTROL_LINE_STATE(0x00) at the configuration,   its internal setting (fRtsControl field of DCB) doesn't reflect it.  GetCommState and SetCommState issues redundant requests.  CloseHandle issues redundant SET_CONTROL_LINE_STATE- CreateFile    no request- PurgeComm    no request- GetCommState    GET_LINE_CODING    GET_LINE_CODING- change baudrate on DCB    fRtsControl is '1' as default when DCB is read out.- SetCommState    GET_LINE_CODING    GET_LINE_CODING    SET_LINE_CODING    GET_LINE_CODING    SET_CONTROL_LINE_STATE(0x02) - RTS:1, DTR:0    SET_LINE_CODING    GET_LINE_CODING- ReadFile/WriteFile    bulk transfer- CloseHandle    SET_CONTROL_LINE_STATE(0x02) - RTS:1, DTR:0c) COM session: example 2  EscapeCommFunction( SETRTS ) and EscapeCommFunction( CLRRTS ) issue no request.  Only the fRtsControl field of DCB seems to be able to set/reset RTS - CreateFile    no request- EscapeCommFunction( SETDTR )    SET_CONTROL_LINE_STATE(0x01) - RTS:0, DTR:1- EscapeCommFunction( CLRDTR )    SET_CONTROL_LINE_STATE(0x00) - RTS:0, DTR:0- EscapeCommFunction( SETRTS )    no request- EscapeCommFunction( CLRRTS )    no request- EscapeCommFunction( SETBREAK )    SEND_BREAK(0xFFFF)- EscapeCommFunction( CLRBREAK )    SEND_BREAK(0x0000)- SetCommBreak    SEND_BREAK(0xFFFF)- ClearCommBreak    SEND_BREAK(0x0000)- GetCommModemStatus    no request - (because the status is returned by the interrupt EP)- ClearCommError    no request - (because the status is returned by the interrupt EP)- CloseHandle    SET_CONTROL_LINE_STATE(0x00) - RTS:0, DTR:0d) COM session: example 3  CTS is always asserted regardless of actual input.- CreateFile    no request- GetCommModemStatus    stat = 0x10 (CTS: 1, DSR: 0)- set DSR to 1- GetCommModemStatus    stat = 0x30 (CTS: 1, DSR: 1)- set DSR to 0- GetCommModemStatus    stat = 0x10 (CTS: 1, DSR: 0)- set CTS to 1- GetCommModemStatus    stat = 0x10 (CTS: 1, DSR: 0)- set CTS to 0- GetCommModemStatus    stat = 0x10 (CTS: 1, DSR: 0)- CloseHandle    SET_CONTROL_LINE_STATE(0x00) - RTS:0, DTR:0</font></pre></body></html>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
综合激情成人伊人| 国产精品不卡在线| 欧美日本国产一区| 欧洲亚洲精品在线| 欧美日韩亚洲综合| 欧美精品1区2区| 欧美一区二区免费| 久久综合久久综合亚洲| 日韩欧美色综合| 久久久精品免费观看| 国产日本欧洲亚洲| 亚洲欧美激情插| 午夜激情综合网| 久久99精品国产麻豆婷婷| 国产精品88888| 91日韩在线专区| 制服丝袜中文字幕一区| 久久久蜜臀国产一区二区| 国产日韩精品一区二区三区在线| 中文字幕永久在线不卡| 亚洲欧美视频一区| 日韩成人一级大片| 国产成人精品免费在线| 欧美一区二区观看视频| 国产日韩欧美在线一区| 亚洲女与黑人做爰| 久久成人免费电影| 粉嫩av一区二区三区| 色欧美88888久久久久久影院| 91精品国产色综合久久久蜜香臀| 久久中文字幕电影| 亚洲五码中文字幕| 国产河南妇女毛片精品久久久| 色欧美片视频在线观看| 欧美一级二级在线观看| 亚洲人精品一区| 久久国产精品99久久久久久老狼 | 亚洲在线观看免费| 视频在线观看一区| 国产69精品久久99不卡| 欧美人狂配大交3d怪物一区 | 国产精品福利av| 石原莉奈在线亚洲三区| 粉嫩嫩av羞羞动漫久久久 | 国产精品综合二区| 欧美色倩网站大全免费| 国产精品视频一二| 久久精品国产在热久久| 91成人在线观看喷潮| 亚洲国产日日夜夜| 成人福利在线看| 日韩美一区二区三区| 亚洲成av人片一区二区三区| 高清久久久久久| 欧美电影免费观看高清完整版在| 亚洲最快最全在线视频| 91在线丨porny丨国产| 中文字幕精品—区二区四季| 久久99精品久久久久| 欧美一区二区三区免费| 亚洲va欧美va人人爽午夜| 91蜜桃在线观看| 中文字幕一区二区三区精华液 | 国精品**一区二区三区在线蜜桃| 久久免费的精品国产v∧| 亚洲一区电影777| 91伊人久久大香线蕉| 欧美国产成人精品| 成人精品视频网站| 中文字幕欧美激情一区| 国产成人精品免费视频网站| 久久久www免费人成精品| 国模少妇一区二区三区| 久久免费视频一区| 国产成人免费高清| 国产日韩欧美麻豆| 成人小视频免费在线观看| 国产欧美久久久精品影院| 国产suv精品一区二区三区| 亚洲国产精品99久久久久久久久| 国产精品一线二线三线| 国产精品麻豆久久久| 91在线码无精品| 亚洲精品久久7777| 91精品国产乱码| 国产一区二区女| 国产欧美精品一区| 91在线观看高清| 亚洲一区二区精品3399| 欧美一区2区视频在线观看| 免费观看日韩电影| 国产女同互慰高潮91漫画| 成人sese在线| 肉丝袜脚交视频一区二区| 精品国产一区二区三区不卡 | 精品动漫一区二区三区在线观看| 国产美女在线观看一区| 国产精品乱人伦一区二区| 91麻豆精品一区二区三区| 亚洲国产欧美另类丝袜| 精品区一区二区| av一本久道久久综合久久鬼色| 亚洲一区在线免费观看| 精品国偷自产国产一区| 99麻豆久久久国产精品免费 | 日韩一级成人av| 国产成人午夜视频| 午夜精品视频一区| 国产精品麻豆欧美日韩ww| 欧美日本一区二区在线观看| 国内成人免费视频| 亚洲综合清纯丝袜自拍| 久久久亚洲国产美女国产盗摄| 在线精品观看国产| 蜜桃免费网站一区二区三区| 亚洲日本在线天堂| 久久久久久久综合日本| 在线视频国产一区| 高清视频一区二区| 久久激情综合网| 亚洲一区国产视频| 国产欧美精品国产国产专区| 欧美一级理论性理论a| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 成人h动漫精品一区二| 奇米一区二区三区| 亚洲黄色av一区| 中文字幕色av一区二区三区| 亚洲精品一线二线三线| 欧美一区二区三区在线看| 欧美午夜在线一二页| 97久久精品人人澡人人爽| 国产福利一区二区三区| 久久91精品久久久久久秒播| 婷婷成人综合网| 香蕉加勒比综合久久| 亚洲综合自拍偷拍| 成人免费在线视频观看| 国产欧美一区二区三区鸳鸯浴| 欧美一级理论片| 欧美一级理论片| 欧美一级欧美一级在线播放| 欧美午夜电影网| 欧美一a一片一级一片| 欧美专区亚洲专区| 91在线播放网址| 色中色一区二区| 91麻豆蜜桃一区二区三区| 一本一本久久a久久精品综合麻豆| 国产成人免费av在线| 粉嫩欧美一区二区三区高清影视| 久久国产生活片100| 国精产品一区一区三区mba桃花| 六月婷婷色综合| 国产精品一二三四区| 国产盗摄精品一区二区三区在线 | 毛片av中文字幕一区二区| 亚洲电影欧美电影有声小说| 亚洲影院免费观看| 午夜激情综合网| 蜜臀av一级做a爰片久久| 国产一区二区按摩在线观看| 国产精品中文字幕一区二区三区| 国产综合色产在线精品| 高清不卡一区二区| 色88888久久久久久影院野外| 91国模大尺度私拍在线视频| 精品视频一区二区三区免费| 欧美一区二区不卡视频| 久久久精品黄色| 亚洲精品伦理在线| 成人晚上爱看视频| 91免费观看视频在线| 欧美日韩在线播| 久久综合狠狠综合| 亚洲激情成人在线| 日韩高清国产一区在线| 国产精品 日产精品 欧美精品| 成人美女视频在线观看| 欧美亚男人的天堂| 欧美精品一区二区三区很污很色的| 国产精品网曝门| 三级一区在线视频先锋| 国产jizzjizz一区二区| 欧美日韩三级一区| 国产日韩精品久久久| 午夜精品福利一区二区三区av| 国产一区二区伦理片| 色综合色综合色综合色综合色综合| 777亚洲妇女| 国产丝袜美腿一区二区三区| 亚洲v中文字幕| a美女胸又www黄视频久久| 欧美一二三区在线观看| 亚洲视频在线一区观看| 国产在线精品一区二区夜色| 91久久精品一区二区三| 欧美激情在线免费观看| 蜜桃传媒麻豆第一区在线观看| 色视频欧美一区二区三区|