OLED driver with shared SPI bus integrated
This commit was merged in pull request #35.
This commit is contained in:
+8
-4
@@ -1,3 +1,6 @@
|
||||
use embedded_graphics::draw_target::DrawTarget;
|
||||
use embedded_graphics::pixelcolor::Rgb565;
|
||||
|
||||
use crate::views::card_view::CardView;
|
||||
use crate::views::{
|
||||
journal_view::JournalView, main_menu::MainMenu, scan_menu::ScanMenu,
|
||||
@@ -16,10 +19,11 @@ pub enum View {
|
||||
}
|
||||
|
||||
impl Navigable for View {
|
||||
fn display(
|
||||
&self,
|
||||
display: &mut crate::display::primary_lcd::PrimaryLcdDisplay<'static>,
|
||||
) -> impl core::future::Future<Output = ()> + Send {
|
||||
fn display<D>(&self, display: &mut D) -> impl core::future::Future<Output = ()> + Send
|
||||
where
|
||||
D: DrawTarget<Color = Rgb565> + Send,
|
||||
D::Error: core::fmt::Debug,
|
||||
{
|
||||
async move {
|
||||
match self {
|
||||
View::Main(main_menu) => main_menu.display(display).await,
|
||||
|
||||
Reference in New Issue
Block a user