add firmware
This commit is contained in:
parent
f165ccdc95
commit
580bc8716c
21 changed files with 6148 additions and 0 deletions
28
firmware/main/include/led/ws2811.h
Normal file
28
firmware/main/include/led/ws2811.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#pragma once
|
||||
|
||||
#include <esp_attr.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#define LED_PIN (23)
|
||||
|
||||
typedef enum LEDStripSpeed{
|
||||
WS2811_LOW_SPEED = 10000000, // One tick == 0.1us
|
||||
WS2811_HIGH_SPEED = 20000000 // One tick == 0.05us
|
||||
} LEDStripSpeed_t;
|
||||
|
||||
typedef struct PACKED_ATTR rgbPacket {
|
||||
uint8_t r;
|
||||
uint8_t g;
|
||||
uint8_t b;
|
||||
} rgbPacket_t;
|
||||
|
||||
typedef void (*ledRenderFunction_t)(
|
||||
rgbPacket_t* buf,
|
||||
size_t led_count,
|
||||
unsigned long frame
|
||||
);
|
||||
|
||||
extern uint8_t saturation;
|
||||
|
||||
void init_leds();
|
||||
Loading…
Add table
Add a link
Reference in a new issue