summaryrefslogtreecommitdiffstats
path: root/keyboard/ergodox_ez/ergodox_ez.h
diff options
context:
space:
mode:
authorDave Jones <dave@waveform.org.uk>2015-12-19 22:18:58 +0000
committerDave Jones <dave@waveform.org.uk>2016-01-02 11:19:52 +0000
commit7ba06c9e0dbc17cc46794b9961ff9290694d93df (patch)
tree30c4497ebd07618f64164aa1b67c542843f0d7d1 /keyboard/ergodox_ez/ergodox_ez.h
parent9c5f30ed83594e0058ca1bacee5bcfb92298311e (diff)
Dave's custom keymap
This moves the keys closer to a traditional layout with some redundancy around the middle to compensate for fast non-traditional typists like myself who tend to wander from the home row a fair bit. Navigation keys are provided in layer 2 (accessed by left thumb button), programming symbols and classic numeric keypad in layer 1 (accessed by right thumb button). Permanent layer switching is provided with a smaller thumb button. Ctrl provided in place of caps lock (because no-one needs caps/num lock), space, backspace, enter, shift all in traditional positions with layer 1 providing things like equals, tilde and apostrophe (an attempt to re-use existing muscle memory). LEDs are pimped to the point of being silly (fading in/out on layer switch, rolling on reboot ... because I can). Power and reset keys provided on left thumb pad in layer 2. No meh or hyper as I haven't found a burning need for them yet.
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)
{