diff --git a/src/main.rs b/src/main.rs index 7c686e9..25bcea5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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); } diff --git a/src/ssh1106.rs b/src/ssh1106.rs index ae5edf7..5fa2bca 100644 --- a/src/ssh1106.rs +++ b/src/ssh1106.rs @@ -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) -> 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, gfx_buf: &GraphicsBuf) {