]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/divergetm2/divergetm2.h
[Keyboard] Snagpad Configurator bugfix and readme refactor (#6381)
[qmk_firmware.git] / keyboards / divergetm2 / divergetm2.h
1 /* Copyright 2018 Christon DeWan (xton)
2  * Copyright 2017 IslandMan93
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17
18 #pragma once
19
20 //void promicro_bootloader_jmp(bool program);
21 #include "quantum.h"
22
23
24 #ifdef USE_I2C
25 #include <stddef.h>
26 #ifdef __AVR__
27         #include <avr/io.h>
28         #include <avr/interrupt.h>
29 #endif
30 #endif
31
32 //void promicro_bootloader_jmp(bool program);
33
34 #ifndef FLIP_HALF
35 // Standard Keymap
36 // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
37 #define LAYOUT( \
38         L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
39         L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
40         L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
41         L30, L31, L32, L33,    L34,     R31,     R32, R33, R34, R35 \
42         ) \
43         { \
44                 { L00, L01, L02, L03, L04, L05 }, \
45                 { L10, L11, L12, L13, L14, L15 }, \
46                 { L20, L21, L22, L23, L24, L25 }, \
47                 { L30, L31, L32, L33, L34, KC_NO }, \
48                 { R05, R04, R03, R02, R01, R00 }, \
49                 { R15, R14, R13, R12, R11, R10 }, \
50                 { R25, R24, R23, R22, R21, R20 }, \
51                 { R35, R34, R33, R32, R31, KC_NO } \
52         }
53 #else
54 // Keymap with right side flipped
55 // (TRRS jack on both halves are to the right)
56 #define LAYOUT( \
57         L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
58         L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
59         L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
60         L30, L31, L32, L33,    L34,     R31,    R32, R33, R34, R35 \
61         ) \
62         { \
63                 { L00, L01, L02, L03, L04, L05 }, \
64                 { L10, L11, L12, L13, L14, L15 }, \
65                 { L20, L21, L22, L23, L24, L25 }, \
66                 { L30, L31, L32, L33, L34, KC_NO }, \
67                 { R00, R01, R02, R03, R04, R05 }, \
68                 { R10, R11, R12, R13, R14, R15 }, \
69                 { R20, R21, R22, R23, R24, R25 }, \
70                 { KC_NO, R31, R32, R33, R34, R35 } \
71         }
72 #endif
73
74 #define LAYOUT_ortho_4x12_2x2u LAYOUT