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

Read*Data() wrong implemented in firmata adaptor #862

Open
gen2thomas opened this issue Oct 1, 2022 · 0 comments
Open

Read*Data() wrong implemented in firmata adaptor #862

gen2thomas opened this issue Oct 1, 2022 · 0 comments
Labels

Comments

@gen2thomas
Copy link
Collaborator

Implementations of Read*Data() in firmata (and also formerly in digispark) are wrong implemented, regarding to the Kernel specification and the implementation of sys-fs driver (which uses syscall to smbus).

Read Byte (Comm==Register)
S Addr Wr [A] Comm [A] Sr Addr Rd [A] [Data] NA P
We have implemented in "ReadByteData()":
S Addr Wr [A] Comm [A] P S Addr Rd [A] [Data] NA P

Read Word
S Addr Wr [A] Comm [A] Sr Addr Rd [A] [DataLow] A [DataHigh] NA P
Implemented in "ReadWordData()":
S Addr Wr [A] Data [A] P S Addr Rd [A] [DataLow] A [DataHigh] NA P

In general most chips support both sequences, but unfortunately not all, e.g. PCA9501, which only support the "Read Byte".

@gen2thomas gen2thomas added the bug label Oct 1, 2022
@gen2thomas gen2thomas changed the title Read*Data() wrong implemted in firmata adaptor Read*Data() wrong implemented in firmata adaptor Nov 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant