哇袄2
This commit is contained in:
22
include/color_utils.h
Normal file
22
include/color_utils.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef COLOR_UTILS_H
|
||||
#define COLOR_UTILS_H
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct Color {
|
||||
uint8_t g;
|
||||
uint8_t r;
|
||||
uint8_t b;
|
||||
} Color;
|
||||
|
||||
Color hex_to_color(int hex);
|
||||
Color hsv_to_color(double h, double s, double v);
|
||||
void set_color(uint8_t* buffer, const Color color);
|
||||
int construct_buffer(uint8_t* buffer,
|
||||
const Color* colors,
|
||||
const int num_leds,
|
||||
const int color_bytes,
|
||||
const int res_bytes);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user