aboutsummaryrefslogtreecommitdiffstats
path: root/sw/eval-clock-cw-tx/src/main.rs
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2021-04-02 10:42:04 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2021-04-02 10:42:04 +0200
commit74792bbed5ba8028550238dde2a12eec715d4055 (patch)
treebe91575b810b5f4b88e9fc9722e11dd18ec919e2 /sw/eval-clock-cw-tx/src/main.rs
parent62fdd309c55286222d1add4ca3051353da0e11b8 (diff)
downloadpicardy-74792bbed5ba8028550238dde2a12eec715d4055.tar.gz
picardy-74792bbed5ba8028550238dde2a12eec715d4055.tar.bz2
picardy-74792bbed5ba8028550238dde2a12eec715d4055.zip
Make cw key active low
Diffstat (limited to 'sw/eval-clock-cw-tx/src/main.rs')
-rw-r--r--sw/eval-clock-cw-tx/src/main.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/eval-clock-cw-tx/src/main.rs b/sw/eval-clock-cw-tx/src/main.rs
index d30318b..a548f81 100644
--- a/sw/eval-clock-cw-tx/src/main.rs
+++ b/sw/eval-clock-cw-tx/src/main.rs
@@ -60,7 +60,7 @@ struct SharedWithISR {
state : State,
last_sequence_state_change : u32,
cw_ptt_timestamp : u32,
- cw_key_out : gpio::gpioa::PA15<gpio::Output<gpio::PushPull>>,
+ cw_key_out_n : gpio::gpioa::PA15<gpio::Output<gpio::PushPull>>,
ui : ui::UI,
cw_pwm: cw::CWPWM,
cw_keyer: cw::Keyer,
@@ -135,7 +135,7 @@ fn main() -> ! {
led.set_low().unwrap();
let (pa15, pb3, _pb4) = afio.mapr.disable_jtag(gpioa.pa15, gpiob.pb3, gpiob.pb4);
- let cw_key_out = pa15.into_push_pull_output_with_state(&mut gpioa.crh, gpio::State::Low);
+ let cw_key_out_n = pa15.into_push_pull_output_with_state(&mut gpioa.crh, gpio::State::High);
let ptt_out = pb3.into_push_pull_output_with_state(&mut gpiob.crl, gpio::State::Low);
let c1 = gpioa.pa6;
@@ -192,7 +192,7 @@ fn main() -> ! {
state : State::new(),
last_sequence_state_change : 0,
cw_ptt_timestamp : 0,
- cw_key_out,
+ cw_key_out_n,
ui,
cw_pwm,
cw_keyer : cw::Keyer::new(12, TICKS_PER_SECOND),
@@ -340,16 +340,16 @@ fn TIM2() {
SequenceState::TxCW => {
if cw_beep {
shared.cw_pwm.on();
- shared.cw_key_out.set_high().unwrap();
+ shared.cw_key_out_n.set_low().unwrap();
}
else {
shared.cw_pwm.off();
- shared.cw_key_out.set_low().unwrap();
+ shared.cw_key_out_n.set_high().unwrap();
}
},
_ => {
shared.cw_pwm.off();
- shared.cw_key_out.set_low().unwrap();
+ shared.cw_key_out_n.set_high().unwrap();
},
}