mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 00:02:28 +00:00
nrf/pwm: disconnect input.
This commit is contained in:
parent
fff304b3de
commit
f51ee98aef
@ -132,6 +132,7 @@ impl<'d, T: Instance> SequencePwm<'d, T> {
|
||||
pin.set_low();
|
||||
pin.conf().write(|w| {
|
||||
w.set_dir(gpiovals::Dir::OUTPUT);
|
||||
w.set_input(gpiovals::Input::DISCONNECT);
|
||||
w.set_drive(convert_drive(config.ch0_drive));
|
||||
});
|
||||
}
|
||||
@ -139,6 +140,7 @@ impl<'d, T: Instance> SequencePwm<'d, T> {
|
||||
pin.set_low();
|
||||
pin.conf().write(|w| {
|
||||
w.set_dir(gpiovals::Dir::OUTPUT);
|
||||
w.set_input(gpiovals::Input::DISCONNECT);
|
||||
w.set_drive(convert_drive(config.ch1_drive));
|
||||
});
|
||||
}
|
||||
@ -146,6 +148,7 @@ impl<'d, T: Instance> SequencePwm<'d, T> {
|
||||
pin.set_low();
|
||||
pin.conf().write(|w| {
|
||||
w.set_dir(gpiovals::Dir::OUTPUT);
|
||||
w.set_input(gpiovals::Input::DISCONNECT);
|
||||
w.set_drive(convert_drive(config.ch2_drive));
|
||||
});
|
||||
}
|
||||
@ -153,6 +156,7 @@ impl<'d, T: Instance> SequencePwm<'d, T> {
|
||||
pin.set_low();
|
||||
pin.conf().write(|w| {
|
||||
w.set_dir(gpiovals::Dir::OUTPUT);
|
||||
w.set_input(gpiovals::Input::DISCONNECT);
|
||||
w.set_drive(convert_drive(config.ch3_drive));
|
||||
});
|
||||
}
|
||||
@ -679,7 +683,12 @@ impl<'d, T: Instance> SimplePwm<'d, T> {
|
||||
for (i, ch) in [&ch0, &ch1, &ch2, &ch3].into_iter().enumerate() {
|
||||
if let Some(pin) = ch {
|
||||
pin.set_low();
|
||||
pin.conf().write(|w| w.set_dir(gpiovals::Dir::OUTPUT));
|
||||
|
||||
pin.conf().write(|w| {
|
||||
w.set_dir(gpiovals::Dir::OUTPUT);
|
||||
w.set_input(gpiovals::Input::DISCONNECT);
|
||||
w.set_drive(gpiovals::Drive::S0S1);
|
||||
});
|
||||
}
|
||||
r.psel().out(i).write_value(ch.psel_bits());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user