esp-pwm.c 798 B

12345678910111213141516171819202122232425262728293031323334
  1. #include <stdint.h>
  2. #include "esp_log.h"
  3. #include "freertos/FreeRTOS.h" // IWYU pragma: keep
  4. #include "freertos/projdefs.h"
  5. #include "freertos/task.h"
  6. #include "freq_slider.h"
  7. #include "un.h"
  8. extern const uint32_t init_buzzer_freq;
  9. const char* TAG = "MAIN_C";
  10. void app_main() {
  11. ESP_LOGI(TAG, "BOOT");
  12. // Only enable one task at a time.
  13. // if (xTaskCreate(freq_slider_task, "freq_slider_task", 4096, NULL, tskIDLE_PRIORITY,
  14. // NULL) == pdFALSE) {
  15. // ESP_LOGE(TAG, "Failed to create freq_slider_task.");
  16. // }
  17. if (xTaskCreate(un_task, "un_task", 4096, NULL, tskIDLE_PRIORITY,
  18. NULL) == pdFALSE) {
  19. ESP_LOGE(TAG, "Failed to create un_task.");
  20. }
  21. while (true) {
  22. vTaskDelay(pdMS_TO_TICKS(10000));
  23. }
  24. }