Rename display type aliases
This commit is contained in:
@@ -8,10 +8,10 @@ use esp_hal::gpio::Output;
|
||||
|
||||
use crate::display::shared_bus::{DisplaySpiBus, SharedOutput, SharedReset};
|
||||
|
||||
pub type SecondaryOledDisplay<'a, BUS, RST, DC> =
|
||||
pub type GenericSecondaryDisplay<'a, BUS, RST, DC> =
|
||||
Ch1115<SPIInterface<AtomicDevice<'a, BUS, Output<'a>, Delay>, DC>, RST, Size128x64>;
|
||||
pub type DualSecondaryDisplay<'a> =
|
||||
SecondaryOledDisplay<'a, DisplaySpiBus, SharedReset<'a>, SharedOutput<'a>>;
|
||||
pub type SecondaryDisplay<'a> =
|
||||
GenericSecondaryDisplay<'a, DisplaySpiBus, SharedReset<'a>, SharedOutput<'a>>;
|
||||
|
||||
pub struct SecondaryDisplayPinConfiguration<'a> {
|
||||
pub spi_bus: &'a AtomicCell<DisplaySpiBus>,
|
||||
@@ -21,7 +21,7 @@ pub struct SecondaryDisplayPinConfiguration<'a> {
|
||||
}
|
||||
|
||||
impl<'a> SecondaryDisplayPinConfiguration<'a> {
|
||||
pub fn build(self) -> [DualSecondaryDisplay<'a>; 3] {
|
||||
pub fn build(self) -> [SecondaryDisplay<'a>; 3] {
|
||||
let mut displays = self.cs_pins.map(|cs| {
|
||||
let spi_dev = AtomicDevice::new(self.spi_bus, cs, Delay::new()).unwrap();
|
||||
let interface = SPIInterface::new(spi_dev, self.dc.clone());
|
||||
@@ -36,7 +36,7 @@ impl<'a> SecondaryDisplayPinConfiguration<'a> {
|
||||
}
|
||||
|
||||
fn init_single_reset<'a: 'b, 'b>(
|
||||
displays: impl IntoIterator<Item = &'b mut DualSecondaryDisplay<'a>>,
|
||||
displays: impl IntoIterator<Item = &'b mut SecondaryDisplay<'a>>,
|
||||
shared_reset: SharedReset<'a>,
|
||||
) {
|
||||
let mut displays = displays.into_iter().peekable();
|
||||
|
||||
Reference in New Issue
Block a user