diff options
Diffstat (limited to 'keyboard/ergodox_ez/ergodox_ez.h')
| -rw-r--r-- | keyboard/ergodox_ez/ergodox_ez.h | 21 |
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 | |||
| 44 | extern bool ergodox_left_led_1; // left top | ||
| 45 | extern bool ergodox_left_led_2; // left middle | ||
| 46 | extern bool ergodox_left_led_3; // left bottom | ||
| 47 | 40 | ||
| 48 | inline void ergodox_board_led_on(void) { DDRD |= (1<<6); PORTD |= (1<<6); } | 41 | inline void ergodox_board_led_on(void) { DDRD |= (1<<6); PORTD |= (1<<6); } |
| 49 | inline void ergodox_right_led_1_on(void) { DDRB |= (1<<5); PORTB |= (1<<5); } | 42 | inline void ergodox_right_led_1_on(void) { DDRB |= (1<<5); PORTB |= (1<<5); } |
| 50 | inline void ergodox_right_led_2_on(void) { DDRB |= (1<<6); PORTB |= (1<<6); } | 43 | inline void ergodox_right_led_2_on(void) { DDRB |= (1<<6); PORTB |= (1<<6); } |
| 51 | inline void ergodox_right_led_3_on(void) { DDRB |= (1<<7); PORTB |= (1<<7); } | 44 | inline void ergodox_right_led_3_on(void) { DDRB |= (1<<7); PORTB |= (1<<7); } |
| 52 | inline void ergodox_left_led_1_on(void) { ergodox_left_led_1 = 1; } | ||
| 53 | inline void ergodox_left_led_2_on(void) { ergodox_left_led_2 = 1; } | ||
| 54 | inline void ergodox_left_led_3_on(void) { ergodox_left_led_3 = 1; } | ||
| 55 | 45 | ||
| 56 | inline void ergodox_board_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); } | 46 | inline void ergodox_board_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); } |
| 57 | inline void ergodox_right_led_1_off(void) { DDRB &= ~(1<<5); PORTB &= ~(1<<5); } | 47 | inline void ergodox_right_led_1_off(void) { DDRB &= ~(1<<5); PORTB &= ~(1<<5); } |
| 58 | inline void ergodox_right_led_2_off(void) { DDRB &= ~(1<<6); PORTB &= ~(1<<6); } | 48 | inline void ergodox_right_led_2_off(void) { DDRB &= ~(1<<6); PORTB &= ~(1<<6); } |
| 59 | inline void ergodox_right_led_3_off(void) { DDRB &= ~(1<<7); PORTB &= ~(1<<7); } | 49 | inline void ergodox_right_led_3_off(void) { DDRB &= ~(1<<7); PORTB &= ~(1<<7); } |
| 60 | inline void ergodox_left_led_1_off(void) { ergodox_left_led_1 = 0; } | ||
| 61 | inline void ergodox_left_led_2_off(void) { ergodox_left_led_2 = 0; } | ||
| 62 | inline void ergodox_left_led_3_off(void) { ergodox_left_led_3 = 0; } | ||
| 63 | 50 | ||
| 64 | inline void ergodox_led_all_on(void) | 51 | inline 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 | ||
| 76 | inline void ergodox_led_all_off(void) | 59 | inline 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 | ||
| 88 | inline void ergodox_right_led_1_set(uint8_t n) { OCR1A = n; } | 67 | inline void ergodox_right_led_1_set(uint8_t n) { OCR1A = n; } |
