1
0
Fork 0

Fix up RGB Matrix code (#4503)

* Fix up RGB Matrix code

* Convert RGBLIGHT functions to rgbmatrix ones, and add defines
This commit is contained in:
Drashna Jael're 2018-12-03 10:27:15 -08:00 committed by MechMerlin
parent fe982caf5d
commit da1afe152a
3 changed files with 91 additions and 32 deletions

View file

@ -325,13 +325,13 @@ void rgblight_disable_noeeprom(void) {
// Deals with the messy details of incrementing an integer
uint8_t increment( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) {
static uint8_t increment( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) {
int16_t new_value = value;
new_value += step;
return MIN( MAX( new_value, min ), max );
}
uint8_t decrement( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) {
static uint8_t decrement( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) {
int16_t new_value = value;
new_value -= step;
return MIN( MAX( new_value, min ), max );