Browse Source

developed StatusLED interface

curiousmuch 6 years ago
parent
commit
66d4fe5a6a
2 changed files with 9 additions and 5 deletions
  1. 9 3
      interface/light_interface.c
  2. 0 2
      user/user_main.c

+ 9 - 3
interface/light_interface.c

@@ -1,7 +1,13 @@
-#include "light_interface.h"
+#include "interface/light_interface.h"
 
 void StatusLED_Shutdown(void)
 {
-    WS2812_SetColor(WS2812_RED, WS2812_SOLID);
-    os_delay()
+    uint8_t i;
+    for(i=0;i<3;i++)
+    {
+        WS2812_SetColor(WS2812_RED, WS2812_SOLID);
+        os_delay_us(500000);
+        WS2812_SetColor(WS2812_OFF, WS2812_SOLID);
+        os_delay_us(500000);
+    }
 }

+ 0 - 2
user/user_main.c

@@ -93,8 +93,6 @@ static const char* TAG = "main.c";
     //while(true)
     {
         ESP_LOGI(TAG, "Setting WS2812B");
-        PIN_FUNC_SELECT(STATLED_MUX, STATLED_FUNC);
-        gpio_output_set(BIT(SHDN), BIT(STATLED), (BIT(SHDN)|BIT(STATLED)), (BIT(PBA)|BIT(PBB)));
 
         WS2812_SetColor(WS2812_ORANGE, WS2812_PULSE);