OLED driver with shared SPI bus integrated

This commit was merged in pull request #35.
This commit is contained in:
2026-08-22 22:46:09 +02:00
committed by ede1998
parent 71db893551
commit 9cd595acfe
19 changed files with 312 additions and 123 deletions
+7 -10
View File
@@ -1,19 +1,17 @@
use embedded_graphics::Drawable;
use embedded_graphics::draw_target::DrawTarget;
use embedded_graphics::mono_font::MonoTextStyle;
use embedded_graphics::mono_font::ascii::FONT_10X20;
use embedded_graphics::pixelcolor::Rgb565;
use embedded_graphics::prelude::Point;
use embedded_graphics::prelude::RgbColor;
use embedded_graphics::text::Text;
use embedded_graphics::Drawable;
use crate::display::primary_lcd::PrimaryLcdDisplay;
pub fn show<'a>(
display: &mut PrimaryLcdDisplay<'static>,
name: &str,
position: i32,
selected: i32,
) {
pub fn show<'a, D>(display: &mut D, name: &str, position: i32, selected: i32)
where
D: DrawTarget<Color = Rgb565>,
D::Error: core::fmt::Debug,
{
let style = MonoTextStyle::new(&FONT_10X20, Rgb565::WHITE);
let selected_style = MonoTextStyle::new(&FONT_10X20, Rgb565::BLUE);
@@ -29,4 +27,3 @@ pub fn show<'a>(
.draw(display)
.unwrap();
}