diff --git a/src/main.c b/src/main.c --- a/src/main.c +++ b/src/main.c @@ -15,7 +15,6 @@ void sysclk_init(void); -//#define WSPR_DEFAULT_FREQ 14097100UL #define WSPR_DEFAULT_FREQ 10140100UL #define WSPR_TONE_SPACING 146 // ~1.46 Hz #define WSPR_CTC 10672 // CTC value for WSPR @@ -34,31 +33,29 @@ volatile uint8_t proceed = 0; void encode_wspr(void) { - uint8_t i; - //for(i=0; i<255; i++) - // tx_buffer[i] = 0; - + // Encode message to transmit wspr_encode(call, loc, dbm, tx_buffer); + // Key transmitter + si5351_output_enable(SI5351_CLK0, 1); - //si5351_output_enable(SI5351_CLK0, 1); - + // Loop through and transmit symbols TODO: Do this from an ISR or ISR-triggered main loop function call (optimal) + uint8_t i; for(i=0; i 6000) + if(HAL_GetTick() - last_wspr > 120000) { + encode_wspr(); last_wspr = HAL_GetTick(); }