]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/iris/rev1/rev1.c
Add support for Swap Hands feature to Orthodox and Iris (#2933)
[qmk_firmware.git] / keyboards / iris / rev1 / rev1.c
1 #include "rev1.h"
2
3
4 #ifdef SSD1306OLED
5 void led_set_kb(uint8_t usb_led) {
6     // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
7     led_set_user(usb_led);
8 }
9 #endif
10
11 void matrix_init_kb(void) {
12
13     // // green led on
14     // DDRD |= (1<<5);
15     // PORTD &= ~(1<<5);
16
17     // // orange led on
18     // DDRB |= (1<<0);
19     // PORTB &= ~(1<<0);
20
21         matrix_init_user();
22 };
23
24
25 #ifdef SWAP_HANDS_ENABLE
26 __attribute__ ((weak))
27 // swap-hands action needs a matrix to define the swap
28 const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
29     /* Left hand, matrix positions */
30     {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}},
31     {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}},
32     {{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}},
33     {{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}},
34     {{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}},
35     /* Right hand, matrix positions */
36     {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}},
37     {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}},
38     {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}},
39     {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}},
40     {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}},
41 };
42 #endif