Skip to content
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

feat: add callback to i2c constructor #88

Closed

Conversation

matheussampaio
Copy link

@matheussampaio matheussampaio commented Jun 12, 2017

Add a optional callback to I2C constructor.

const i2c = new I2C(DEFAULT_DDCCI_ADDR, { device: '/dev/i2c-1' }, (error) => {
  if (error) {
    console.error(error);
  } else {
    console.log('success');
  }
});

@matheussampaio
Copy link
Author

This closes Issues #76.

@rzr
Copy link

rzr commented Jul 3, 2019

Looks good, an other option would be to align iotjs i2c.open API :
https://github.com/jerryscript-project/iotjs/blob/master/docs/api/IoT.js-API-I2C.md

@rzr
Copy link

rzr commented Jan 13, 2020

May I suggest to consider to forward to abandonware fork

Relate-to: #97

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants