aboutsummaryrefslogtreecommitdiff
path: root/keyboards/chimera_ortho_plus
diff options
context:
space:
mode:
authorpcoleman <pbcoleman@gmail.com>2020-05-19 17:01:54 -0500
committerGitHub <noreply@github.com>2020-05-19 23:01:54 +0100
commit82bb7d2852c76c7b2c8970bebd47bbd701d9416d (patch)
treeb07eec0a743b5ae3682f7526b41e8af470025c8d /keyboards/chimera_ortho_plus
parent1044519f3666667d576fc448be0d7569c1969db7 (diff)
downloadqmk_firmware-82bb7d2852c76c7b2c8970bebd47bbd701d9416d.tar.gz
qmk_firmware-82bb7d2852c76c7b2c8970bebd47bbd701d9416d.zip
Adding Chimera Ortho Plus (#9093)
* Added Chimera Ortho keymap * Cleaning up the rules * Removing firmware sizes * Modified URLs to point to new locations * Remove _quantum functions from custom matrix.c code * Fix 1<col instead of 1<<col typo in matrix_is_on() * Make PREVENT_STUCK_MODIFIERS the default * Removing the IS_COMMAND custom definition * Adding info.json * Adding config overrides * Adjusting for the reformat * removing backlight reference * fixing some compile issues * Fixing a matrix issue * Update keyboards/chimera_ortho_plus/rules.mk Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/chimera_ortho_plus/rules.mk Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/chimera_ortho_plus/readme.md Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/chimera_ortho_plus/readme.md Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/chimera_ortho_plus/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/chimera_ortho_plus/config.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/chimera_ortho_plus/chimera_ortho_plus.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/chimera_ortho_plus/chimera_ortho_plus.h Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/chimera_ortho_plus/chimera_ortho_plus.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/chimera_ortho_plus/chimera_ortho_plus.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/chimera_ortho_plus/chimera_ortho_plus.h Co-authored-by: Ryan <fauxpark@gmail.com> * lining up the matrix * Update keyboards/chimera_ortho_plus/readme.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/chimera_ortho_plus/readme.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/chimera_ortho_plus/info.json Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/chimera_ortho_plus/chimera_ortho_plus.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/chimera_ortho_plus/config.h Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
Diffstat (limited to 'keyboards/chimera_ortho_plus')
-rw-r--r--keyboards/chimera_ortho_plus/chimera_ortho_plus.c23
-rw-r--r--keyboards/chimera_ortho_plus/chimera_ortho_plus.h38
-rw-r--r--keyboards/chimera_ortho_plus/config.h76
-rw-r--r--keyboards/chimera_ortho_plus/info.json65
-rw-r--r--keyboards/chimera_ortho_plus/keymaps/default/config.h5
-rw-r--r--keyboards/chimera_ortho_plus/keymaps/default/keymap.c185
-rw-r--r--keyboards/chimera_ortho_plus/matrix.c154
-rw-r--r--keyboards/chimera_ortho_plus/readme.md15
-rw-r--r--keyboards/chimera_ortho_plus/rules.mk37
9 files changed, 598 insertions, 0 deletions
diff --git a/keyboards/chimera_ortho_plus/chimera_ortho_plus.c b/keyboards/chimera_ortho_plus/chimera_ortho_plus.c
new file mode 100644
index 000000000..1972f2a9c
--- /dev/null
+++ b/keyboards/chimera_ortho_plus/chimera_ortho_plus.c
@@ -0,0 +1,23 @@
1#include "chimera_ortho_plus.h"
2
3void uart_init(void) {
4 SERIAL_UART_INIT();
5}
6
7void led_init(void) {
8 setPinOutput(D1);
9 setPinOutput(F4);
10 setPinOutput(F5);
11 writePinHigh(D1);
12 writePinHigh(F4);
13 writePinHigh(F5);
14}
15
16
17void matrix_init_kb(void) {
18 // put your keyboard start-up code here
19 // runs once when the firmware starts up
20 matrix_init_user();
21 uart_init();
22 led_init();
23}
diff --git a/keyboards/chimera_ortho_plus/chimera_ortho_plus.h b/keyboards/chimera_ortho_plus/chimera_ortho_plus.h
new file mode 100644
index 000000000..f75dc6105
--- /dev/null
+++ b/keyboards/chimera_ortho_plus/chimera_ortho_plus.h
@@ -0,0 +1,38 @@
1#pragma once
2
3#include "quantum.h"
4
5#define red_led_off PORTF |= (1<<5)
6#define red_led_on PORTF &= ~(1<<5)
7#define blu_led_off PORTF |= (1<<4)
8#define blu_led_on PORTF &= ~(1<<4)
9#define grn_led_off PORTD |= (1<<1)
10#define grn_led_on PORTD &= ~(1<<1)
11
12#define set_led_off red_led_off; grn_led_off; blu_led_off
13#define set_led_red red_led_on; grn_led_off; blu_led_off
14#define set_led_blue red_led_off; grn_led_off; blu_led_on
15#define set_led_green red_led_off; grn_led_on; blu_led_off
16#define set_led_yellow red_led_on; grn_led_on; blu_led_off
17#define set_led_magenta red_led_on; grn_led_off; blu_led_on
18#define set_led_cyan red_led_off; grn_led_on; blu_led_on
19#define set_led_white red_led_on; grn_led_on; blu_led_on
20
21// This a shortcut to help you visually see your layout.
22// The first section contains all of the arguements
23// The second converts the arguments into a two-dimensional array
24
25#define LAYOUT( \
26 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, \
27 k12, k13, k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, \
28 k24, k25, k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, \
29 k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, \
30 k48, k49, k50, k51 \
31) \
32{ \
33 { k03, k40, k26, k15, k28, k01, k42, k31, k20, k33, k08, k10 }, \
34 { k00, k37, k14, k27, k16, k36, k47, k19, k32, k21, k46, k11 }, \
35 { k12, k25, k02, k39, k17, k49, k50, k18, k44, k09, k34, k23 }, \
36 { k24, k13, k38, k04, k05, k48, k51, k06, k07, k45, k22, k35 }, \
37 { k29, k41, KC_NO, KC_NO, KC_NO, KC_NO, k30, k43, KC_NO, KC_NO, KC_NO, KC_NO } \
38}
diff --git a/keyboards/chimera_ortho_plus/config.h b/keyboards/chimera_ortho_plus/config.h
new file mode 100644
index 000000000..d47c1a764
--- /dev/null
+++ b/keyboards/chimera_ortho_plus/config.h
@@ -0,0 +1,76 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#pragma once
19
20#include "config_common.h"
21
22/* USB Device descriptor parameter */
23
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0xDE1D
26#define DEVICE_VER 0x0001
27#define MANUFACTURER unknown
28#define PRODUCT Chimera Ortho Plus
29#define DESCRIPTION q.m.k. keyboard firmware for Chimera Ortho Plus
30
31/* key matrix size */
32#define MATRIX_ROWS 6
33#define MATRIX_COLS 12
34
35/* define if matrix has ghost */
36//#define MATRIX_HAS_GHOST
37
38/* number of backlight levels */
39//#define BACKLIGHT_LEVELS 3
40
41#define ONESHOT_TIMEOUT 500
42
43/*
44 * Feature disable options
45 * These options are also useful to firmware size reduction.
46 */
47
48/* disable debug print */
49//#define NO_DEBUG
50
51/* disable print */
52//#define NO_PRINT
53
54/* disable action features */
55//#define NO_ACTION_LAYER
56//#define NO_ACTION_TAPPING
57//#define NO_ACTION_ONESHOT
58//#define NO_ACTION_MACRO
59//#define NO_ACTION_FUNCTION
60
61//UART settings for communication with the RF microcontroller
62#define SERIAL_UART_BAUD 1000000
63#define SERIAL_UART_DATA UDR1
64#define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1)
65#define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1))
66#define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1))
67#define SERIAL_UART_INIT() do { \
68 /* baud rate */ \
69 UBRR1L = SERIAL_UART_UBRR; \
70 /* baud rate */ \
71 UBRR1H = SERIAL_UART_UBRR >> 8; \
72 /* enable TX and RX */ \
73 UCSR1B = _BV(TXEN1) | _BV(RXEN1); \
74 /* 8-bit data */ \
75 UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
76 } while(0)
diff --git a/keyboards/chimera_ortho_plus/info.json b/keyboards/chimera_ortho_plus/info.json
new file mode 100644
index 000000000..7c892c441
--- /dev/null
+++ b/keyboards/chimera_ortho_plus/info.json
@@ -0,0 +1,65 @@
1{
2 "keyboard_name": "Chimera Ortho Plus",
3 "keyboard_folder": "chimera_ortho_plus",
4 "maintainer": "qmk",
5 "width": 13.5,
6 "height": 6,
7 "layouts": {
8 "LAYOUT": {
9 "layout": [
10 {"label": "{", "x": 0, "y": 0},
11 {"label": "1", "x": 1, "y": 0},
12 {"label": "2", "x": 2, "y": 0},
13 {"label": "3", "x": 3, "y": 0},
14 {"label": "4", "x": 4, "y": 0},
15 {"label": "5", "x": 5, "y": 0},
16 {"label": "6", "x": 7.5, "y": 0},
17 {"label": "7", "x": 8.5, "y": 0},
18 {"label": "8", "x": 9.5, "y": 0},
19 {"label": "9", "x": 10.5, "y": 0},
20 {"label": "0", "x": 11.5, "y": 0},
21 {"label": "}", "x": 12.5, "y": 0},
22 {"label": "Esc", "x": 0, "y": 1},
23 {"label": "Q", "x": 1, "y": 1},
24 {"label": "W", "x": 2, "y": 1},
25 {"label": "E", "x": 3, "y": 1},
26 {"label": "R", "x": 4, "y": 1},
27 {"label": "T", "x": 5, "y": 1},
28 {"label": "Y", "x": 7.5, "y": 1},
29 {"label": "U", "x": 8.5, "y": 1},
30 {"label": "I", "x": 9.5, "y": 1},
31 {"label": "O", "x": 10.5, "y": 1},
32 {"label": "P", "x": 11.5, "y": 1},
33 {"label": "\"", "x": 12.5, "y": 1},
34 {"label": "Tab", "x": 0, "y": 2},
35 {"label": "A", "x": 1, "y": 2},
36 {"label": "S", "x": 2, "y": 2},
37 {"label": "D", "x": 3, "y": 2},
38 {"label": "F", "x": 4, "y": 2},
39 {"label": "G", "x": 5, "y": 2},
40 {"label": "H", "x": 7.5, "y": 2},
41 {"label": "J", "x": 8.5, "y": 2},
42 {"label": "K", "x": 9.5, "y": 2},
43 {"label": "L", "x": 10.5, "y": 2},
44 {"label": ";", "x": 11.5, "y": 2},
45 {"label": "Enter", "x": 12.5, "y": 2},
46 {"label": "(", "x": 0, "y": 3},
47 {"label": "Z", "x": 1, "y": 3},
48 {"label": "X", "x": 2, "y": 3},
49 {"label": "C", "x": 3, "y": 3},
50 {"label": "V", "x": 4, "y": 3},
51 {"label": "B", "x": 5, "y": 3},
52 {"label": "N", "x": 7.5, "y": 3},
53 {"label": "M", "x": 8.5, "y": 3},
54 {"label": ",", "x": 9.5, "y": 3},
55 {"label": ".", "x": 10.5, "y": 3},
56 {"label": "/", "x": 11.5, "y": 3},
57 {"label": ")", "x": 12.5, "y": 3},
58 {"label": "Num Layer", "x": 4, "y": 4},
59 {"label": "Back Space", "x": 5, "y": 4},
60 {"label": "Space", "x": 7.5, "y": 4},
61 {"label": "Symbol Layer", "x": 8.5, "y": 4}
62 ]
63 }
64 }
65}
diff --git a/keyboards/chimera_ortho_plus/keymaps/default/config.h b/keyboards/chimera_ortho_plus/keymaps/default/config.h
new file mode 100644
index 000000000..bdfd4db80
--- /dev/null
+++ b/keyboards/chimera_ortho_plus/keymaps/default/config.h
@@ -0,0 +1,5 @@
1#pragma once
2
3// place overrides here
4#define LONGPRESS_DELAY 150
5//#define LAYER_TOGGLE_DELAY 300
diff --git a/keyboards/chimera_ortho_plus/keymaps/default/keymap.c b/keyboards/chimera_ortho_plus/keymaps/default/keymap.c
new file mode 100644
index 000000000..9b4503770
--- /dev/null
+++ b/keyboards/chimera_ortho_plus/keymaps/default/keymap.c
@@ -0,0 +1,185 @@
1#include QMK_KEYBOARD_H
2
3// Each layer gets a name for readability, which is then used in the keymap matrix below.
4// The underscores don't mean anything - you can have a layer called STUFF or any other name.
5// Layer names don't all need to be of the same length, obviously, and you can also skip them
6// entirely and just use numbers.
7enum chimera_ortho_plus_layers {
8 _QWERTY,
9 _CAPS,
10 _NUMPAD,
11 _SYMBOLS,
12 _MACROS,
13 _NAV
14};
15
16#define KC_NMPD TG(_NUMPAD)
17#define KC_SYMB TG(_SYMBOLS)
18#define KC_SPFN LT(_NAV,KC_4)
19#define KC_SCTL MT(MOD_LCTL, KC_2)
20#define KC_SCTR MT(MOD_LCTL, KC_9)
21#define KC_SPLT MT(MOD_LALT, KC_3)
22#define KC_SPRT MT(MOD_LALT, KC_8)
23#define KC_GBRC MT(MOD_RGUI, KC_7)
24#define KC_GQOT MT(MOD_LGUI, KC_QUOT)
25#define KC_MESC LT(_MACROS, KC_ESC)
26#define KC_CAD LALT(LCTL(KC_DEL))
27
28enum custom_keycodes {
29 KC_INCL = SAFE_RANGE,
30 KC_PULL,
31 KC_PUSH,
32 KC_SCAP,
33 KC_SCOF
34};
35
36const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
37
38 [_QWERTY] = LAYOUT(
39 //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------.
40 KC_LBRC, KC_1 ,KC_SCTL,KC_SPLT,KC_SPFN, KC_5 , KC_6 ,KC_GBRC,KC_SPRT,KC_SCTR, KC_0 ,KC_RBRC,
41 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
42 KC_MESC, KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_QUOT,
43 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
44 KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_ENT ,
45 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
46 KC_LSPO, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_RSPC,
47 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
48 KC_NMPD,KC_BSPC, KC_SPC ,KC_SYMB
49 //|-------------------------------+-------+-------| |-------+-------+-------------------------------|
50 ),
51
52 [_CAPS] = LAYOUT(
53 //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------.
54 _______,KC_UNDS,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,
55 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
56 _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,
57 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
58 _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,KC_COLN,_______,
59 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
60 KC_SCOF,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_SCOF,
61 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
62 _______,_______, _______,_______
63 //|-------------------------------+-------+-------| |-------+-------+-------------------------------|
64 ),
65
66 [_NUMPAD] = LAYOUT(
67 //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------.
68 _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,KC_MINS,_______,
69 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
70 _______,_______,KC_COLN,_______,_______,_______, _______, KC_7 , KC_8 , KC_9 ,KC_ASTR,_______,
71 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
72 _______,_______,KC_DOT ,_______,_______,_______, _______, KC_4 , KC_5 , KC_6 ,KC_PLUS,_______,
73 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
74 _______,_______,_______,_______,_______,_______, _______, KC_1 , KC_2 , KC_3 ,KC_SLSH,_______,
75 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
76 _______,_______, _______, KC_0
77 //|-------------------------------+-------+-------/ |-------+-------+-------------------------------|
78 ),
79
80 [_SYMBOLS] = LAYOUT(
81 //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------.
82 _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,
83 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
84 _______,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_BSLS,
85 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
86 KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_TILD,KC_EQL ,KC_UNDS,KC_LCBR,KC_RCBR,_______,
87 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
88 KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 , KC_GRV ,KC_PLUS,KC_MINS,KC_LBRC,KC_RBRC,_______,
89 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
90 KC_PIPE,_______, _______,_______
91 //|-------------------------------+-------+-------| |-------+-------+-------------------------------|
92 ),
93
94 [_MACROS] = LAYOUT(
95 //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------.
96 _______,_______,_______,_______,_______,_______, _______ ,_______,_______,_______,_______,_______,
97 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
98 _______,_______,_______,_______,_______,_______, _______ ,_______,KC_INCL,_______,_______,_______,
99 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
100 _______,_______,_______,KC_CAD ,_______,_______, _______ ,_______,_______,_______,_______,_______,
101 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
102 KC_SCAP,_______,_______,_______,_______,_______, _______ ,_______,KC_PULL,KC_PUSH,_______,_______,
103 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
104 _______,_______, _______,_______
105 //|-------------------------------+-------+-------| |-------+-------+-------------------------------|
106 ),
107
108 [_NAV] = LAYOUT(
109 //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------.
110 _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,
111 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
112 _______,_______,_______,_______,_______,_______, _______,KC_PGUP, KC_UP ,KC_PGDN,KC_PSCR,_______,
113 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
114 _______,_______,_______,_______,_______,_______, _______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,
115 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
116 _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,
117 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
118 _______,KC_DEL , _______,_______
119 //|-------------------------------+-------+-------| |-------+-------+-------------------------------|
120 )
121};
122
123
124bool process_record_user(uint16_t keycode, keyrecord_t *record) {
125 switch(keycode) {
126 /* include some kind of library or header */
127 case KC_INCL:
128 if (record->event.pressed) {
129 SEND_STRING("#include <>" SS_TAP(X_LEFT));
130 }
131 return false;
132 case KC_PULL:
133 if (record->event.pressed) {
134 SEND_STRING("git pull\n");
135 }
136 return false;
137 case KC_PUSH:
138 if (record->event.pressed){
139 SEND_STRING("git push\n");
140 }
141 return false;
142 case KC_SCAP:
143 if (record->event.pressed){
144 layer_on(_CAPS);
145 tap_code(KC_CAPS);
146 }
147 return false;
148 case KC_SCOF:
149 if (record->event.pressed){
150 layer_off(_CAPS);
151 tap_code(KC_CAPS);
152 }
153 return false;
154 }
155 return true;
156};
157
158
159void matrix_scan_user(void) {
160 uint8_t layer = get_highest_layer(layer_state);
161
162 switch (layer) {
163 case _QWERTY:
164 set_led_green;
165 break;
166 case _CAPS:
167 set_led_white;
168 break;
169 case _NUMPAD:
170 set_led_blue;
171 break;
172 case _SYMBOLS:
173 set_led_red;
174 break;
175 case _MACROS:
176 set_led_cyan;
177 break;
178 case _NAV:
179 set_led_magenta;
180 break;
181 default:
182 set_led_green;
183 break;
184 }
185};
diff --git a/keyboards/chimera_ortho_plus/matrix.c b/keyboards/chimera_ortho_plus/matrix.c
new file mode 100644
index 000000000..ed6eac2b0
--- /dev/null
+++ b/keyboards/chimera_ortho_plus/matrix.c
@@ -0,0 +1,154 @@
1/*
2Copyright 2012 Jun Wako
3Copyright 2014 Jack Humbert
4
5This program is free software: you can redistribute it and/or modify
6it under the terms of the GNU General Public License as published by
7the Free Software Foundation, either version 2 of the License, or
8(at your option) any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18#include <stdint.h>
19#include <stdbool.h>
20#if defined(__AVR__)
21#include <avr/io.h>
22#endif
23#include "wait.h"
24#include "print.h"
25#include "debug.h"
26#include "util.h"
27#include "matrix.h"
28#include "timer.h"
29
30#if (MATRIX_COLS <= 8)
31# define print_matrix_header() print("\nr/c 01234567\n")
32# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
33# define matrix_bitpop(i) bitpop(matrix[i])
34# define ROW_SHIFTER ((uint8_t)1)
35#elif (MATRIX_COLS <= 16)
36# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n")
37# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row))
38# define matrix_bitpop(i) bitpop16(matrix[i])
39# define ROW_SHIFTER ((uint16_t)1)
40#elif (MATRIX_COLS <= 32)
41# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n")
42# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row))
43# define matrix_bitpop(i) bitpop32(matrix[i])
44# define ROW_SHIFTER ((uint32_t)1)
45#endif
46
47/* matrix state(1:on, 0:off) */
48static matrix_row_t matrix[MATRIX_ROWS];
49
50__attribute__ ((weak))
51void matrix_init_kb(void) {
52 matrix_init_user();
53}
54
55__attribute__ ((weak))
56void matrix_scan_kb(void) {
57 matrix_scan_user();
58}
59
60__attribute__ ((weak))
61void matrix_init_user(void) {
62}
63
64__attribute__ ((weak))
65void matrix_scan_user(void) {
66}
67
68inline
69uint8_t matrix_rows(void) {
70 return MATRIX_ROWS;
71}
72
73inline
74uint8_t matrix_cols(void) {
75 return MATRIX_COLS;
76}
77
78void matrix_init(void) {
79
80 matrix_init_quantum();
81}
82
83uint8_t matrix_scan(void)
84{
85 SERIAL_UART_INIT();
86
87 uint32_t timeout = 0;
88
89 //the s character requests the RF slave to send the matrix
90 SERIAL_UART_DATA = 's';
91
92 //trust the external keystates entirely, erase the last data
93 uint8_t uart_data[14] = {0};
94
95 //there are 10 bytes corresponding to 10 columns, and an end byte
96 for (uint8_t i = 0; i < 14; i++) {
97 //wait for the serial data, timeout if it's been too long
98 //this only happened in testing with a loose wire, but does no
99 //harm to leave it in here
100 while(!SERIAL_UART_RXD_PRESENT){
101 timeout++;
102 if (timeout > 10000){
103 break;
104 }
105 }
106 uart_data[i] = SERIAL_UART_DATA;
107 }
108
109 //check for the end packet, the key state bytes use the LSBs, so 0xE0
110 //will only show up here if the correct bytes were recieved
111 if (uart_data[10] == 0xE0)
112 {
113 //shifting and transferring the keystates to the QMK matrix variable
114 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
115 matrix[i] = (uint16_t) uart_data[i*2] | (uint16_t) uart_data[i*2+1] << 6;
116 }
117 }
118
119
120 matrix_scan_quantum();
121 return 1;
122}
123
124inline
125bool matrix_is_on(uint8_t row, uint8_t col)
126{
127 return (matrix[row] & ((matrix_row_t)1<<col));
128}
129
130inline
131matrix_row_t matrix_get_row(uint8_t row)
132{
133 return matrix[row];
134}
135
136void matrix_print(void)
137{
138 print_matrix_header();
139
140 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
141 phex(row); print(": ");
142 print_matrix_row(row);
143 print("\n");
144 }
145}
146
147uint8_t matrix_key_count(void)
148{
149 uint8_t count = 0;
150 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
151 count += matrix_bitpop(i);
152 }
153 return count;
154}
diff --git a/keyboards/chimera_ortho_plus/readme.md b/keyboards/chimera_ortho_plus/readme.md
new file mode 100644
index 000000000..ad4cb9d39
--- /dev/null
+++ b/keyboards/chimera_ortho_plus/readme.md
@@ -0,0 +1,15 @@
1# Chimera Ortho+
2
3![Chimera Ortho+](https://i.imgur.com/tuDaGdTl.jpg)
4
5A split wireless 50% ortholinear keyboard.
6
7* Keyboard Maintainer: [William Wilson](https://github.com/GlenPickle)
8* Hardware Supported: Chimera Ortho+ PCB, WaveShare core nRF51822
9* Hardware Availability: [Gerbers](https://github.com/GlenPickle/Chimera/tree/master/ortho_plus/gerbers)
10
11Make example for this keyboard (after setting up your build environment):
12
13 make chimera_ortho_plus:default
14
15See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/chimera_ortho_plus/rules.mk b/keyboards/chimera_ortho_plus/rules.mk
new file mode 100644
index 000000000..9ee7e4f65
--- /dev/null
+++ b/keyboards/chimera_ortho_plus/rules.mk
@@ -0,0 +1,37 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader
5# Teensy halfkay
6# Pro Micro caterina
7# Atmel DFU atmel-dfu
8# LUFA DFU lufa-dfu
9# QMK DFU qmk-dfu
10# ATmega32A bootloadHID
11# ATmega328P USBasp
12BOOTLOADER = caterina
13
14# Build Options
15# change yes to no to disable
16#
17BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
18MOUSEKEY_ENABLE = yes # Mouse keys
19EXTRAKEY_ENABLE = yes # Audio control and System control
20CONSOLE_ENABLE = yes # Console for debug
21COMMAND_ENABLE = yes # Commands for debug and configuration
22# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
23SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
24# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
25NKRO_ENABLE = yes # USB Nkey Rollover
26BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
27RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
28MIDI_ENABLE = no # MIDI support
29BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
30AUDIO_ENABLE = no # Audio output
31FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
32HD44780_ENABLE = no # Enable support for HD44780 based LCDs
33UNICODE_ENABLE = yes
34CUSTOM_MATRIX = yes
35
36# project specific files
37SRC = matrix.c