added right orientation to display
This commit is contained in:
@@ -13,7 +13,12 @@ use embedded_graphics::prelude::DrawTargetExt;
|
||||
use embedded_hal_bus::spi::ExclusiveDevice;
|
||||
use gpio::{Level, Output};
|
||||
use log::error;
|
||||
use mipidsi::{Builder, interface::SpiInterface, models::ST7789};
|
||||
use mipidsi::{
|
||||
Builder,
|
||||
interface::SpiInterface,
|
||||
models::ST7789,
|
||||
options::{Orientation, Rotation},
|
||||
};
|
||||
|
||||
use crate::display::CoMoDisplay;
|
||||
|
||||
@@ -70,6 +75,7 @@ async fn main(spawner: Spawner) {
|
||||
|
||||
let mut display = Builder::new(ST7789, di)
|
||||
.display_size(240, 320)
|
||||
.orientation(Orientation::new().rotate(Rotation::Deg90))
|
||||
.init(&mut embassy_time::Delay)
|
||||
.unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user