Hi,
I'm not sure if this is expected, but it at least looks "weird" to me. The issue is that my Input, even though marked as Floating, doesn't work out of the box, only if I call into_floating_input explicitly on it.
So, consider this code:
let peripherals = Peripherals::take().unwrap();
let port1 = p1::Parts::new(peripherals.P1);
let external_temp_sensor = Tsic::new(port1.p1_08.into_floating_input().degrade());
This work as expected (my Tsic takes Pin<Input<Floating>> as an argument). But if I do it like this, it compiles, but I'll never get the high and low states of the pin:
let peripherals = Peripherals::take().unwrap();
let port1 = p1::Parts::new(peripherals.P1);
let external_temp_sensor = Tsic::new(port1.p1_08.degrade());
Would it be possible that the port on the peripheral is neither Floating, nor PullDown or PullUp but it would always have to be turned into one of these types? This would make it explicit that it needs to be called, I couldn't figure out why my sensor didn't work and only stumbled on this by trial and error. Or is there something else going on that I'm missing?
Hi,
I'm not sure if this is expected, but it at least looks "weird" to me. The issue is that my Input, even though marked as Floating, doesn't work out of the box, only if I call
into_floating_inputexplicitly on it.So, consider this code:
This work as expected (my
TsictakesPin<Input<Floating>>as an argument). But if I do it like this, it compiles, but I'll never get the high and low states of the pin:Would it be possible that the port on the peripheral is neither
Floating, norPullDownorPullUpbut it would always have to be turnedintoone of these types? This would make it explicit that it needs to be called, I couldn't figure out why my sensor didn't work and only stumbled on this by trial and error. Or is there something else going on that I'm missing?