Skip to content

gpio implementation discussion with code #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

gpio implementation discussion with code #129

wants to merge 1 commit into from

Conversation

seanshpark
Copy link
Contributor

this PR is not for real but for gpio implementation discussion.
please leave comments.

return err;
var dircode = getDirectionCode(direction);
if (dircode < 0) {
return gpioctl.ERR_INVALIDPARAM;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to GPIO API. we need to call callback function with corresponding Error object.

var err = new Error("Invalid parameter");
if (util.isFunction(callback)) {
  nextTick(function() {
    callback(err);
  });
} else {
  throw err;
}

@seanshpark
Copy link
Contributor Author

Thank you for the comments. I'll close this PR when new PR is ready.

@seanshpark seanshpark closed this Jul 23, 2015
pmarcinkiew referenced this pull request in pmarcinkiew/iotjs Aug 29, 2017
Modified DM utc to fix build errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants