You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qmk_firmware/drivers/arm/ws2812.h

38 lines
867 B

7 years ago
/*
* LEDDriver.h
*
7 years ago
* Created on: Aug 26, 2013
* Author: Omri Iluz
*/
#ifndef WS2812_H_
#define WS2812_H_
7 years ago
#include "hal.h"
#include "rgblight_types.h"
7 years ago
#define sign(x) (( x > 0 ) - ( x < 0 ))
7 years ago
typedef struct Color Color;
struct Color {
uint8_t R;
uint8_t G;
uint8_t B;
};
7 years ago
void ledDriverInit(int leds, stm32_gpio_t *port, uint32_t mask, uint8_t **o_fb);
void setColorRGB(Color c, uint8_t *buf, uint32_t mask);
void testPatternFB(uint8_t *fb);
void ledDriverWaitCycle(void);
void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds);
void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds);
void WS2812_init(void);
void WS2812_set_color( uint8_t index, uint8_t red, uint8_t green, uint8_t blue );
void WS2812_set_color_all( uint8_t red, uint8_t green, uint8_t blue );
void WS2812_send_colors(void);
7 years ago
#endif /* LEDDRIVER_H_ */