You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.3 KiB
57 lines
1.3 KiB
#ifndef LED_CONTROL_H
|
|
#define LED_CONTROL_H
|
|
|
|
#include "WS2812.h"
|
|
#define LED_MODES 7
|
|
#define LED_MODE_OFF 0
|
|
#define LED_MODE_STEADY 1
|
|
#define LED_MODE_BREATHE 2
|
|
#define LED_MODE_RAINBOW 3
|
|
#define LED_MODE_RAINBOW_WAVE 4
|
|
#define LED_MODE_HEATMAP 5
|
|
#define LED_MODE_CHASE 6
|
|
|
|
#define LED_SPECIAL_MODE_NUMLOCK 100
|
|
#define LED_DATA_PIN 4
|
|
|
|
#define LED_COUNT 64
|
|
|
|
static const int key_led_map[4][16] =
|
|
{
|
|
{3,4,11,12,19,20,26,27, 36,37,43,44,51,52,59,60},
|
|
{2,5,10,13,18,21,31,28, 35,32,42,45,50,53,58,61},
|
|
{1,6,9,14, 17,22,25,29, 34,38,41,46,49,54,57,62},
|
|
{0,7,8,15,16,23,24,30, 33,39,40,47,48,55,56,63},
|
|
};
|
|
|
|
|
|
|
|
void setup_leds();
|
|
void update_leds(int numlock_enabled);
|
|
void set_all_leds_to(cRGB color);
|
|
|
|
void set_led_mode(int mode);
|
|
void next_led_mode();
|
|
|
|
byte key_to_led(byte row, byte col);
|
|
void set_key_color(byte row, byte col, cRGB color);
|
|
cRGB get_key_color(byte row, byte col);
|
|
|
|
void led_compute_breath();
|
|
void led_effect_breathe_init();
|
|
void led_effect_rainbow_init();
|
|
void led_effect_chase_init();
|
|
void led_effect_steady_init();
|
|
void led_Effect_heatmap_init();
|
|
|
|
void led_effect_breathe_update();
|
|
void led_effect_rainbow_update();
|
|
void led_effect_rainbow_wave_update();
|
|
void led_effect_chase_update();
|
|
void led_effect_steady_update();
|
|
void led_effect_heatmap_update();
|
|
void led_effect_numlock_update();
|
|
|
|
|
|
#endif
|