Recover from init fail

This commit was merged in pull request #46.
This commit is contained in:
2026-08-29 18:17:25 +02:00
parent 92c20d61cb
commit 282bcd163c
4 changed files with 58 additions and 36 deletions
+2 -2
View File
@@ -135,7 +135,7 @@ where
RES2: OutputPin + 'static,
DC: OutputPin + 'static,
{
pub fn build(self) -> (PrimaryDisplay<'static>, [SecondaryDisplay<'static>; 3]) {
pub fn build(self) -> Result<(PrimaryDisplay<'static>, [SecondaryDisplay<'static>; 3]), Self> {
let spi = Spi::new(
self.spi_peripheral,
SpiConfig::default()
@@ -178,7 +178,7 @@ where
}
.build();
(primary, secondaries)
Ok((primary, secondaries))
}
}