Skip to content

Commit

Permalink
Merge pull request #114 from RoboSchmied/RoboSchmied-fix-113
Browse files Browse the repository at this point in the history
include last register in i2cdump output
  • Loading branch information
dimerr authored Mar 7, 2024
2 parents 3e7944b + d0491f0 commit cc2849e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/i2cspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ static void hexdump(read_register_t cb, int fd, unsigned char i2c_addr,

size_t size = to_reg_addr - from_reg_addr;
printf(" 0 1 2 3 4 5 6 7 8 9 A B C D E F\n");
for (size_t i = from_reg_addr; i < to_reg_addr; ++i) {
for (size_t i = from_reg_addr; i <= to_reg_addr; ++i) {
int res = cb(fd, i2c_addr, i, SELECT_WIDE(i), 1);
if (i % 16 == 0)
printf("%4.x: ", i);
Expand Down

0 comments on commit cc2849e

Please sign in to comment.