statusled.h 662 B

12345678910111213141516171819202122232425262728293031323334
  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. WLAN_CONN = 1,
  9. WLAN_INIT = 2,
  10. SDCARD_INIT = 3,
  11. SDCARD_CHECK = 4,
  12. CAM_INIT = 5,
  13. PSRAM_INIT = 6,
  14. TIME_CHECK = 7,
  15. AP_OR_OTA = 8
  16. };
  17. struct StatusLEDData {
  18. int iSourceBlinkCnt = 1;
  19. int iCodeBlinkCnt = 1;
  20. int iBlinkTime = 250;
  21. bool bInfinite = false;
  22. bool bProcessingRequest = false;
  23. };
  24. void StatusLED(StatusLedSource _eSource, int _iCode, bool _bInfinite);
  25. void StatusLEDOff(void);
  26. #endif //STATUSLED_H