<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/622b52a015da9b288b8be66d/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/622b52a015da9b288b8be66d/bg1.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">Wind River Systems</div><div class="t m0 x2 h3 y2 ff2 fs0 fc0 sc0 ls0 ws0">T<span class="_ _0"></span>ornado Device Driver W<span class="_ _0"></span>orkshop<span class="_ _1"> </span>© Copyright W<span class="_ _2"></span>ind River Systems<span class="_ _3"> </span><span class="fs1">5</span>-<span class="fs1">1</span></div><div class="t m0 x3 h4 y3 ff3 fs2 fc0 sc0 ls0 ws0">Cha<span class="_ _4"></span>pter</div><div class="t m0 x4 h5 y4 ff3 fs3 fc0 sc0 ls0 ws0">5</div><div class="t m0 x5 h6 y5 ff3 fs4 fc0 sc0 ls0 ws0">Ser<span class="_ _5"></span>ial Dr<span class="_ _5"></span>iv<span class="_ _0"></span>er<span class="_ _5"></span>s</div><div class="t m0 x6 h7 y6 ff2 fs5 fc0 sc0 ls0 ws0">•<span class="_ _6"> </span>What’s dif<span class="_ _2"></span>ferent about serial drivers?</div><div class="t m0 x6 h7 y7 ff2 fs5 fc0 sc0 ls0 ws0">•<span class="_ _6"> </span>Supporting both I/O System and tar<span class="_ _2"></span>get agent interfaces.</div><div class="t m0 x6 h7 y8 ff2 fs5 fc0 sc0 ls0 ws0">•<span class="_ _6"> </span>W<span class="_ _7"></span>riting interrupt, polled and bi-modal drivers.</div><div class="t m0 x6 h7 y9 ff2 fs5 fc0 sc0 ls0 ws0">•<span class="_ _6"> </span>Serial driver initialization.</div><div class="t m0 x6 h7 ya ff2 fs5 fc0 sc0 ls0 ws0">•<span class="_ _6"> </span>Serial r<span class="_ _2"></span>eads and write.</div><div class="t m0 x6 h7 yb ff2 fs5 fc0 sc0 ls0 ws0">•<span class="_ _6"> </span>Serial driver ioctl’s.</div></div><div class="pi" data-data='{"ctm":[1.708185,0.000000,0.000000,1.708185,0.000000,0.000000]}'></div></div>
</body>
</html>
<div id="pf2" class="pf w0 h0" data-page-no="2"><div class="pc pc2 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/622b52a015da9b288b8be66d/bg2.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">Wind River Systems</div><div class="t m0 x2 h3 y2 ff2 fs0 fc0 sc0 ls0 ws0">T<span class="_ _0"></span>ornado Device Driver W<span class="_ _0"></span>orkshop<span class="_ _1"> </span>© Copyright W<span class="_ _2"></span>ind River Systems<span class="_ _3"> </span><span class="fs1">5</span>-<span class="fs1">2</span></div><div class="t m0 x7 h8 yc ff3 fs6 fc0 sc0 ls0 ws0">Ser<span class="_ _4"></span>ial Dr<span class="_ _4"></span>iv<span class="_ _2"></span>er<span class="_ _4"></span>s</div><div class="t m0 x8 h4 yd ff4 fs2 fc1 sc0 ls0 ws0">5.1<span class="_ _8"> </span>Overview</div><div class="t m0 x9 h9 ye ff5 fs2 fc0 sc0 ls0 ws0">ttyDrv</div><div class="t m0 x9 h9 yf ff5 fs2 fc0 sc0 ls0 ws0">W<span class="_ _0"></span>riting xxDrv</div><div class="t m0 x9 h9 y10 ff5 fs2 fc0 sc0 ls0 ws0">Modifying sysSerial.c</div><div class="t m0 x9 h9 y11 ff5 fs2 fc0 sc0 ls0 ws0">Supporting WDB Communication</div><div class="t m0 x6 h7 y6 ff2 fs5 fc0 sc0 ls0 ws0">•<span class="_ _6"> </span>What is dif<span class="_ _2"></span>ferent about a serial driver</div><div class="t m0 x6 h7 y7 ff2 fs5 fc0 sc0 ls0 ws0">•<span class="_ _6"> </span>Supporting I/O System and tar<span class="_ _2"></span>get agent interfaces</div><div class="t m0 x6 ha y8 ff2 fs5 fc0 sc0 ls0 ws0">•<span class="_ _6"> </span>What is<span class="_"> </span><span class="ff6">ttyDrv</span>?</div><div class="t m0 x6 h7 y9 ff2 fs5 fc0 sc0 ls0 ws0">•<span class="_ _6"> </span>T<span class="_ _9"></span>ypical serial driver data flow<span class="_ _9"></span>.</div></div><div class="pi" data-data='{"ctm":[1.708185,0.000000,0.000000,1.708185,0.000000,0.000000]}'></div></div>
<div id="pf3" class="pf w0 h0" data-page-no="3"><div class="pc pc3 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/622b52a015da9b288b8be66d/bg3.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">Wind River Systems</div><div class="t m0 x2 h3 y2 ff2 fs0 fc0 sc0 ls0 ws0">T<span class="_ _0"></span>ornado Device Driver W<span class="_ _0"></span>orkshop<span class="_ _1"> </span>© Copyright W<span class="_ _2"></span>ind River Systems<span class="_ _3"> </span><span class="fs1">5</span>-<span class="fs1">3</span></div><div class="t m0 xa h8 yc ff3 fs6 fc0 sc0 ls0 ws0">What’<span class="_ _2"></span>s Dif<span class="_ _2"></span>ferent about Ser<span class="_ _4"></span>ial</div><div class="t m0 xb h8 y12 ff3 fs6 fc0 sc0 ls0 ws0">Dr<span class="_ _4"></span>iv<span class="_ _2"></span>er<span class="_ _4"></span>s?</div><div class="t m0 xc h7 y13 ff2 fs5 fc0 sc0 ls0 ws0">•<span class="_ _6"> </span>Serial drivers may need to perform work not dir<span class="_ _2"></span>ectly</div><div class="t m0 xd h7 y14 ff2 fs5 fc0 sc0 ls0 ws0">r<span class="_ _2"></span>elated to managing the device. E.g.:</div><div class="t m0 xd hb y15 ff7 fs7 fc0 sc0 ls0 ws0">●</div><div class="t m0 xe h7 y16 ff2 fs5 fc0 sc0 ls0 ws0">Mapping <CR> to <CR><LF> on output</div><div class="t m0 xd hb y17 ff7 fs7 fc0 sc0 ls0 ws0">●</div><div class="t m0 xe h7 y18 ff2 fs5 fc0 sc0 ls0 ws0">Pr<span class="_ _2"></span>ovide command line editing capabilities</div><div class="t m0 xd hb y19 ff7 fs7 fc0 sc0 ls0 ws0">●</div><div class="t m0 xe h7 y1a ff2 fs5 fc0 sc0 ls0 ws0">Buf<span class="_ _2"></span>fering input and output data</div><div class="t m0 xc h7 y1b ff2 fs5 fc0 sc0 ls0 ws0">•<span class="_ _6"> </span>T<span class="_ _9"></span>o use a serial driver as a communication mechanism</div><div class="t m0 xd h7 y1c ff2 fs5 fc0 sc0 ls0 ws0">between the T<span class="_ _9"></span>ornado tar<span class="_ _2"></span>get server (on the host) and</div><div class="t m0 xd h7 y1d ff2 fs5 fc0 sc0 ls0 ws0">tar<span class="_ _2"></span>get agent (on the target) r<span class="_ _2"></span>equir<span class="_ _2"></span>es a special interface.</div></div><div class="pi" data-data='{"ctm":[1.708185,0.000000,0.000000,1.708185,0.000000,0.000000]}'></div></div>
<div id="pf4" class="pf w0 h0" data-page-no="4"><div class="pc pc4 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/622b52a015da9b288b8be66d/bg4.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">Wind River Systems</div><div class="t m0 x2 h3 y2 ff2 fs0 fc0 sc0 ls0 ws0">T<span class="_ _0"></span>ornado Device Driver W<span class="_ _0"></span>orkshop<span class="_ _1"> </span>© Copyright W<span class="_ _2"></span>ind River Systems<span class="_ _3"> </span><span class="fs1">5</span>-<span class="fs1">4</span></div><div class="t m0 xf h8 yc ff3 fs6 fc0 sc0 ls0 ws0">Dr<span class="_ _4"></span>iv<span class="_ _2"></span>er Options</div><div class="t m0 xc h7 y1e ff2 fs5 fc0 sc0 ls0 ws0">•<span class="_ _6"> </span>A serial driver is not r<span class="_ _2"></span>equired to use or do anything</div><div class="t m0 xd h7 y1f ff2 fs5 fc0 sc0 ls0 ws0">described in this chapter<span class="_ _7"></span>.</div><div class="t m0 xc h7 y20 ff2 fs5 fc0 sc0 ls0 ws0">•<span class="_ _6"> </span>Following the method described in this chapter may</div><div class="t m0 xd h7 y21 ff2 fs5 fc0 sc0 ls0 ws0">substantially decr<span class="_ _2"></span>ease development time.</div></div><div class="pi" data-data='{"ctm":[1.708185,0.000000,0.000000,1.708185,0.000000,0.000000]}'></div></div>
<div id="pf5" class="pf w0 h0" data-page-no="5"><div class="pc pc5 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/622b52a015da9b288b8be66d/bg5.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">Wind River Systems</div><div class="t m0 x2 h3 y2 ff2 fs0 fc0 sc0 ls0 ws0">T<span class="_ _0"></span>ornado Device Driver W<span class="_ _0"></span>orkshop<span class="_ _1"> </span>© Copyright W<span class="_ _2"></span>ind River Systems<span class="_ _3"> </span><span class="fs1">5</span>-<span class="fs1">5</span></div><div class="t m0 x10 h8 yc ff3 fs6 fc0 sc0 ls0 ws0">The r<span class="_ _2"></span>ole of ttyDr<span class="_ _a"></span>v</div><div class="t m0 xc ha y22 ff6 fs5 fc0 sc0 ls0 ws0">ttyDrv<span class="ff2"> is a virtual driver that</span></div><div class="t m0 xd hb y23 ff7 fs7 fc0 sc0 ls0 ws0">●</div><div class="t m0 xe h7 y24 ff2 fs5 fc0 sc0 ls0 ws0">Manages I/O system</div><div class="t m0 xd hb y25 ff7 fs7 fc0 sc0 ls0 ws0">●</div><div class="t m0 xe h7 y26 ff2 fs5 fc0 sc0 ls0 ws0">Calls r<span class="_ _2"></span>eal driver to manage hardwar<span class="_ _2"></span>e</div><div class="t m0 x11 h4 y27 ff3 fs2 fc0 sc0 ls0 ws0">I/O System</div><div class="t m0 x12 h4 y28 ff3 fs2 fc0 sc0 ls0 ws0">ttyDr<span class="_ _5"></span>v</div><div class="t m0 x13 h4 y29 ff3 fs2 fc0 sc0 ls0 ws0">xxDr<span class="_ _5"></span>v</div><div class="t m0 x14 hc y2a ff3 fs8 fc0 sc0 ls0 ws0">xxChan1</div><div class="t m0 x15 h4 y2b ff3 fs2 fc0 sc0 ls0 ws0">yyDr<span class="_ _5"></span>v</div><div class="t m0 x16 hc y2c ff3 fs8 fc0 sc0 ls0 ws0">xxChan2<span class="_ _b"> </span>yyChan1</div><div class="t m0 x17 hc y2d ff3 fs8 fc0 sc0 ls0 ws0">yyChan2</div><div class="t m0 x6 ha y6 ff2 fs5 fc0 sc0 ls0 ws0">•<span class="_ _6"> </span><span class="ff6">ttyDrv</span>:</div><div class="t m0 x18 hb y2e ff7 fs7 fc0 sc0 ls0 ws0">●</div><div class="t m0 x19 h7 y2f ff2 fs5 fc0 sc0 ls0 ws0">Supports the standar<span class="_ _2"></span>d I/O system interface</div><div class="t m0 x18 hb y30 ff7 fs7 fc0 sc0 ls0 ws0">●</div><div class="t m0 x19 h7 y31 ff2 fs5 fc0 sc0 ls0 ws0">Pr<span class="_ _2"></span>ovides device independent serial driver functionality</div><div class="t m0 x18 hb y32 ff7 fs7 fc0 sc0 ls0 ws0">●</div><div class="t m0 x19 h7 y33 ff2 fs5 fc0 sc0 ls0 ws0">May drive multiple lower level serial drivers</div><div class="t m0 x6 ha y34 ff2 fs5 fc0 sc0 ls0 ws0">•<span class="_ _6"> </span>The virtual<span class="_"> </span><span class="ff6">ttyDrv</span> driver and the lower<span class="_ _7"></span>, r<span class="_ _2"></span>eal driver replaces the older</div><div class="t m0 x18 ha y35 ff2 fs5 fc0 sc0 ls0 ws0">(VxW<span class="_ _9"></span>orks 5.2 and earlier)<span class="_"> </span><span class="ff6">tyCoDrv<span class="_ _c"></span><span class="ff2">.</span></span></div></div><div class="pi" data-data='{"ctm":[1.708185,0.000000,0.000000,1.708185,0.000000,0.000000]}'></div></div>