Skip to content

Commit

Permalink
Update mgos_pcf857x.c
Browse files Browse the repository at this point in the history
ht Dominik Westner
  • Loading branch information
pimvanpelt committed Jul 26, 2021
1 parent 40a6e47 commit 72809a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mgos_pcf857x.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ void mgos_pcf857x_print_state(struct mgos_pcf857x *dev) {
return;
}
for (n = 0; n < dev->num_gpios; n++) {
s[dev->num_gpios - n + 1] = (dev->_state & (1 << n)) ? '1' : '0';
i[dev->num_gpios - n + 1] = (dev->_io & (1 << n)) ? 'I' : 'O';
s[dev->num_gpios - n - 1] = (dev->_state & (1 << n)) ? '1' : '0';
i[dev->num_gpios - n - 1] = (dev->_io & (1 << n)) ? 'I' : 'O';
}
s[dev->num_gpios] = i[dev->num_gpios] = 0;
if (dev->num_gpios == 8) {
Expand Down

0 comments on commit 72809a5

Please sign in to comment.