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

i2cdump does not show last register byte #113

Closed
RoboSchmied opened this issue Mar 1, 2024 · 0 comments · Fixed by #114
Closed

i2cdump does not show last register byte #113

RoboSchmied opened this issue Mar 1, 2024 · 0 comments · Fixed by #114

Comments

@RoboSchmied
Copy link
Contributor

RoboSchmied commented Mar 1, 2024

last byte of requested sequence is missing

ipctool i2cdump 0x60 0x3107 0x3109 shows only 2 of 3 register bytes CB 3E . The last byte of the register is always skipped:

root@openipc-gk7205v210:/tmp# ./ipctool i2cdump 0x60 0x3107 0x3109
       0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F
CB  3E

But output should be (in my case) CB 3E 01.
Even though we can get the output we want by incrementing the to-register by 1, the last register will never be readable by i2cdump.

In other words: source

ipctool is kinda stupid and does not include the last region in the sequence

code problem

for (size_t i = from_reg_addr; i < to_reg_addr; ++i) {

solution

for (size_t i = from_reg_addr; i <= to_reg_addr; ++i) {
@RoboSchmied RoboSchmied changed the title i2cdump does not show last register i2cdump does not show last register byte Mar 3, 2024
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 a pull request may close this issue.

1 participant