1
0
Fork 0

Add convenience method for setting Nibble's big LED RGB (#11257)

This commit is contained in:
Nick Krichevsky 2020-12-29 18:23:50 -05:00 committed by GitHub
parent 12568fb5a9
commit e85d904fe1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View file

@ -15,6 +15,12 @@
*/ */
#include "big_led.h" #include "big_led.h"
void set_big_LED_rgb(uint8_t r_mode, uint8_t g_mode, uint8_t b_mode) {
set_big_LED_r(r_mode);
set_big_LED_g(g_mode);
set_big_LED_b(b_mode);
}
void set_big_LED_r(uint8_t mode) { void set_big_LED_r(uint8_t mode) {
switch(mode) { switch(mode) {
case LED_ON: case LED_ON:
@ -64,4 +70,4 @@ void set_big_LED_b(uint8_t mode) {
default: default:
break; break;
} }
} }

View file

@ -15,7 +15,7 @@
*/ */
#pragma once #pragma once
#include "quantum.h" #include "quantum.h"
/* Optional big LED pins */ /* Optional big LED pins */
#define BIG_LED_R_PIN D7 #define BIG_LED_R_PIN D7
@ -29,6 +29,7 @@
#define GPIO_STATE_HIGH 1 #define GPIO_STATE_HIGH 1
void void
set_big_LED_rgb(uint8_t r_mode, uint8_t g_mode, uint8_t b_mode),
set_big_LED_r(uint8_t mode), set_big_LED_r(uint8_t mode),
set_big_LED_g(uint8_t mode), set_big_LED_g(uint8_t mode),
set_big_LED_b(uint8_t mode); set_big_LED_b(uint8_t mode);