aboutsummaryrefslogtreecommitdiffstats
path: root/sw
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2021-06-04 21:45:59 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2021-06-04 21:45:59 +0200
commit442709985fe3adfe9d2688167585ff37279d11b6 (patch)
treef6532ca1c11611c03b8c60ced7bfd7371de3caea /sw
parentaa2721cc8d0f71145e86019ef367377bd650fc0b (diff)
downloadpicardy-442709985fe3adfe9d2688167585ff37279d11b6.tar.gz
picardy-442709985fe3adfe9d2688167585ff37279d11b6.tar.bz2
picardy-442709985fe3adfe9d2688167585ff37279d11b6.zip
eval-clock: set CW freq to 1000Hz
Diffstat (limited to 'sw')
-rw-r--r--sw/eval-clock-cw-tx/src/cw.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/eval-clock-cw-tx/src/cw.rs b/sw/eval-clock-cw-tx/src/cw.rs
index 045ef15..337a3ab 100644
--- a/sw/eval-clock-cw-tx/src/cw.rs
+++ b/sw/eval-clock-cw-tx/src/cw.rs
@@ -10,13 +10,15 @@ use stm32f1xx_hal::{
pwm,
};
+const SIDETONE_FREQ : u32 = 1000;
+
pub struct CWPWM {
channel : pwm::PwmChannel<TIM1, pwm::C1>,
}
impl CWPWM {
pub fn new(pa8: PA8<Alternate<PushPull>>, tim1: timer::Timer<TIM1>, mapr: &mut MAPR) -> Self {
- let pwm = tim1.pwm(pa8, mapr, 400.hz());
+ let pwm = tim1.pwm(pa8, mapr, SIDETONE_FREQ.hz());
let mut channel = pwm.split();
channel.enable();
channel.set_duty(0);