]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - drivers/avr/ws2812.h
Add user-overridable callback for cancelling UCIS input (#5564)
[qmk_firmware.git] / drivers / avr / ws2812.h
index 60924a0fb61d5895fb22bc7dfa1e9ff0027d4467..95f540b1849bf93de4ebd674f54d8d30a13fa5dc 100644 (file)
 //#include "ws2812_config.h"
 //#include "i2cmaster.h"
 
-#ifdef RGBW
-  #define LED_TYPE struct cRGBW
-#else
-  #define LED_TYPE struct cRGB
-#endif
-
-
-/*
- *  Structure of the LED array
- *
- * cRGB:     RGB  for WS2812S/B/C/D, SK6812, SK6812Mini, SK6812WWA, APA104, APA106
- * cRGBW:    RGBW for SK6812RGBW
- */
-
-struct cRGB  { uint8_t g; uint8_t r; uint8_t b; };
-struct cRGBW { uint8_t g; uint8_t r; uint8_t b; uint8_t w;};
-
-
+#include "quantum/color.h"
 
 /* User Interface
  *
@@ -59,6 +42,10 @@ struct cRGBW { uint8_t g; uint8_t r; uint8_t b; uint8_t w;};
  *         - Send out the LED data
  *         - Wait 50�s to reset the LEDs
  */
+#ifdef RGB_MATRIX_ENABLE
+void ws2812_setled      (int index, uint8_t r, uint8_t g, uint8_t b);
+void ws2812_setled_all  (uint8_t r, uint8_t g, uint8_t b);
+#endif
 
 void ws2812_setleds     (LED_TYPE *ledarray, uint16_t number_of_leds);
 void ws2812_setleds_pin (LED_TYPE *ledarray, uint16_t number_of_leds,uint8_t pinmask);
@@ -85,7 +72,4 @@ void ws2812_sendarray_mask(uint8_t *array,uint16_t length, uint8_t pinmask);
 #define CONCAT_EXP(a, b)   CONCAT(a, b)
 #endif
 
-// #define ws2812_PORTREG  CONCAT_EXP(PORT,ws2812_port)
-// #define ws2812_DDRREG   CONCAT_EXP(DDR,ws2812_port)
-
 #endif /* LIGHT_WS2812_H_ */