Updated to eh a6, delay not yet catched

This commit is contained in:
Caemor
2021-11-29 00:15:06 +01:00
parent 0c5a40579f
commit 9d0e78bc15
20 changed files with 99 additions and 154 deletions
+4 -8
View File
@@ -6,11 +6,7 @@
//! - [Waveshare C driver](https://github.com/waveshare/e-Paper/blob/master/RaspberryPi%26JetsonNano/c/lib/e-Paper/EPD_5in65f.c)
//! - [Waveshare Python driver](https://github.com/waveshare/e-Paper/blob/master/RaspberryPi%26JetsonNano/python/lib/waveshare_epd/epd5in65f.py)
use embedded_hal::{
blocking::{delay::*, spi::Write},
digital::v2::{InputPin, OutputPin},
};
use crate::eh_prelude::*;
use crate::color::OctColor;
use crate::interface::DisplayInterface;
use crate::traits::{InternalWiAdditions, RefreshLut, WaveshareDisplay};
@@ -48,7 +44,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayMs<u8>,
DELAY: DelayUs,
{
fn init(&mut self, spi: &mut SPI, delay: &mut DELAY) -> Result<(), SPI::Error> {
// Reset the device
@@ -81,7 +77,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayMs<u8>,
DELAY: DelayUs,
{
type DisplayColor = OctColor;
fn new(
@@ -205,7 +201,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayMs<u8>,
DELAY: DelayUs,
{
fn command(&mut self, spi: &mut SPI, command: Command) -> Result<(), SPI::Error> {
self.interface.cmd(spi, command)