Skip to content

Commit c725190

Browse files
committed
--wip-- [skip ci]
1 parent 8b51812 commit c725190

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

examples/graphics.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use embedded_graphics::{
2424
primitives::{Circle, Line, PrimitiveStyle, Rectangle},
2525
};
2626
use panic_semihosting as _;
27-
use sh1106::{prelude::*, Builder};
27+
use sh1106::{mode::graphics::Clear, prelude::*, Builder};
2828
use stm32f1xx_hal::{
2929
i2c::{BlockingI2c, DutyCycle, Mode},
3030
prelude::*,
@@ -66,7 +66,9 @@ fn main() -> ! {
6666
let mut display: GraphicsMode<_> = Builder::new().connect_i2c(i2c).into();
6767

6868
display.init().unwrap();
69-
display.flush().unwrap();
69+
display.clear(Clear::BufferAndDisplay).unwrap();
70+
71+
display.set_rotation(DisplayRotation::Rotate90).unwrap();
7072

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

0 commit comments

Comments
 (0)