hardware/ATMegaKeyboard: Only define cRGB if required

If we wish to support hardware that has LEDs, we should not define the `cRGB`
struct and the `CRGB` macro unconditionally. Define them only if the macro is
undefined. This way any hardware that has LEDs, and still wishes to use
`ATMegaKeyboard` as a base can define the macro prior to including the header.

Such hardware will override the LED functions anyway, so there's nothing else we
need to do to support such a scenario.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/470/head
Gergely Nagy 6 years ago
parent a5cc2d4f80
commit 93bc527b98
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -29,12 +29,16 @@
#include <avr/wdt.h>
#ifndef CRGB
struct cRGB {
uint8_t r, g, b;
};
#define CRGB(r,g,b) (cRGB){b, g, r}
#endif
#define ROW_PIN_LIST(...) __VA_ARGS__
#define COL_PIN_LIST(...) __VA_ARGS__

Loading…
Cancel
Save