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="2781" name="detachInterrupt" prototype="Page" created="1371825459626" lastModified="1371825474238">
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>detachInterrupt</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.110 Safari/537.36</http_browser>
11 <time type="date">21.06.2013 09:37:54 CDT</time>
12 <hopsession>127.0.0.192.94.94.z5cudt01kfu3</hopsession>
13 <body><script src="/static/bonescript-demo.js"></script>
\r
14 <h2>BoneScript</h2>
\r
16 <div id='side-menu' class="t3_sidebar">
\r
17 <ul class="left-menu">
\r
18 <strong>Navigation</strong>
\r
19 <li><a href="/Support/BoneScript/menu/">Menu contents</a></li>
\r
22 <div class="t3_content_1">
\r
23 <div id='connect-status'></div>
\r
24 <div id="content_child">
\r
25 <!--- START CONTENT -->
\r
27 <h1>detachInterrupt(pin, [callback])</h1>
\r
28 <p>Remove an interrupt handler</p>
\r
29 <p><i><em>Note:</em> This function is still undergoing development and debug.</i></p>
\r
30 <h2>Arguments</h2>
\r
32 <li><em>pin</em>: the <a href="/Support/BoneScript/#pin">BeagleBone
\r
33 pin</a> identifier</li>
\r
34 <li><em>callback</em>: called upon completion</li>
\r
36 <h2>Return value</h2>
\r
38 <li><a href="/Support/BoneScript/#true">true</a> if successful</li>
\r
39 <li><a href="/Support/BoneScript/#false">false</a> on failure</li>
\r
41 <h2>callback(x)</h2>
\r
43 <li><em>x.err</em>: error status message</li>
\r
46 <button class="dynlink" onclick="demoRun('code')">run</button>
\r
47 <button class="dynlink" onclick="demoRestore('code')">restore</button>
\r
49 <pre id="code" class="use-editor" style="height: 280px;">
\r
50 var b = require('bonescript');
\r
51 var inputPin = 'P8_19';
\r
52 b.pinMode(inputPin, b.INPUT);
\r
53 b.attachInterrupt(inputPin, true, b.CHANGE, interruptCallback);
\r
54 setTimeout(detach, 1000);
\r
56 function interruptCallback(x) {
\r
57 console.log(JSON.stringify(x));
\r
61 b.detachInterrupt(inputPin);
\r
62 console.log('Interrupt detached');
\r
64 <div readonly id='console-output' style='height: 280px;'></div>
\r
66 <h2>Build and execute instructions</h2>
\r
70 <h2>See also</h2>
\r
71 <h3>Topics</h3>
\r
73 <li><a href="/Support/bone101/#headers">BeagleBone expansion headers</a></li>
\r
74 <li><a href="/Support/BoneScript/#digitalio">Digital I/O</a></li>
\r
76 <h3>Related functions</h3>
\r
78 <li><a href="/Support/BoneScript/#require">require</a></li>
\r
79 <li><a href="/Support/BoneScript/pinMode/">pinMode</a></li>
\r
80 <li><a href="/Support/BoneScript/attachInterrupt/">attachInterrupt</a></li>
\r
82 <h3>Examples</h3>
\r
84 <li><a href="/Support/BoneScript/cape_bacon/">Bacon Cape</a></li>
\r
87 <!--- START FOOTER -->
\r
90 <div style="clear:both;"></div></body>
91 <pseudoparent idref="2471" prototyperef="Page"/>
92 <http_referer>http://beagleboard.org/support/BoneScript/detachInterrupt/edit</http_referer>
93 <http_host>beagleboard.org</http_host>
95 <user>blog.hangerhead.com</user>