use embedded_graphics::{ mono_font::{MonoTextStyle, ascii::{FONT_9X18_BOLD, FONT_10X20}}, pixelcolor::BinaryColor, prelude::{DrawTarget, Point, *}, text::Text, }; pub struct CoMoDisplay> { display: D, } impl> CoMoDisplay { pub fn new(display: D) -> Self { Self { display } } pub fn draw(&mut self) -> Result<(), D::Error> { let text_style = MonoTextStyle::new(&FONT_10X20, BinaryColor::On); self.display.clear(BinaryColor::Off)?; Text::new("18,6 Ips", Point::new(50, 40), text_style).draw(&mut self.display)?; Ok(()) } }