diff options
author | Erez Zukerman <bulk@ezuk.org> | 2017-11-27 08:25:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-27 08:25:24 -0500 |
commit | 0bd453b5276714b9a33c6a2060851ea5184c52b2 (patch) | |
tree | 24908474e53b54211e9b6eeb027dc4221c2f71bf | |
parent | b697e1bff3f0f3182970e4ba9f9284e1bc9651d5 (diff) | |
parent | 534cd9d45e66b4750d7790fa7230b2108ab3966d (diff) |
Merge pull request #2047 from seebs/seebs/ergodox_brightness
Make brightness easier to change
-rw-r--r-- | keyboards/ergodox_ez/config.h | 5 | ||||
-rw-r--r-- | keyboards/ergodox_ez/ergodox_ez.c | 2 | ||||
-rw-r--r-- | keyboards/ergodox_ez/ergodox_ez.h | 4 |
3 files changed, 10 insertions, 1 deletions
diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h index cbe615c09b..ae70c4f2e4 100644 --- a/keyboards/ergodox_ez/config.h +++ b/keyboards/ergodox_ez/config.h @@ -62,8 +62,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* number of backlight levels */ #define BACKLIGHT_LEVELS 3 +#ifndef LED_BRIGHTNESS_LO #define LED_BRIGHTNESS_LO 15 +#endif +#ifndef LED_BRIGHTNESS_HI #define LED_BRIGHTNESS_HI 255 +#endif +#define LED_BRIGHTNESS_DEFAULT (LED_BRIGHTNESS_HI) /* ws2812 RGB LED */ #define RGB_DI_PIN D7 diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c index 862312cd5a..5f197cb2d7 100644 --- a/keyboards/ergodox_ez/ergodox_ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c @@ -54,7 +54,7 @@ void matrix_init_kb(void) { void ergodox_blink_all_leds(void) { ergodox_led_all_off(); - ergodox_led_all_set(LED_BRIGHTNESS_HI); + ergodox_led_all_set(LED_BRIGHTNESS_DEFAULT); ergodox_right_led_1_on(); _delay_ms(50); ergodox_right_led_2_on(); diff --git a/keyboards/ergodox_ez/ergodox_ez.h b/keyboards/ergodox_ez/ergodox_ez.h index a6890a70c5..4433dbe6db 100644 --- a/keyboards/ergodox_ez/ergodox_ez.h +++ b/keyboards/ergodox_ez/ergodox_ez.h @@ -30,8 +30,12 @@ void ergodox_blink_all_leds(void); uint8_t init_mcp23018(void); uint8_t ergodox_left_leds_update(void); +#ifndef LED_BRIGHTNESS_LO #define LED_BRIGHTNESS_LO 15 +#endif +#ifndef LED_BRIGHTNESS_LO #define LED_BRIGHTNESS_HI 255 +#endif inline void ergodox_board_led_on(void) { DDRD |= (1<<6); PORTD |= (1<<6); } |