summaryrefslogtreecommitdiff
path: root/keyboard/ergodox_ez/ergodox_ez.h
diff options
context:
space:
mode:
authorJonathan Arnett <jonarnett90@gmail.com>2016-01-16 09:54:46 -0500
committerJonathan Arnett <jonarnett90@gmail.com>2016-01-16 09:54:46 -0500
commit10ab4eff069d024c4bb6399c2d71812d80f052be (patch)
tree80c3040f98f1e1ecad3e6517f74a6d3101b97627 /keyboard/ergodox_ez/ergodox_ez.h
parent2de371564ddecfdb08f848bc9eeeff9808645206 (diff)
parent9487e92a6e35383dddc47794462cd37ff77c4256 (diff)
Merge branch 'master' into j3rn-keymap
Diffstat (limited to 'keyboard/ergodox_ez/ergodox_ez.h')
-rw-r--r--keyboard/ergodox_ez/ergodox_ez.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/keyboard/ergodox_ez/ergodox_ez.h b/keyboard/ergodox_ez/ergodox_ez.h
index 3989a2f3ac..aceb7ed9c3 100644
--- a/keyboard/ergodox_ez/ergodox_ez.h
+++ b/keyboard/ergodox_ez/ergodox_ez.h
@@ -34,7 +34,7 @@ void ergodox_blink_all_leds(void);
uint8_t init_mcp23018(void);
uint8_t ergodox_left_leds_update(void);
-#define LED_BRIGHTNESS_LO 31
+#define LED_BRIGHTNESS_LO 15
#define LED_BRIGHTNESS_HI 255
@@ -42,11 +42,13 @@ inline void ergodox_board_led_on(void) { DDRD |= (1<<6); PORTD |= (1<<6);
inline void ergodox_right_led_1_on(void) { DDRB |= (1<<5); PORTB |= (1<<5); }
inline void ergodox_right_led_2_on(void) { DDRB |= (1<<6); PORTB |= (1<<6); }
inline void ergodox_right_led_3_on(void) { DDRB |= (1<<7); PORTB |= (1<<7); }
+inline void ergodox_right_led_on(uint8_t led) { DDRB |= (1<<(led+4)); PORTB |= (1<<(led+4)); }
inline void ergodox_board_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); }
inline void ergodox_right_led_1_off(void) { DDRB &= ~(1<<5); PORTB &= ~(1<<5); }
inline void ergodox_right_led_2_off(void) { DDRB &= ~(1<<6); PORTB &= ~(1<<6); }
inline void ergodox_right_led_3_off(void) { DDRB &= ~(1<<7); PORTB &= ~(1<<7); }
+inline void ergodox_right_led_off(uint8_t led) { DDRB &= ~(1<<(led+4)); PORTB &= ~(1<<(led+4)); }
inline void ergodox_led_all_on(void)
{
@@ -67,6 +69,11 @@ inline void ergodox_led_all_off(void)
inline void ergodox_right_led_1_set(uint8_t n) { OCR1A = n; }
inline void ergodox_right_led_2_set(uint8_t n) { OCR1B = n; }
inline void ergodox_right_led_3_set(uint8_t n) { OCR1C = n; }
+inline void ergodox_right_led_set(uint8_t led, uint8_t n) {
+ (led == 1) ? (OCR1A = n) :
+ (led == 2) ? (OCR1B = n) :
+ (OCR1C = n);
+}
inline void ergodox_led_all_set(uint8_t n)
{