Projects update: add Obsolete flag
[beagleboard.org.git] / db / 2563.xml
blob3621a9ce361074142f3e85553b3c5b4ae81b9903
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <?xml-stylesheet type="text/xsl" href="helma.xsl"?>
3 <xmlroot xmlns:hop="http://www.helma.org/docs/guide/features/database">
4   <hopobject id="2563" name="getPinMode" prototype="Page" created="1367624660103" lastModified="1372253114447">
5   <hop:parent idref="2471" prototyperef="Page"/>
6     <is_xhtml type="boolean">true</is_xhtml>
7     <http_remotehost>127.0.0.1</http_remotehost>
8     <http_language>en-US,en;q=0.8</http_language>
9     <uri>getPinMode</uri>
10     <http_browser>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36</http_browser>
11     <time type="date">26.06.2013 08:25:14 CDT</time>
12     <hopsession>127.0.0.12.7.236.1tmoumlyxjrzy</hopsession>
13     <body>&lt;script src=&quot;/static/bonescript-demo.js&quot;&gt;&lt;/script&gt;\r
14 &lt;div id=&apos;side-menu&apos; class=&quot;t3_sidebar&quot;&gt;\r
15     &lt;ul class=&quot;left-menu&quot;&gt;&lt;strong&gt;Navigation&lt;/strong&gt;\r
16         &lt;li&gt;&lt;a href=&quot;/static/side-menu.html&quot;&gt;Menu contents&lt;/a&gt;&lt;/li&gt;\r
17     &lt;/ul&gt;\r
18 &lt;/div&gt;\r
19 &lt;div class=&quot;t3_content_1&quot;&gt;&lt;div id=&apos;connect-status&apos;&gt;&lt;/div&gt;&lt;div id=&quot;content_child&quot;&gt;\r
20 &lt;h1&gt;getPinMode(pin, [callback])&lt;/h1&gt;\r
21 &lt;p&gt;Get the mode of a pin.&lt;/p&gt;\r
22 &lt;h2&gt;Arguments&lt;/h2&gt;\r
23 &lt;ul&gt;\r
24  &lt;li&gt;&lt;em&gt;pin&lt;/em&gt;: the &lt;a href=&quot;bonescript#pin&quot;&gt;BeagleBone pin&lt;/a&gt; identifier&lt;/li&gt;\r
25  &lt;li&gt;&lt;em&gt;callback&lt;/em&gt;: called upon completion&lt;/li&gt;\r
26 &lt;/ul&gt;\r
27 &lt;h2&gt;Return value&lt;/h2&gt;\r
28 &lt;ul&gt;\r
29  &lt;li&gt;&lt;em&gt;mux&lt;/em&gt;: index of mux mode&lt;/li&gt;\r
30  &lt;li&gt;&lt;em&gt;options&lt;/em&gt;: array of mode names&lt;/li&gt;\r
31  &lt;li&gt;&lt;em&gt;slew&lt;/em&gt;: &apos;fast&apos; or &apos;slow&apos;&lt;/li&gt;\r
32  &lt;li&gt;&lt;em&gt;rx&lt;/em&gt;: &apos;enabled&apos; or &apos;disabled&apos;&lt;/li&gt;\r
33  &lt;li&gt;&lt;em&gt;pullup&lt;/em&gt;: &apos;diabled&apos;, &apos;pullup&apos; or &apos;pulldown&apos;&lt;/li&gt;\r
34  &lt;li&gt;&lt;em&gt;pin&lt;/em&gt;: key string for pin&lt;/li&gt;\r
35  &lt;li&gt;&lt;em&gt;name&lt;/em&gt;: pin name&lt;/li&gt;\r
36  &lt;li&gt;&lt;em&gt;err&lt;/em&gt;: error status message&lt;/li&gt;\r
37 &lt;/ul&gt;\r
38 &lt;h2&gt;callback(x)&lt;/h2&gt;\r
39 &lt;ul&gt;\r
40  &lt;li&gt;&lt;em&gt;x&lt;/em&gt;: return value&lt;/li&gt;\r
41 &lt;/ul&gt;\r
42 &lt;h2&gt;Example\r
43  &lt;button class=&quot;dynlink&quot; onclick=&quot;demoRun(&apos;code&apos;)&quot;&gt;run&lt;/button&gt;\r
44  &lt;button class=&quot;dynlink&quot; onclick=&quot;demoRestore(&apos;code&apos;)&quot;&gt;restore&lt;/button&gt;\r
45 &lt;/h2&gt;\r
46 &lt;pre id=&quot;code&quot; class=&quot;use-editor&quot; style=&quot;height: 230px;&quot;&gt;\r
47 var b = require(&apos;bonescript&apos;);\r
48 b.getPinMode(&quot;P8_13&quot;, printPinMux);\r
49 function printPinMux(x) {\r
50     console.log(&apos;mux = &apos; + x.mux);\r
51     console.log(&apos;pullup = &apos; + x.pullup);\r
52     console.log(&apos;slew = &apos; + x.slew);\r
53     if(x.options) \r
54         console.log(&apos;options = &apos; + \r
55             x.options.join(&apos;,&apos;));\r
56     console.log(&apos;pin = &apos; + x.pin);\r
57     console.log(&apos;name = &apos; + x.name);\r
58     console.log(&apos;err = &apos; + x.err);\r
59 }&lt;/pre&gt;\r
60 &lt;div readonly id=&quot;console-output&quot; style=&quot;height: 200px;&quot;&gt;&lt;/div&gt;\r
61 &lt;h2&gt;Build and execute instructions&lt;/h2&gt;\r
62 &lt;ul&gt;\r
63     &lt;li&gt;Check out some of the other examples to see and verify \r
64     getPinMode functionality.&lt;/li&gt;\r
65 &lt;/ul&gt;\r
66 &lt;h2&gt;See also&lt;/h2&gt;\r
67 &lt;h3&gt;Topics&lt;/h3&gt;\r
68 &lt;ul&gt;\r
69  &lt;li&gt;&lt;a href=&quot;/Support/BoneScript/#headers&quot;&gt;BeagleBone expansion headers&lt;/a&gt;&lt;/li&gt;\r
70  &lt;li&gt;&lt;a href=&quot;/Support/BoneScript/#digitalio&quot;&gt;Digital I/O&lt;/a&gt;&lt;/li&gt;\r
71 &lt;/ul&gt;\r
72 &lt;h3&gt;Related functions&lt;/h3&gt;\r
73 &lt;ul&gt;\r
74  &lt;li&gt;&lt;a href=&quot;/Support/BoneScript/#require&quot;&gt;require&lt;/a&gt;&lt;/li&gt;\r
75  &lt;li&gt;&lt;a href=&quot;/Support/BoneScript/pinMode&quot;&gt;pinMode&lt;/a&gt;&lt;/li&gt;\r
76 &lt;/ul&gt;\r
77 &lt;!--\r
78 &lt;h3&gt;Examples&lt;/h3&gt;\r
79 &lt;ul&gt;\r
80  &lt;li&gt;&lt;a href=&quot;/Support/BoneScript/demo_attachedCapes&quot;&gt;Show attached capes&lt;/a&gt;&lt;/li&gt;\r
81 &lt;/ul&gt;\r
82 --&gt;\r
83 &lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;clear: both;&quot;&gt;&lt;/div&gt;</body>
84     <pseudoparent idref="2471" prototyperef="Page"/>
85     <http_referer>http://beagleboard.org/support/BoneScript/getPinMode/edit</http_referer>
86     <http_host>beagleboard.org</http_host>
87     <user>jkridner@gmail.com</user>
88     <lang>en-us</lang>
89   </hopobject>
90 </xmlroot>