updated version to v0.2 of embedded_hal, but broke f3 example

This commit is contained in:
Christoph Groß
2018-05-22 12:02:03 +02:00
parent ba5d44a1d7
commit aff8b83ac3
5 changed files with 21 additions and 16 deletions
+3 -3
View File
@@ -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);