Skip to content

Commit

Permalink
Merge pull request #172 from vaishnav98/master
Browse files Browse the repository at this point in the history
include out/in args for dummy()
  • Loading branch information
jadonk authored Jun 5, 2018
2 parents a059836 + 2a508aa commit ea9541e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ f.digitalWrite = function (pin, value, callback) {
if (debug) winston.debug('digitalWrite(' + [pin.key, value] + ');');
value = parseInt(Number(value), 2) ? 1 : 0;
//handle case digitalWrite() on Analog_Out
if (pin.pwm != 'undefined') {
if (typeof pin.pwm != 'undefined') {
var gpioEnabled = (7 == f.getPinMode(pin).mux); //check whether pin set as gpio
if (!gpioEnabled) {
winston.debug([pin.key, value] + ' set as ANALOG_OUTPUT modifying duty cycle according to value');
Expand Down
9 changes: 1 addition & 8 deletions test/test-ffi.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var testDir = '/tmp/ffi-test';
var Cfile = testDir + '/ffi-test';
var txtFile = testDir + '/txt-test.txt'
var args = {
'main': ['int', ['void']]
'dummy': ['int', ['void']]
};
var text = "HELLO";
var cCode = `
Expand All @@ -14,14 +14,7 @@ int dummy()
printf("Hello, World!");
return 0;
}
int main()
{
printf("Should never run.");
return 1;
}
`

module.exports.testFFI = function (test) {

test.expect(5);
Expand Down

0 comments on commit ea9541e

Please sign in to comment.