examples: Added isrExit() call to gpio-tool.js for ISR shutdown testing
Signed-off-by: Henry Bruce <henry.bruce@intel.com> Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
committed by
Brendan Le Foll
parent
b1fd66c561
commit
237308898c
@@ -31,8 +31,10 @@ const rl = readline.createInterface({
|
||||
});
|
||||
|
||||
function printUsage() {
|
||||
console.log("version Print version");
|
||||
console.log("get pin Get pin value");
|
||||
console.log("version Print version");
|
||||
console.log("get pin Get pin level");
|
||||
console.log("set pin level Set pin level");
|
||||
console.log("monitor pin Monitor pin level changes");
|
||||
}
|
||||
|
||||
function getVersion() {
|
||||
@@ -55,7 +57,7 @@ function getPin() {
|
||||
}
|
||||
|
||||
function onPinLevelChange() {
|
||||
console.log('gpio change');
|
||||
console.log('gpio level change');
|
||||
}
|
||||
|
||||
function monitorPin() {
|
||||
@@ -65,6 +67,7 @@ function monitorPin() {
|
||||
pin.isr(mraa.EDGE_BOTH, onPinLevelChange);
|
||||
rl.question('Press ENTER to stop', function(answer) {
|
||||
rl.close();
|
||||
pin.isrExit();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user