EZ-USB FX2LP Linxu Driver

  • u6_328255
    了解作者
  • 17.4KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-28 22:20
    上传日期
EZ-USB FX2LP板子的Linux驱动(原创)
EZ-USB FX2LP Linxu Driver.rar
  • ezusb_driver
  • manual.doc
    29KB
  • Desktop.ini
    133B
  • example.c
    1.6KB
  • Makefile
    19B
  • ezusbDrv.c
    39.4KB
  • ezusbDrv.h
    13KB
内容介绍
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <meta name="generator" content="pdf2htmlEX"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css"> <link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css"> <link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/626b1f977ae5df2aa7f6ac08/raw.css"> <script src="https://static.pudn.com/base/js/compatibility.min.js"></script> <script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script> <script> try{ pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({}); }catch(e){} </script> <title></title> </head> <body> <div id="sidebar" style="display: none"> <div id="outline"> </div> </div> <div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/626b1f977ae5df2aa7f6ac08/bg1.jpg"><div class="c x0 y1 w2 h2"><div class="t m0 x1 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">Manual for ezusbDrv</div><div class="t m0 x2 h4 y3 ff2 fs1 fc0 sc0 ls0 ws0">This document is for ezusbDrv<span class="_ _0"></span>, driver for the ezusb fx2 development board. This </div><div class="t m0 x3 h4 y4 ff2 fs1 fc0 sc0 ls0 ws0">board which is widely used is a board with an usb port and two UAR<span class="_ _0"></span>T<span class="_ _0"></span>. <span class="_ _0"></span>Almost all the </div><div class="t m0 x3 h4 y5 ff2 fs1 fc0 sc0 ls0 ws0">data downloading into the board is transfered by the usb port. But we are not here to </div><div class="t m0 x3 h4 y6 ff2 fs1 fc0 sc0 ls0 ws0">talk about the board. So we will describe the ezusbDrv code in this manual and of </div><div class="t m0 x3 h4 y7 ff2 fs1 fc0 sc0 ls0 ws0">course tell you how to use it.</div><div class="t m0 x2 h4 y8 ff2 fs1 fc0 sc0 ls0 ws0">1. Compile the drvier</div><div class="t m0 x4 h4 y9 ff2 fs1 fc0 sc0 ls0 ws0">When you get this driver<span class="_ _1"></span>, you may get four files:</div><div class="t m0 x5 h4 ya ff2 fs1 fc0 sc0 ls0 ws0">a.<span class="_ _2"> </span>ezusbDrv<span class="_ _0"></span>.c</div><div class="t m0 x5 h4 yb ff2 fs1 fc0 sc0 ls0 ws0">b.<span class="_ _3"> </span>ezusbDrv<span class="_ _0"></span>.h</div><div class="t m0 x5 h4 yc ff2 fs1 fc0 sc0 ls0 ws0">c.<span class="_ _2"> </span>Makefile</div><div class="t m0 x5 h4 yd ff2 fs1 fc0 sc0 ls0 ws0">d.<span class="_ _3"> </span>example.c</div><div class="t m0 x4 h4 ye ff2 fs1 fc0 sc0 ls0 ws0">The first three files are the source files of this driver<span class="_ _0"></span>. <span class="_ _1"></span>Y<span class="_ _4"></span>ou can change them if </div><div class="t m0 x2 h4 yf ff2 fs1 fc0 sc0 ls0 ws0">neccessary<span class="_ _0"></span>, but if you don't know much about a driver<span class="_ _0"></span>, please don'<span class="_ _5"></span>t change any of</div><div class="t m0 x2 h4 y10 ff2 fs1 fc0 sc0 ls0 ws0">these in order to pass the compiling process.</div><div class="t m0 x4 h4 y11 ff2 fs1 fc0 sc0 ls0 ws0">The forth file is an example file, it will be described later<span class="_ _0"></span>.</div><div class="t m0 x4 h4 y12 ff2 fs1 fc0 sc0 ls0 ws0">Compiling process:</div><div class="t m0 x5 h4 y13 ff2 fs1 fc0 sc0 ls0 ws0">a.<span class="_ _2"> </span>Put the first three files inside a folder<span class="_ _0"></span>,<span class="_ _5"></span> keep them unchanged;</div><div class="t m0 x5 h4 y14 ff2 fs1 fc0 sc0 ls0 ws0">b.<span class="_ _3"> </span>Open a terminal, and going into the folder;</div><div class="t m0 x5 h4 y15 ff2 fs1 fc0 sc0 ls0 ws0">c.<span class="_ _2"> </span>W<span class="_ _0"></span>rite the<span class="_ _5"></span> following sentence in your command line:</div><div class="t m0 x6 h4 y16 ff2 fs1 fc0 sc0 ls0 ws0">$:sudo make -C /usr/src/(source code path) M=$(pwd) modules</div><div class="t m0 x6 h4 y17 ff2 fs1 fc0 sc0 ls0 ws0">The source code path is your kernel source code path, you can find </div><div class="t m0 x5 h4 y18 ff2 fs1 fc0 sc0 ls0 ws0">them easily in your /usr/src folder<span class="_ _0"></span>.</div><div class="t m0 x6 h4 y19 ff2 fs1 fc0 sc0 ls0 ws0">T<span class="_ _1"></span>ips:My kernel version is 2.6.15, the driver has been tested </div><div class="t m0 x5 h4 y1a ff2 fs1 fc0 sc0 ls0 ws0">successfully under this version. If your version is not this, you may need </div><div class="t m0 x5 h4 y1b ff2 fs1 fc0 sc0 ls0 ws0">to change some codes inside the driver source code. But that will not be </div><div class="t m0 x5 h4 y1c ff2 fs1 fc0 sc0 ls0 ws0">that hard. <span class="_ _1"></span>Y<span class="_ _4"></span>ou can find help in www<span class="_ _4"></span>.lxr<span class="_ _0"></span>.oss.org.</div><div class="t m0 x5 h4 y1d ff2 fs1 fc0 sc0 ls0 ws0">d.<span class="_ _3"> </span>Make sure the compiling information goes successfully<span class="_ _0"></span>.</div><div class="t m0 x2 h4 y1e ff2 fs1 fc0 sc0 ls0 ws0">2. Install the driver</div><div class="t m0 x4 h4 y1f ff2 fs1 fc0 sc0 ls0 ws0">When you have finished the compiling process with no error<span class="_ _1"></span>, you will find a </div><div class="t m0 x2 h4 y20 ff2 fs1 fc0 sc0 ls0 ws0">file named <span class="ff3">ezusbDrv<span class="_ _0"></span>.ko<span class="ff2"> inside your folder<span class="_ _0"></span>.<span class="_ _5"></span> This is our module file which needed </span></span></div><div class="t m0 x2 h4 y21 ff2 fs1 fc0 sc0 ls0 ws0">to be installed into the kernel. T<span class="_ _4"></span>ype the command in your command line:</div><div class="t m0 x6 h4 y22 ff2 fs1 fc0 sc0 ls0 ws0">$:sudo insmod ezusbDrv<span class="_ _4"></span>.ko</div><div class="t m0 x4 h4 y23 ff2 fs1 fc0 sc0 ls0 ws0">If successfully<span class="_ _4"></span>,<span class="_ _5"></span> we have installed the driver and we can begin to use it.</div><div class="t m0 x4 h4 y24 ff2 fs1 fc0 sc0 ls0 ws0">If unsuccessfully<span class="_ _4"></span>,<span class="_ _5"></span> try to recompile the driver and reinstall it.</div><div class="t m0 x2 h4 y25 ff2 fs1 fc0 sc0 ls0 ws0">3. T<span class="_ _4"></span>est th<span class="_ _5"></span>e driver</div></div></div><div class="pi" data-data='{"ctm":[1.611850,0.000000,0.000000,1.611850,0.000000,0.000000]}'></div></div> </body> </html>
评论