diff options
Diffstat (limited to 'keyboards/exclusive/e6v2/oe/oe.c')
| -rw-r--r-- | keyboards/exclusive/e6v2/oe/oe.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/keyboards/exclusive/e6v2/oe/oe.c b/keyboards/exclusive/e6v2/oe/oe.c new file mode 100644 index 000000000..10cd59f0c --- /dev/null +++ b/keyboards/exclusive/e6v2/oe/oe.c | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | #include "oe.h" | ||
| 2 | |||
| 3 | void matrix_init_kb(void) { | ||
| 4 | // put your keyboard start-up code here | ||
| 5 | // runs once when the firmware starts up | ||
| 6 | |||
| 7 | matrix_init_user(); | ||
| 8 | } | ||
| 9 | |||
| 10 | void matrix_scan_kb(void) { | ||
| 11 | // put your looping keyboard code here | ||
| 12 | // runs every cycle (a lot) | ||
| 13 | |||
| 14 | matrix_scan_user(); | ||
| 15 | } | ||
| 16 | |||
| 17 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
| 18 | // put your per-action keyboard code here | ||
| 19 | // runs for every action, just before processing by the firmware | ||
| 20 | |||
| 21 | return process_record_user(keycode, record); | ||
| 22 | } | ||
| 23 | |||
| 24 | void led_set_kb(uint8_t usb_led) { | ||
| 25 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | ||
| 26 | DDRB |= (1<<6); | ||
| 27 | if (usb_led & (1<<USB_LED_CAPS_LOCK)) { | ||
| 28 | // output low | ||
| 29 | DDRB |= (1<<2); | ||
| 30 | PORTB &= ~(1<<2); | ||
| 31 | } else { | ||
| 32 | // Hi-Z | ||
| 33 | DDRB &= ~(1<<2); | ||
| 34 | PORTB &= ~(1<<2); | ||
| 35 | } | ||
| 36 | // DDRB |= (1<<7); | ||
| 37 | // DDRB |= (1<<1); | ||
| 38 | // DDRB |= (1<<3); | ||
| 39 | // DDRE |= (1<<6); | ||
| 40 | if (usb_led == 0){ | ||
| 41 | PORTB |= (1<<6); | ||
| 42 | // PORTB |= (1<<7); | ||
| 43 | // PORTB |= (1<<1); | ||
| 44 | // PORTB |= (1<<3); | ||
| 45 | // PORTE |= (1<<6); | ||
| 46 | } | ||
| 47 | else{ | ||
| 48 | PORTB &= ~(1<<6); | ||
| 49 | // PORTB &= ~(1<<7); | ||
| 50 | } | ||
| 51 | |||
| 52 | led_set_user(usb_led); | ||
| 53 | } | ||
