sk6812d/src/sk6812.h

24 lines
543 B
C

#ifndef SK6812_H
#define SK6812_H
#include <stdint.h>
struct sk6812_memory
{
uint32_t num_leds;
uint32_t led_data[];
};
struct sk6812_ctx
{
struct sk6812_memory *memptr;
char *gpio_value_path;
};
int sk6812_init(struct sk6812_ctx *ctx, uint32_t gpio_idx, void *phys_baseptr, uint32_t num_modules);
void sk6812_shutdown(struct sk6812_ctx *ctx);
void sk6812_set_colour(struct sk6812_ctx *ctx, uint32_t module, uint8_t red, uint8_t green, uint8_t blue, uint8_t white);
void sk6812_send_update(struct sk6812_ctx *ctx);
#endif // SK6812_H