From d443fd17614a1e5f3319eafe25dd0c0d8c1b3e99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Hamal=20Dvo=C5=99=C3=A1k?= Date: Sun, 25 Feb 2024 23:16:25 +0100 Subject: [PATCH] Experiment with TX bursts --- src/main.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/main.c b/src/main.c index 6950eca..99421a7 100644 --- a/src/main.c +++ b/src/main.c @@ -893,6 +893,12 @@ static void command(const char *cmd) } else if ('-' == c) { actual = rx_lo_init(actual - step_hz); printf("Frequency: %.0f\n", actual); + } else if ((c >= '1') && (c <= '9')) { + for (int i = 0; i < 1000; i++) { + phase = !phase; + gpio_set_outover(n, phase); + sleep_us(1000 / (c - '0')); + } } } @@ -932,6 +938,20 @@ static void command(const char *cmd) } else if ('-' == c) { f = tx_fsk_lo_init(f - step_hz, g); printf("Frequency: %.0f +/- %.f\n", f, g / 2.0f); + } else if ((c >= '1') && (c <= '9')) { + for (int i = 0; i < 1000; i++) { + high = !high; + + if (high) { + dma_hw->ch[dma_ch_tx_cos].read_addr = + (uint32_t)lo_cos; + } else { + dma_hw->ch[dma_ch_tx_cos].read_addr = + (uint32_t)lo_sin; + } + + sleep_us(1000 / (c - '0')); + } } }