mirror of
https://github.com/Anshorei/epd-waveshare.git
synced 2026-10-04 06:16:42 +00:00
updated version to v0.2 of embedded_hal, but broke f3 example
This commit is contained in:
@@ -4,13 +4,14 @@ version = "0.1.0"
|
||||
authors = ["Christoph Groß <christoph.gross@student.uni-tuebingen.de>"]
|
||||
|
||||
[dependencies]
|
||||
f3 = "0.5.3"
|
||||
cortex-m = {version = "0.4.3"}
|
||||
f3 = "0.6.0"
|
||||
cortex-m = {version = "0.5.2"}
|
||||
|
||||
eink_waveshare_rs = { git = "https://github.com/Caemor/eink-waveshare-rs"}
|
||||
#eink_waveshare_rs = { git = "https://github.com/Caemor/eink-waveshare-rs"}
|
||||
eink_waveshare_rs = { path = "../../"}
|
||||
|
||||
# only temporary until Digital::InputPin has arrived in f3
|
||||
embedded-hal = { version = "0.1.2", features = ["unproven"] }
|
||||
embedded-hal = { version = "0.2.1", features = ["unproven"] }
|
||||
|
||||
# for #no_std
|
||||
panic-abort = "0.1.1"
|
||||
|
||||
@@ -26,11 +26,11 @@ use hal::digital::{InputPin, OutputPin};
|
||||
|
||||
//from https://github.com/rudihorn/max31865/tree/extra_examples/examples
|
||||
struct HackInputPin<'a> {
|
||||
pin: &'a OutputPin
|
||||
pin: &'a Pin
|
||||
}
|
||||
|
||||
impl<'a> HackInputPin<'a> {
|
||||
fn new(p : &'a OutputPin) -> HackInputPin {
|
||||
fn new(p : &'a Pin) -> HackInputPin {
|
||||
HackInputPin {
|
||||
pin: p
|
||||
}
|
||||
@@ -75,7 +75,7 @@ fn main() {
|
||||
//TODO: Fix when f3::hal includes Digital::InputPin
|
||||
//using the hack from rudihorn that Digital::OutputPin basically
|
||||
//contains the needed functions for Digital::InputPin
|
||||
let busy = gpioe.pe4.into_push_pull_output(&mut gpioe.moder, &mut gpioe.otyper);
|
||||
let busy = gpioe.pe4.into_floating_input(&mut gpioe.moder, &mut gpioe.pupdr);
|
||||
let busy_in = HackInputPin::new(&busy);
|
||||
|
||||
let dc = gpioe.pe5.into_push_pull_output(&mut gpioe.moder, &mut gpioe.otyper);
|
||||
|
||||
Reference in New Issue
Block a user