aboutsummaryrefslogtreecommitdiff
path: root/keyboard/ergodox_ez/ergodox_ez.h
diff options
context:
space:
mode:
Diffstat (limited to 'keyboard/ergodox_ez/ergodox_ez.h')
-rw-r--r--keyboard/ergodox_ez/ergodox_ez.h21
1 files changed, 0 insertions, 21 deletions
diff --git a/keyboard/ergodox_ez/ergodox_ez.h b/keyboard/ergodox_ez/ergodox_ez.h
index 219b4bd0b..3989a2f3a 100644
--- a/keyboard/ergodox_ez/ergodox_ez.h
+++ b/keyboard/ergodox_ez/ergodox_ez.h
@@ -37,29 +37,16 @@ uint8_t ergodox_left_leds_update(void);
37#define LED_BRIGHTNESS_LO 31 37#define LED_BRIGHTNESS_LO 31
38#define LED_BRIGHTNESS_HI 255 38#define LED_BRIGHTNESS_HI 255
39 39
40#define LEFT_LED_1_SHIFT 7 // in MCP23018 port B
41#define LEFT_LED_2_SHIFT 6 // in MCP23018 port B
42#define LEFT_LED_3_SHIFT 7 // in MCP23018 port A
43
44extern bool ergodox_left_led_1; // left top
45extern bool ergodox_left_led_2; // left middle
46extern bool ergodox_left_led_3; // left bottom
47 40
48inline void ergodox_board_led_on(void) { DDRD |= (1<<6); PORTD |= (1<<6); } 41inline void ergodox_board_led_on(void) { DDRD |= (1<<6); PORTD |= (1<<6); }
49inline void ergodox_right_led_1_on(void) { DDRB |= (1<<5); PORTB |= (1<<5); } 42inline void ergodox_right_led_1_on(void) { DDRB |= (1<<5); PORTB |= (1<<5); }
50inline void ergodox_right_led_2_on(void) { DDRB |= (1<<6); PORTB |= (1<<6); } 43inline void ergodox_right_led_2_on(void) { DDRB |= (1<<6); PORTB |= (1<<6); }
51inline void ergodox_right_led_3_on(void) { DDRB |= (1<<7); PORTB |= (1<<7); } 44inline void ergodox_right_led_3_on(void) { DDRB |= (1<<7); PORTB |= (1<<7); }
52inline void ergodox_left_led_1_on(void) { ergodox_left_led_1 = 1; }
53inline void ergodox_left_led_2_on(void) { ergodox_left_led_2 = 1; }
54inline void ergodox_left_led_3_on(void) { ergodox_left_led_3 = 1; }
55 45
56inline void ergodox_board_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); } 46inline void ergodox_board_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); }
57inline void ergodox_right_led_1_off(void) { DDRB &= ~(1<<5); PORTB &= ~(1<<5); } 47inline void ergodox_right_led_1_off(void) { DDRB &= ~(1<<5); PORTB &= ~(1<<5); }
58inline void ergodox_right_led_2_off(void) { DDRB &= ~(1<<6); PORTB &= ~(1<<6); } 48inline void ergodox_right_led_2_off(void) { DDRB &= ~(1<<6); PORTB &= ~(1<<6); }
59inline void ergodox_right_led_3_off(void) { DDRB &= ~(1<<7); PORTB &= ~(1<<7); } 49inline void ergodox_right_led_3_off(void) { DDRB &= ~(1<<7); PORTB &= ~(1<<7); }
60inline void ergodox_left_led_1_off(void) { ergodox_left_led_1 = 0; }
61inline void ergodox_left_led_2_off(void) { ergodox_left_led_2 = 0; }
62inline void ergodox_left_led_3_off(void) { ergodox_left_led_3 = 0; }
63 50
64inline void ergodox_led_all_on(void) 51inline void ergodox_led_all_on(void)
65{ 52{
@@ -67,10 +54,6 @@ inline void ergodox_led_all_on(void)
67 ergodox_right_led_1_on(); 54 ergodox_right_led_1_on();
68 ergodox_right_led_2_on(); 55 ergodox_right_led_2_on();
69 ergodox_right_led_3_on(); 56 ergodox_right_led_3_on();
70 ergodox_left_led_1_on();
71 ergodox_left_led_2_on();
72 ergodox_left_led_3_on();
73 ergodox_left_leds_update();
74} 57}
75 58
76inline void ergodox_led_all_off(void) 59inline void ergodox_led_all_off(void)
@@ -79,10 +62,6 @@ inline void ergodox_led_all_off(void)
79 ergodox_right_led_1_off(); 62 ergodox_right_led_1_off();
80 ergodox_right_led_2_off(); 63 ergodox_right_led_2_off();
81 ergodox_right_led_3_off(); 64 ergodox_right_led_3_off();
82 ergodox_left_led_1_off();
83 ergodox_left_led_2_off();
84 ergodox_left_led_3_off();
85 ergodox_left_leds_update();
86} 65}
87 66
88inline void ergodox_right_led_1_set(uint8_t n) { OCR1A = n; } 67inline void ergodox_right_led_1_set(uint8_t n) { OCR1A = n; }