ported into a generic library

This commit is contained in:
Priec
2026-01-19 15:53:19 +01:00
parent 9910bf9402
commit 2774e83d99
3 changed files with 17 additions and 28 deletions

View File

@@ -5,19 +5,17 @@ use esp_hal::{
i2c::master::{Config, I2c},
peripherals::Peripherals,
};
use ssd1306::mode::BufferedGraphicsMode;
use mousefood::{EmbeddedBackend, EmbeddedBackendConfig};
use ratatui::{
layout::{Constraint, Direction, Layout},
widgets::{Block, Borders, Paragraph},
Terminal,
};
use ssd1306::{prelude::*, I2CDisplayInterface, Ssd1306, mode::BufferedGraphicsMode};
use log::info;
#[embassy_executor::task]
pub async fn display_task() {
use mousefood::{EmbeddedBackend, EmbeddedBackendConfig};
use ratatui::{
layout::{Constraint, Direction, Layout},
widgets::{Block, Borders, Paragraph},
Terminal,
};
use ssd1306::{prelude::*, I2CDisplayInterface, Ssd1306};
let peripherals = unsafe { Peripherals::steal() };
let i2c = I2c::new(peripherals.I2C0, Config::default())