28 lines
No EOL
515 B
C
28 lines
No EOL
515 B
C
#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(); |