Beagle Board - beagleboard.org

getPinMode(pin, [callback])

Get the mode of a pin.

Arguments

Return value

  • mux: index of mux mode
  • options: array of mode names
  • slew: 'fast' or 'slow'
  • rx: 'enabled' or 'disabled'
  • pullup: 'diabled', 'pullup' or 'pulldown'
  • pin: key string for pin
  • name: pin name
  • err: error status message

callback(x)

  • x: return value

Example

var b = require('bonescript');
b.getPinMode("P8_13", printPinMux);
function printPinMux(x) {
    console.log('mux = ' + x.mux);
    console.log('pullup = ' + x.pullup);
    console.log('slew = ' + x.slew);
    if(x.options) 
        console.log('options = ' + 
            x.options.join(','));
    console.log('pin = ' + x.pin);
    console.log('name = ' + x.name);
    console.log('err = ' + x.err);
}

Build and execute instructions

  • Check out some of the other examples to see and verify getPinMode functionality.

See also

Topics

Related functions


Last updated by jkridner on Wed Jun 26 2013 13:25:14 GMT-0000 (UTC).
14757