Skip to content

Commit

Permalink
Refactored eeink driver
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler-potyondy committed Sep 11, 2024
1 parent f4c67db commit e68f5c1
Show file tree
Hide file tree
Showing 3 changed files with 210 additions and 643 deletions.
5 changes: 0 additions & 5 deletions boards/components/src/epaper_v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use capsules_core::virtualizers::virtual_alarm::{MuxAlarm, VirtualMuxAlarm};
use capsules_core::virtualizers::virtual_spi::VirtualSpiMasterDevice;
use capsules_extra::usb::usbc_client::Client;
use core::mem::MaybeUninit;
use kernel::component::Component;
use kernel::hil::spi::{SpiMaster, SpiMasterDevice};
Expand Down Expand Up @@ -60,7 +59,6 @@ pub struct EPaperV2Component<
spi_device: &'static capsules_core::virtualizers::virtual_spi::MuxSpiMaster<'static, S>,
gpio: &'static G,
chip_select: S::ChipSelect,
use_charge_pump: bool,
gpio_busy: &'static GI,
gpio_reset: &'static G,
mux_alarm: &'static MuxAlarm<'static, A>,
Expand All @@ -77,7 +75,6 @@ impl<
spi_device: &'static capsules_core::virtualizers::virtual_spi::MuxSpiMaster<'static, S>,
gpio: &'static G,
chip_select: S::ChipSelect,
use_charge_pump: bool,
gpio_busy: &'static GI,
gpio_reset: &'static G,
mux_alarm: &'static MuxAlarm<'static, A>,
Expand All @@ -86,7 +83,6 @@ impl<
spi_device,
gpio,
chip_select,
use_charge_pump,
gpio_busy,
gpio_reset,
mux_alarm,
Expand Down Expand Up @@ -143,7 +139,6 @@ impl<
eeink_spi,
self.gpio,
buffer,
self.use_charge_pump,
self.gpio_busy,
self.gpio_reset,
epaper_virtual_alarm,
Expand Down
4 changes: 1 addition & 3 deletions boards/nordic/nrf52840dk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ use capsules_core::virtualizers::virtual_alarm::VirtualMuxAlarm;
use capsules_extra::net::ieee802154::MacAddress;
use capsules_extra::net::ipv6::ip_utils::IPAddr;
use kernel::component::Component;
use kernel::hil::gpio::{Configure, Interrupt};
use kernel::hil::gpio::Configure;
use kernel::hil::led::LedLow;
use kernel::hil::time::Counter;
#[allow(unused_imports)]
Expand Down Expand Up @@ -743,7 +743,6 @@ pub unsafe fn start() -> (
epaper_v2_spi,
&gpio_port[Pin::P1_04],
&gpio_port[Pin::P1_05],
true,
&gpio_port[Pin::P1_06],
&gpio_port[Pin::P1_07],
mux_alarm,
Expand Down Expand Up @@ -975,6 +974,5 @@ pub unsafe fn start() -> (
debug!("{}", &*addr_of!(nrf52840::ficr::FICR_INSTANCE));

epaper_v2.test_init();
epaper_v2.init_screen();
(board_kernel, platform, chip, base_peripherals)
}
Loading

0 comments on commit e68f5c1

Please sign in to comment.