statusled.h 682 B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #ifndef STATUSLED_H
  3. #define STATUSLED_H
  4. #include "freertos/FreeRTOS.h"
  5. #include "freertos/task.h"
  6. extern TaskHandle_t xHandle_task_StatusLED;
  7. enum StatusLedSource
  8. {
  9. WLAN_CONN = 1,
  10. WLAN_INIT = 2,
  11. SDCARD_INIT = 3,
  12. SDCARD_CHECK = 4,
  13. CAM_INIT = 5,
  14. PSRAM_INIT = 6,
  15. TIME_CHECK = 7,
  16. AP_OR_OTA = 8
  17. };
  18. struct StatusLEDData
  19. {
  20. int iSourceBlinkCnt = 1;
  21. int iCodeBlinkCnt = 1;
  22. int iBlinkTime = 250;
  23. bool bInfinite = false;
  24. bool bProcessingRequest = false;
  25. };
  26. void set_status_led(StatusLedSource _eSource, int _iCode, bool _bInfinite);
  27. void set_status_led_off(void);
  28. #endif // STATUSLED_H