Skip to content

Commit

Permalink
--wip-- [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
jamwaffles committed Jun 25, 2022
1 parent 8b51812 commit c725190
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/graphics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use embedded_graphics::{
primitives::{Circle, Line, PrimitiveStyle, Rectangle},
};
use panic_semihosting as _;
use sh1106::{prelude::*, Builder};
use sh1106::{mode::graphics::Clear, prelude::*, Builder};
use stm32f1xx_hal::{
i2c::{BlockingI2c, DutyCycle, Mode},
prelude::*,
Expand Down Expand Up @@ -66,7 +66,9 @@ fn main() -> ! {
let mut display: GraphicsMode<_> = Builder::new().connect_i2c(i2c).into();

display.init().unwrap();
display.flush().unwrap();
display.clear(Clear::BufferAndDisplay).unwrap();

display.set_rotation(DisplayRotation::Rotate90).unwrap();

Line::new(Point::new(8, 16 + 16), Point::new(8 + 16, 16 + 16))
.into_styled(PrimitiveStyle::with_stroke(BinaryColor::On, 1))
Expand Down

0 comments on commit c725190

Please sign in to comment.