- Made Connectioninterface public in root module,
- fixed the example (which needed updated dependencies)embedded-hal-1.0
parent
49bad9c547
commit
7758e37e1a
|
|
@ -6,11 +6,10 @@ extern crate eink_waveshare_rs;
|
||||||
|
|
||||||
|
|
||||||
use eink_waveshare_rs::{
|
use eink_waveshare_rs::{
|
||||||
epd4in2::{EPD4in2, self},
|
EPD4in2,
|
||||||
drawing::{Graphics, color::Color},
|
drawing::{Graphics, color::Color},
|
||||||
interface::{
|
WaveshareInterface,
|
||||||
WaveshareInterface,
|
ConnectionInterface
|
||||||
connection_interface::ConnectionInterface},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use lin_hal::spidev::{self, SpidevOptions};
|
use lin_hal::spidev::{self, SpidevOptions};
|
||||||
|
|
@ -106,7 +105,7 @@ fn main() {
|
||||||
//TODO: wait for Digital::InputPin
|
//TODO: wait for Digital::InputPin
|
||||||
//fixed currently with the HackInputPin, see further above
|
//fixed currently with the HackInputPin, see further above
|
||||||
let connection_interface = ConnectionInterface::new(spi, cs, busy_in, dc, rst, delay);
|
let connection_interface = ConnectionInterface::new(spi, cs, busy_in, dc, rst, delay);
|
||||||
let mut epd4in2 = EPD4in2::new(connection_interface, epd4in2::new()).expect("eink inialize error");
|
let mut epd4in2 = EPD4in2::new(connection_interface).expect("eink inialize error");
|
||||||
|
|
||||||
//let mut buffer = [0u8, epd4in2.get_width() / 8 * epd4in2.get_height()];
|
//let mut buffer = [0u8, epd4in2.get_width() / 8 * epd4in2.get_height()];
|
||||||
let mut buffer = [0u8; 15000];
|
let mut buffer = [0u8; 15000];
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,9 @@ use hal::{
|
||||||
pub mod drawing;
|
pub mod drawing;
|
||||||
|
|
||||||
mod interface;
|
mod interface;
|
||||||
pub use interface::{WaveshareInterface};
|
pub use interface::{
|
||||||
|
WaveshareInterface,
|
||||||
|
connection_interface::ConnectionInterface};
|
||||||
|
|
||||||
#[cfg(feature="epd4in2")]
|
#[cfg(feature="epd4in2")]
|
||||||
mod epd4in2;
|
mod epd4in2;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue