# HG changeset patch # User Ethan Zonca # Date 2016-03-07 20:00:41 # Node ID f76c13fc82996c2915352c22ab1f3a6e495eccdf # Parent 9becfc2d0fd14ae3bb874693150856695ec8afc7 Cycle through different tones son the si5351 diff --git a/src/main.c b/src/main.c --- a/src/main.c +++ b/src/main.c @@ -11,12 +11,45 @@ void sysclk_init(void); #define WSPR_DEFAULT_FREQ 14097100UL +#define WSPR_TONE_SPACING 146 // ~1.46 Hz +#define WSPR_CTC 10672 // CTC value for WSPR char call[7] = "N0CALL"; char loc[5] = "AA00"; uint8_t dbm = 27; uint8_t tx_buffer[255]; + +uint32_t freq = WSPR_DEFAULT_FREQ; +uint8_t symbol_count = WSPR_SYMBOL_COUNT; +uint16_t ctc = WSPR_CTC; +uint16_t tone_spacing = WSPR_TONE_SPACING; +volatile uint8_t proceed = 0; + +void encode_wspr(void) +{ + uint8_t i; + //for(i=0; i<255; i++) + // tx_buffer[i] = 0; + + wspr_encode(call, loc, dbm, tx_buffer); + + + //si5351_output_enable(SI5351_CLK0, 1); + + for(i=0; i 6000) + { + last_wspr = HAL_GetTick(); + } + if(HAL_GetTick() - led_timer > 100) { - HAL_GPIO_TogglePin(LED_BLUE); + //HAL_GPIO_TogglePin(LED_BLUE); led_timer = HAL_GetTick(); } if(HAL_GetTick() - last_gps > 100)