Moved type_a LUTs to type_a mod.rs ,

updated dependencies accordingly
digi-v2-tests
Christoph Groß 5 years ago
parent 6422142133
commit 5dbf873631

@ -35,9 +35,11 @@ use hal::{
digital::*
};
use type_a::luts::*;
pub use type_a::command::Command;
use type_a::{
LUT_FULL_UPDATE,
LUT_PARTIAL_UPDATE,
command::Command
};
use drawing::color::Color;
@ -53,7 +55,7 @@ use interface::connection_interface::ConnectionInterface;
/// EPD2in9 driver
///
pub struct EPD2in9<SPI, CS, BUSY, DataCommand, RST, Delay> {
pub struct EPD1in54<SPI, CS, BUSY, DataCommand, RST, Delay> {
/// SPI
interface: ConnectionInterface<SPI, CS, BUSY, DataCommand, RST, Delay>,
/// EPD (width, height)
@ -62,7 +64,7 @@ pub struct EPD2in9<SPI, CS, BUSY, DataCommand, RST, Delay> {
background_color: Color,
}
impl<SPI, CS, BUSY, DataCommand, RST, Delay, E> EPD2in9<SPI, CS, BUSY, DataCommand, RST, Delay>
impl<SPI, CS, BUSY, DataCommand, RST, Delay, E> EPD1in54<SPI, CS, BUSY, DataCommand, RST, Delay>
where
SPI: Write<u8, Error = E>,
CS: OutputPin,
@ -76,7 +78,7 @@ where
impl<SPI, CS, BUSY, DataCommand, RST, Delay, E> WaveshareInterface<SPI, CS, BUSY, DataCommand, RST, Delay, E>
for EPD2in9<SPI, CS, BUSY, DataCommand, RST, Delay>
for EPD1in54<SPI, CS, BUSY, DataCommand, RST, Delay>
where
SPI: Write<u8, Error = E>,
CS: OutputPin,
@ -101,7 +103,7 @@ where
let epd = EPD::new(WIDTH, HEIGHT);
let background_color = Color::White;
let mut epd = EPD2in9 {interface, /*epd,*/ background_color};
let mut epd = EPD1in54 {interface, /*epd,*/ background_color};
epd.init()?;
@ -231,7 +233,7 @@ where
}
impl<SPI, CS, BUSY, DC, RST, D, E> EPD2in9<SPI, CS, BUSY, DC, RST, D>
impl<SPI, CS, BUSY, DC, RST, D, E> EPD1in54<SPI, CS, BUSY, DC, RST, D>
where
SPI: Write<u8, Error = E>,
CS: OutputPin,

@ -34,8 +34,11 @@ use hal::{
};
use type_a::luts::*;
pub use type_a::command::Command;
use type_a::{
LUT_FULL_UPDATE,
LUT_PARTIAL_UPDATE,
command::Command
};
use drawing::color::Color;

@ -1,14 +0,0 @@
// Original Waveforms from Waveshare
pub(crate) const LUT_FULL_UPDATE: [u8; 30] =[
0x02, 0x02, 0x01, 0x11, 0x12, 0x12, 0x22, 0x22,
0x66, 0x69, 0x69, 0x59, 0x58, 0x99, 0x99, 0x88,
0x00, 0x00, 0x00, 0x00, 0xF8, 0xB4, 0x13, 0x51,
0x35, 0x51, 0x51, 0x19, 0x01, 0x00
];
pub(crate) const LUT_PARTIAL_UPDATE: [u8; 30] =[
0x10, 0x18, 0x18, 0x08, 0x18, 0x18, 0x08, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x13, 0x14, 0x44, 0x12,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
];
Loading…
Cancel
Save