main.c 655 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Project: Arrow
  3. * Author: curiousmuch
  4. */
  5. #include <stdio.h>
  6. #include "freertos/FreeRTOS.h"
  7. #include "freertos/task.h"
  8. #include "driver/gpio.h"
  9. #include "sdkconfig.h"
  10. #include "esp_task_wdt.h"
  11. #include "cc1120.h"
  12. #include "cc1120_protocol.h"
  13. #include "board.h"
  14. extern uint8_t tx_symbol;
  15. extern uint8_t sample_count;
  16. void IRAM_ATTR app_main()
  17. {
  18. cc1120_radio_init(CW_SETTINGS, sizeof(CW_SETTINGS)/sizeof(cc1120_reg_settings_t));
  19. vTaskDelay(500/portTICK_PERIOD_MS);
  20. cc1120_radio_APRSTXPacket();
  21. while(1)
  22. {
  23. if (sample_count == 11)
  24. {
  25. tx_symbol = tx_symbol ^ 1;
  26. //tx_symbol = 1;
  27. sample_count = 0;
  28. }
  29. esp_task_wdt_reset();
  30. }
  31. }