Fixed typos

This commit is contained in:
JP Stringham
2025-12-28 10:42:56 -05:00
parent 5ce004d219
commit 0c4347879b
2 changed files with 6 additions and 6 deletions

View File

@@ -65,8 +65,8 @@ fn main() -> ! {
let mut led_pin = pins.gpio25.into_push_pull_output();
led_pin.set_high().unwrap();
let ssh1106_dev = sh1106_pico_rs::ssh1106::SSH1106Dev::new(&mut delay, &mut i2c);
println!("SSH1106 initialized.");
let sh1106_dev = sh1106_pico_rs::ssh1106::SH1106Dev::new(&mut delay, &mut i2c);
println!("SH1106 initialized.");
let mut gfx_buf = sh1106_pico_rs::graphics::GraphicsBuf::new();
@@ -74,7 +74,7 @@ fn main() -> ! {
gfx_buf.clear();
gfx_buf.redraw();
ssh1106_dev.blit_framebuffer(&mut i2c, &gfx_buf);
sh1106_dev.blit_framebuffer(&mut i2c, &gfx_buf);
delay.delay_ms(10);
}

View File

@@ -21,11 +21,11 @@ pub enum SH1106Cmd {
pub const SH1106_I2C_ADDR: u8 = 0x78u8 >> 1;
pub struct SSH1106Dev {
pub struct SH1106Dev {
ready: bool,
}
impl SSH1106Dev {
impl SH1106Dev {
pub fn new(delay: &mut Delay, mut i2c: &mut dyn I2c<Error = Error>) -> Self {
send_command(&mut i2c, &SH1106Cmd::DisplayOnOff, 0x00);
delay.delay_ms(100);
@@ -38,7 +38,7 @@ impl SSH1106Dev {
delay.delay_ms(500);
send_command(&mut i2c, &SH1106Cmd::DisplayOnOff, 0x01);
SSH1106Dev { ready: true }
SH1106Dev { ready: true }
}
pub fn blit_framebuffer(&self, i2c: &mut dyn I2c<Error = Error>, gfx_buf: &GraphicsBuf) {