Re-arrange typing_speed definitions (Fixes #5) (#6)

* Re-arrange variable definitions to avoid including quantum.h from rgblight.c

* Fix a compilation error when trying to run make test:all
This commit is contained in:
Chris Lewis
2018-07-28 15:54:08 +10:00
committed by GitHub
parent 7cefccd13e
commit e783cb06f7
4 changed files with 10 additions and 9 deletions
+3 -4
View File
@@ -24,15 +24,13 @@
#include "rgblight.h"
#include "debug.h"
#include "led_tables.h"
#include "quantum.h"
#ifndef RGBLIGHT_LIMIT_VAL
#define RGBLIGHT_LIMIT_VAL 255
#endif
//These conflict with a chained include that comes from including quantum.h
// #define MIN(a,b) (((a)<(b))?(a):(b))
// #define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
__attribute__ ((weak))
const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5};
@@ -569,6 +567,7 @@ void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b) {
rgblight_setrgb(r, g, b);
}
uint8_t typing_speed = 0;
void typing_speed_decay_task() {
static uint16_t decay_timer = 0;