Skip to content

Commit

Permalink
capsules: ssd1306: fix column command fmt
Browse files Browse the repository at this point in the history
Setting the upper and lower bits are two separate commands, and there
should be a shift as the upper bits are set in the lower four bits of
the command.

We aren't using this command in the current driver, so I didn't notice
this issue.
  • Loading branch information
bradjc committed Mar 29, 2024
1 parent 2eafd62 commit f8c3508
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion capsules/extra/src/ssd1306.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ impl Command {
1
}
Self::SetHigherColumnStartAddress { address } => {
buffer[0] = 0x10 | (address & 0xF);
buffer[0] = 0x10 | ((address >> 4) & 0xF);
1
}
Self::SetMemoryAddressingMode { mode } => {
Expand Down

0 comments on commit f8c3508

Please sign in to comment.