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

I2C.send calls callback with extra argument #173

Open
johnnyman727 opened this issue May 17, 2016 · 3 comments
Open

I2C.send calls callback with extra argument #173

johnnyman727 opened this issue May 17, 2016 · 3 comments

Comments

@johnnyman727
Copy link
Contributor

I expect the callback of I2C.send to just have an error attribute but it also has a second argument with the value of new Buffer([0x88]).

@Dr-Emann
Copy link

Dr-Emann commented Oct 2, 2016

Looks like I2C.send calls the callback with _simple_cmd(CMD.STOP) (which internally sends a one byte echo command to return 0x88), whereas I2C.read/I2C.transfer call the callback with port.rx, and before sending STOP.

@rwaldron
Copy link
Contributor

rwaldron commented Oct 2, 2016

Send only sends and then stops. Read and transfer must wait for responses before the stop.

@Dr-Emann
Copy link

Dr-Emann commented Oct 2, 2016

Functions which also pass [0x88] to their callback parameter:

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

No branches or pull requests

3 participants