-
Notifications
You must be signed in to change notification settings - Fork 3
/
led.h
37 lines (28 loc) · 958 Bytes
/
led.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef TASBOT_EYES_LED_H
#define TASBOT_EYES_LED_H
#include <ws2811/ws2811.h>
#include <gif_lib.h>
#include <pthread.h>
#define GPIO_PIN 10
#define TARGET_FREQ WS2811_TARGET_FREQ //800000 Kbps
#define DMA 10
#define STRIP_TYPE SK6812_STRIP //TASBot
#define INVERTED false
#define BRIGHTNESS 4
#define LED_HEIGHT 8
#define LED_WIDTH 28
#define LED_COUNT (LED_WIDTH * LED_HEIGHT)
#define RENDER_DELAY 10 //ms
extern int brightness;
extern int dataPin;
extern ws2811_led_t* buffer;
extern ws2811_t display;
extern pthread_t renderThread;
void initLEDs();
ws2811_return_t renderLEDs();
ws2811_return_t clearLEDs();
ws2811_led_t translateColor(GifColorType* _color, bool _useGammaCorrection);
//render thread
void startRenderThread();
void* runRenderThread(void* vargp);
#endif //TASBOT_EYES_LED_H