123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
-
- #ifndef LIGHT_WS2812_H_
- #define LIGHT_WS2812_H_
- #include <avr/io.h>
- #include <avr/interrupt.h>
- #include "ws2812_config.h"
- struct cRGB { uint8_t g; uint8_t r; uint8_t b; };
- void ws2812_setleds (struct cRGB *ledarray, uint16_t number_of_leds);
- void ws2812_setleds_pin(struct cRGB *ledarray, uint16_t number_of_leds,uint8_t pinmask);
- void ws2812_sendarray (uint8_t *array,uint16_t length);
- void ws2812_sendarray_mask(uint8_t *array,uint16_t length, uint8_t pinmask);
- #define CONCAT(a, b) a ## b
- #define CONCAT_EXP(a, b) CONCAT(a, b)
- #define ws2812_PORTREG CONCAT_EXP(PORT,ws2812_port)
- #define ws2812_DDRREG CONCAT_EXP(DDR,ws2812_port)
- #endif
|