Fork me on GitHub
beagleboard.org

BoneScript

You might be able to see a newer version of this on beagleboard.org/support/bonescript/detachInterrupt

detachInterrupt(pin, [callback])

Remove an interrupt handler

Note: This function is still undergoing development and debug.

Arguments

Return value

callback(x)

  • x.err: error status message

Example

var b = require('bonescript');
var inputPin = 'P8_19';
b.pinMode(inputPin, b.INPUT);
b.attachInterrupt(inputPin, true, b.CHANGE, interruptCallback);
setTimeout(detach, 1000);

function interruptCallback(x) {
    console.log(JSON.stringify(x));
}

function detach() {
    b.detachInterrupt(inputPin);
    console.log('Interrupt detached');
}

See also

Topics

Related functions

Examples