aboutsummaryrefslogtreecommitdiff
path: root/keyboards/knops
diff options
context:
space:
mode:
authorPawnerd <Pawnerd@users.noreply.github.com>2017-11-02 02:24:59 +0100
committerJack Humbert <jack.humb@gmail.com>2017-11-01 21:24:59 -0400
commit54a8abd785d46c879dfedb740df782b20521e086 (patch)
treeedb73841a403b54a5ad3ced823201d914dca3e0a /keyboards/knops
parentd6ad9787a07288235c9db4a51737f4f8a1a876e5 (diff)
downloadqmk_firmware-54a8abd785d46c879dfedb740df782b20521e086.tar.gz
qmk_firmware-54a8abd785d46c879dfedb740df782b20521e086.zip
Added support for Knops Mini (3x2 macropad) keyboard. (#1953)
* Added support for Knops Mini (3x2 macropad) keyboard. * Added better documentation, according to the QMK standards. * Fixed typo. * Changed names of files to comply with QMK standards. * Ignored makefile in keymap. * Removed makefiles and added my credentials in the copyrights.
Diffstat (limited to 'keyboards/knops')
-rw-r--r--keyboards/knops/mini/config.h190
-rw-r--r--keyboards/knops/mini/keymaps/default/config.h24
-rw-r--r--keyboards/knops/mini/keymaps/default/keymap.c361
-rw-r--r--keyboards/knops/mini/keymaps/default/readme.md7
-rw-r--r--keyboards/knops/mini/mini.c44
-rw-r--r--keyboards/knops/mini/mini.h30
-rw-r--r--keyboards/knops/mini/readme.md21
-rw-r--r--keyboards/knops/mini/rules.mk68
-rw-r--r--keyboards/knops/readme.md10
9 files changed, 755 insertions, 0 deletions
diff --git a/keyboards/knops/mini/config.h b/keyboards/knops/mini/config.h
new file mode 100644
index 000000000..154fbf01f
--- /dev/null
+++ b/keyboards/knops/mini/config.h
@@ -0,0 +1,190 @@
1/*
2Copyright 2017 Pawnerd
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#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEFD
25#define PRODUCT_ID 0x9460
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Alltrons IT
28#define PRODUCT Knops Mini
29#define DESCRIPTION Advanced 3x2 macrokeyboard
30
31/* key matrix size */
32#define MATRIX_ROWS 1
33#define MATRIX_COLS 6
34
35/*
36 * Keyboard Matrix Assignments
37 *
38 * Change this to how you wired your keyboard
39 * COLS: AVR pins used for columns, left to right
40 * ROWS: AVR pins used for rows, top to bottom
41 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
42 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
43 *
44*/
45#define MATRIX_ROW_PINS { D0 }
46#define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0 }
47#define UNUSED_PINS
48
49/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
50#define DIODE_DIRECTION COL2ROW
51
52// #define BACKLIGHT_PIN B7
53// #define BACKLIGHT_BREATHING
54// #define BACKLIGHT_LEVELS 3
55
56
57/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
58#define DEBOUNCING_DELAY 5
59
60/* define if matrix has ghost (lacks anti-ghosting diodes) */
61//#define MATRIX_HAS_GHOST
62
63/* number of backlight levels */
64
65/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
66#define LOCKING_SUPPORT_ENABLE
67/* Locking resynchronize hack */
68#define LOCKING_RESYNC_ENABLE
69
70/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
71 * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
72 */
73// #define GRAVE_ESC_CTRL_OVERRIDE
74
75/*
76 * Force NKRO
77 *
78 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
79 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
80 * makefile for this to work.)
81 *
82 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
83 * until the next keyboard reset.
84 *
85 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
86 * fully operational during normal computer usage.
87 *
88 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
89 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
90 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
91 * power-up.
92 *
93 */
94//#define FORCE_NKRO
95
96/*
97 * Magic Key Options
98 *
99 * Magic keys are hotkey commands that allow control over firmware functions of
100 * the keyboard. They are best used in combination with the HID Listen program,
101 * found here: https://www.pjrc.com/teensy/hid_listen.html
102 *
103 * The options below allow the magic key functionality to be changed. This is
104 * useful if your keyboard/keypad is missing keys and you want magic key support.
105 *
106 */
107
108/* key combination for magic key command */
109#define IS_COMMAND() ( \
110 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
111)
112
113/* control how magic key switches layers */
114//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
115//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
116//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
117
118/* override magic key keymap */
119//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
120//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
121//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
122//#define MAGIC_KEY_HELP1 H
123//#define MAGIC_KEY_HELP2 SLASH
124//#define MAGIC_KEY_DEBUG D
125//#define MAGIC_KEY_DEBUG_MATRIX X
126//#define MAGIC_KEY_DEBUG_KBD K
127//#define MAGIC_KEY_DEBUG_MOUSE M
128//#define MAGIC_KEY_VERSION V
129//#define MAGIC_KEY_STATUS S
130//#define MAGIC_KEY_CONSOLE C
131//#define MAGIC_KEY_LAYER0_ALT1 ESC
132//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
133//#define MAGIC_KEY_LAYER0 0
134//#define MAGIC_KEY_LAYER1 1
135//#define MAGIC_KEY_LAYER2 2
136//#define MAGIC_KEY_LAYER3 3
137//#define MAGIC_KEY_LAYER4 4
138//#define MAGIC_KEY_LAYER5 5
139//#define MAGIC_KEY_LAYER6 6
140//#define MAGIC_KEY_LAYER7 7
141//#define MAGIC_KEY_LAYER8 8
142//#define MAGIC_KEY_LAYER9 9
143//#define MAGIC_KEY_BOOTLOADER PAUSE
144//#define MAGIC_KEY_LOCK CAPS
145//#define MAGIC_KEY_EEPROM E
146//#define MAGIC_KEY_NKRO N
147//#define MAGIC_KEY_SLEEP_LED Z
148
149/*
150 * Feature disable options
151 * These options are also useful to firmware size reduction.
152 */
153
154/* disable debug print */
155//#define NO_DEBUG
156
157/* disable print */
158//#define NO_PRINT
159
160/* disable action features */
161//#define NO_ACTION_LAYER
162//#define NO_ACTION_TAPPING
163//#define NO_ACTION_ONESHOT
164//#define NO_ACTION_MACRO
165//#define NO_ACTION_FUNCTION
166
167/*
168 * MIDI options
169 */
170
171/* Prevent use of disabled MIDI features in the keymap */
172//#define MIDI_ENABLE_STRICT 1
173
174/* enable basic MIDI features:
175 - MIDI notes can be sent when in Music mode is on
176*/
177//#define MIDI_BASIC
178
179/* enable advanced MIDI features:
180 - MIDI notes can be added to the keymap
181 - Octave shift and transpose
182 - Virtual sustain, portamento, and modulation wheel
183 - etc.
184*/
185//#define MIDI_ADVANCED
186
187/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
188//#define MIDI_TONE_KEYCODE_OCTAVES 1
189
190#endif
diff --git a/keyboards/knops/mini/keymaps/default/config.h b/keyboards/knops/mini/keymaps/default/config.h
new file mode 100644
index 000000000..999d8876c
--- /dev/null
+++ b/keyboards/knops/mini/keymaps/default/config.h
@@ -0,0 +1,24 @@
1/* Copyright 2017 Pawnerd
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef CONFIG_USER_H
18#define CONFIG_USER_H
19
20#include "../../config.h"
21
22// place overrides here
23
24#endif
diff --git a/keyboards/knops/mini/keymaps/default/keymap.c b/keyboards/knops/mini/keymaps/default/keymap.c
new file mode 100644
index 000000000..e7773c0c0
--- /dev/null
+++ b/keyboards/knops/mini/keymaps/default/keymap.c
@@ -0,0 +1,361 @@
1#include "mini.h"
2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4
5 KEYMAP(
6 LT(3, KC_MSTP), KC_VOLU, KC_MPLY, KC_MPRV, KC_VOLD, KC_MNXT),
7
8 KEYMAP(
9 LT(3, KC_ESC), M(3), M(4), M(5), M(6), M(7)),
10
11 KEYMAP(
12 LT(3, KC_1), KC_2, KC_3, KC_4, M(0), M(1)),
13
14 KEYMAP(
15 KC_TRNS, KC_TRNS, RESET, TO(0), TO(1), TO(2)),
16
17 KEYMAP(
18 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
19
20 KEYMAP(
21 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
22
23 KEYMAP(
24 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
25
26 KEYMAP(
27 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
28
29 KEYMAP(
30 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
31
32 KEYMAP(
33 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
34
35 KEYMAP(
36 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
37
38 KEYMAP(
39 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
40
41 KEYMAP(
42 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
43
44 KEYMAP(
45 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
46
47 KEYMAP(
48 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
49
50 KEYMAP(
51 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
52
53};
54
55const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
56 //keyevent_t event = record->event;
57
58 switch (id) {
59 case 0:
60 if (record->event.pressed) {
61 return MACRO( T(T), T(G), T(L), T(H), T(F), T(ENT), END );
62 }
63 break;
64 case 1:
65 if (record->event.pressed) {
66 return MACRO( T(T), T(G), T(G), T(ENT), END );
67 }
68 break;
69 case 2:
70 if (record->event.pressed) {
71 return MACRO( D(NO), T(L), U(NO), END );
72 }
73 break;
74 case 3:
75 if (record->event.pressed) {
76 return MACRO( D(LCTL), T(Z), U(LCTL), END );
77 }
78 break;
79 case 4:
80 if (record->event.pressed) {
81 return MACRO( D(LCTL), D(LSFT), T(Z), U(LSFT), U(LCTL), END );
82 }
83 break;
84 case 5:
85 if (record->event.pressed) {
86 return MACRO( D(LCTL), T(X), U(LCTL), END );
87 }
88 break;
89 case 6:
90 if (record->event.pressed) {
91 return MACRO( D(LCTL), T(C), U(LCTL), END );
92 }
93 break;
94 case 7:
95 if (record->event.pressed) {
96 return MACRO( D(LCTL), T(V), U(LCTL), END );
97 }
98 break;
99 }
100 return MACRO_NONE;
101}
102
103void set_switch_led(int ledId, bool state) {
104 if(state) {
105 switch(ledId) {
106 case 1:
107 PORTD |= (1<<7);
108 break;
109 case 2:
110 PORTC |= (1<<6);
111 break;
112 case 3:
113 PORTD |= (1<<4);
114 break;
115 case 4:
116 PORTE |= (1<<6);
117 break;
118 case 5:
119 PORTB |= (1<<4);
120 break;
121 case 6:
122 PORTD |= (1<<6);
123 break;
124 }
125 } else {
126 switch(ledId) {
127 case 1:
128 PORTD &= ~(1<<7);
129 break;
130 case 2:
131 PORTC &= ~(1<<6);
132 break;
133 case 3:
134 PORTD &= ~(1<<4);
135 break;
136 case 4:
137 PORTE &= ~(1<<6);
138 break;
139 case 5:
140 PORTB &= ~(1<<4);
141 break;
142 case 6:
143 PORTD &= ~(1<<6);
144 break;
145 }
146 }
147}
148
149
150void set_layer_led(int layerId) {
151 PORTD |= (1<<5);
152 PORTB &= ~(1<<6);
153 PORTB |= (1<<0);
154 switch(layerId) {
155 case 0:
156 PORTD &= ~(1<<5);
157 break;
158 case 1:
159 PORTB |= (1<<6);
160 break;
161 case 2:
162 PORTB &= ~(1<<0);
163 break;
164 }
165}
166
167void matrix_init_user(void) {
168 led_init_ports();
169
170
171 PORTD |= (1<<7);
172 PORTC |= (1<<6);
173 PORTD |= (1<<4);
174 PORTE |= (1<<6);
175 PORTB |= (1<<4);
176 PORTD |= (1<<6);
177
178 set_layer_led(0);
179}
180
181void matrix_scan_user(void) {
182}
183
184void led_init_ports() {
185 // led voor switch #1
186 DDRD |= (1<<7);
187 PORTD &= ~(1<<7);
188
189 // led voor switch #2
190 DDRC |= (1<<6);
191 PORTC &= ~(1<<6);
192
193 // led voor switch #3
194 DDRD |= (1<<4);
195 PORTD &= ~(1<<4);
196
197 // led voor switch #4
198 DDRE |= (1<<6);
199 PORTE &= ~(1<<6);
200
201 // led voor switch #5
202 DDRB |= (1<<4);
203 PORTB &= ~(1<<4);
204
205 // led voor switch #6
206 DDRD |= (1<<6);
207 PORTD &= ~(1<<6);
208
209 /*
210 DDRD |= (1<<7);
211 PORTD |= (1<<7);
212
213 DDRC |= (1<<6);
214 PORTC |= (1<<6);
215
216 DDRD |= (1<<4);
217 PORTD |= (1<<4);
218
219 DDRE |= (1<<6);
220 PORTE |= (1<<6);
221
222 DDRB |= (1<<4);
223 PORTB |= (1<<4);
224
225 DDRD |= (1<<6);
226 PORTD |= (1<<6);
227 // */
228
229 DDRD |= (1<<5);
230 DDRB |= (1<<6);
231 DDRB |= (1<<0);
232 //led_set_layer(0);
233}
234
235void led_set_user(uint8_t usb_led) {
236
237 if (usb_led & (1 << USB_LED_NUM_LOCK)) {
238
239 } else {
240
241 }
242
243 if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
244
245 } else {
246
247 }
248
249 if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
250
251 } else {
252
253 }
254
255 if (usb_led & (1 << USB_LED_COMPOSE)) {
256
257 } else {
258
259 }
260
261 if (usb_led & (1 << USB_LED_KANA)) {
262
263 } else {
264
265 }
266
267}
268
269
270/*
271* NOTE:
272*
273* In case you don't understand this coding stuff, please
274* feel free to mail me or post something
275* at the /r/knops subreddit and I will configure the code as
276* you wish for your needs to make the LEDs do what you want :-).
277*
278* Contact me at: support@knops.io
279*
280*
281* Knops Mini LED Numbers:
282* _____ _____ _____
283* | | | | | |
284* | 1 | | 2 | | 3 | <---
285* |_____| |_____| |_____| | These LEDs are called 'Switch LEDs'
286* _____ _____ _____ |----- To turn on/off these leds, use:
287* | | | | | | | set_switch_led( [1-6], [true/false]);
288* | 4 | | 5 | | 6 | <---
289* |_____| |_____| |_____|
290*
291* < 0 > < 1 > < 2 > <--- These front-LEDs are called 'Layer LEDs'
292* To turn one of them on, use:
293* set_layer_led( [0-2] );
294*
295*/
296
297/*
298* This function led_set_layer gets called when you switch between layers.
299* It allows you to turn on and off leds for each different layer and do
300* other cool stuff. Currently the GUI does not have LED support. I am working
301* on that, but takes time.
302*/
303void led_set_layer(int layer) {
304 switch(layer) {
305
306 /**
307 * Here is an example to turn LEDs on and of. By default:
308 * - the LEDs are turned on in layer 0
309 * - the LEDs are turned off in layer 1
310 * - the LEDs don't change from state for layer 2
311 */
312
313 case 0:
314 set_layer_led(0); // Turn on only the first/left layer indicator
315 set_switch_led(1, true);
316 set_switch_led(2, true);
317 set_switch_led(3, true);
318 set_switch_led(4, true);
319 set_switch_led(5, true);
320 set_switch_led(6, true);
321 break;
322
323 case 1:
324 set_layer_led(1); // Turn on only the second/middle layer indicator
325 set_switch_led(1, false);
326 set_switch_led(2, false);
327 set_switch_led(3, false);
328 set_switch_led(4, false);
329 set_switch_led(5, false);
330 set_switch_led(6, false);
331 break;
332
333 case 2:
334 set_layer_led(2); // Turn on only the third/right layer indicator
335
336 // Keep leds for layer two in their current state, since we don't use set_switch_led(SWITCH_ID, TRUE_OR_FALSE)
337
338 break;
339 }
340}
341
342bool process_record_user (uint16_t keycode, keyrecord_t *record) {
343 switch(keycode) {
344 case TO(0):
345 if (record->event.pressed) {
346 led_set_layer(0);
347 }
348 break;
349 case TO(1):
350 if (record->event.pressed) {
351 led_set_layer(1);
352 }
353 break;
354 case TO(2):
355 if (record->event.pressed) {
356 led_set_layer(2);
357 }
358 break;
359 }
360 return true;
361} \ No newline at end of file
diff --git a/keyboards/knops/mini/keymaps/default/readme.md b/keyboards/knops/mini/keymaps/default/readme.md
new file mode 100644
index 000000000..61479b486
--- /dev/null
+++ b/keyboards/knops/mini/keymaps/default/readme.md
@@ -0,0 +1,7 @@
1# Default Knops Mini Layout
2
3![Knops logo](http://knops.io/img/Knops_logo.jpg)
4
5![Knops Mini Layout Image](https://i.imgur.com/WQBQctm.png)
6
7This is the default layout that comes flashed on every Knops Mini. For your use, you probably want to change this. We suggest you to use [our configurator tool](http://knops.io/configurator.html) for this. \ No newline at end of file
diff --git a/keyboards/knops/mini/mini.c b/keyboards/knops/mini/mini.c
new file mode 100644
index 000000000..ccfd4331b
--- /dev/null
+++ b/keyboards/knops/mini/mini.c
@@ -0,0 +1,44 @@
1/* Copyright 2017 Kayle Knops
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include "mini.h"
17/*
18void matrix_init_kb(void) {
19 // put your keyboard start-up code here
20 // runs once when the firmware starts up
21
22 matrix_init_user();
23}
24
25void matrix_scan_kb(void) {
26 // put your looping keyboard code here
27 // runs every cycle (a lot)
28
29 matrix_scan_user();
30}
31
32bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
33 // put your per-action keyboard code here
34 // runs for every action, just before processing by the firmware
35
36 return process_record_user(keycode, record);
37}
38
39void led_set_kb(uint8_t usb_led) {
40 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
41
42 led_set_user(usb_led);
43}
44*/ \ No newline at end of file
diff --git a/keyboards/knops/mini/mini.h b/keyboards/knops/mini/mini.h
new file mode 100644
index 000000000..c9f74711b
--- /dev/null
+++ b/keyboards/knops/mini/mini.h
@@ -0,0 +1,30 @@
1/* Copyright 2017 Pawnerd
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include "quantum.h"
17
18#ifndef KNOPS_MINI_H
19#define KNOPS_MINI_H
20
21// This a shortcut to help you visually see your layout.
22// The following is an example using the Planck MIT layout
23// The first section contains all of the arguments
24// The second converts the arguments into a two-dimensional array
25#define KEYMAP( \
26 K00, K01, K02, K03, K04, K05 \
27) { \
28 { K00, K01, K02, K03, K04, K05 }, \
29}
30#endif \ No newline at end of file
diff --git a/keyboards/knops/mini/readme.md b/keyboards/knops/mini/readme.md
new file mode 100644
index 000000000..86cff4a61
--- /dev/null
+++ b/keyboards/knops/mini/readme.md
@@ -0,0 +1,21 @@
1# Knops Mini
2
3![Knops logo](http://knops.io/img/Knops_logo.jpg)
4
5![Knops mini keyboard](https://i.imgur.com/AMrXVi4.jpg)
6
7A fully customizable 3x2 macropad. An exploded view of the keyboard is [available here](https://i.imgur.com/H83l5H8.gif).
8
9*The best way to change settings on your keyboard*, is by using [our official configurator tool](http://knops.io/configurator.html).
10
11* Keyboard Maintainer: [Pawnerd](https://github.com/pawnerd)
12* Contact / Questions (by e-mail): kayle `at` knops `dot` io
13* Hardware Supported: Knops Mini
14 * rev1 (1.0) (Sold by CMStore EU/USA/CAD from 27th of august, 2017)
15* Hardware Availability: [knops.io](http://knops.io/knopsmini.html), [Direct EU](http://www.cmstore.eu/maker-made/knops-mini-macro-keyboard/), [Direct USA/CAN](http://www.cmstore-usa.com/knops-mini-macro-keyboard/)
16
17Make example for this keyboard (after setting up your build environment):
18
19 make knops/mini:default
20
21See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ No newline at end of file
diff --git a/keyboards/knops/mini/rules.mk b/keyboards/knops/mini/rules.mk
new file mode 100644
index 000000000..ca2a2a5f8
--- /dev/null
+++ b/keyboards/knops/mini/rules.mk
@@ -0,0 +1,68 @@
1# MCU name
2#MCU = at90usb1286
3MCU = atmega32u4
4
5# Processor frequency.
6# This will define a symbol, F_CPU, in all source code files equal to the
7# processor frequency in Hz. You can then use this symbol in your source code to
8# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
9# automatically to create a 32-bit value in your source code.
10#
11# This will be an integer division of F_USB below, as it is sourced by
12# F_USB after it has run through any CPU prescalers. Note that this value
13# does not *change* the processor frequency - it should merely be updated to
14# reflect the processor speed set externally so that the code can use accurate
15# software delays.
16F_CPU = 16000000
17
18
19#
20# LUFA specific
21#
22# Target architecture (see library "Board Types" documentation).
23ARCH = AVR8
24
25# Input clock frequency.
26# This will define a symbol, F_USB, in all source code files equal to the
27# input clock frequency (before any prescaling is performed) in Hz. This value may
28# differ from F_CPU if prescaling is used on the latter, and is required as the
29# raw input clock is fed directly to the PLL sections of the AVR for high speed
30# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
31# at the end, this will be done automatically to create a 32-bit value in your
32# source code.
33#
34# If no clock division is performed on the input clock inside the AVR (via the
35# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
36F_USB = $(F_CPU)
37
38# Interrupt driven control endpoint task(+60)
39OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
40
41
42# Boot Section Size in *bytes*
43# Teensy halfKay 512
44# Teensy++ halfKay 1024
45# Atmel DFU loader 4096
46# LUFA bootloader 4096
47# USBaspLoader 2048
48OPT_DEFS += -DBOOTLOADER_SIZE=4096
49
50
51# Build Options
52# change yes to no to disable
53#
54BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
55MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
56EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
57CONSOLE_ENABLE ?= yes # Console for debug(+400)
58COMMAND_ENABLE ?= yes # Commands for debug and configuration
59# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
60SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
61# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
62NKRO_ENABLE ?= no # USB Nkey Rollover
63BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
64MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config)
65UNICODE_ENABLE ?= no # Unicode
66BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
67AUDIO_ENABLE ?= no # Audio output on port C6
68FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
diff --git a/keyboards/knops/readme.md b/keyboards/knops/readme.md
new file mode 100644
index 000000000..563099b6d
--- /dev/null
+++ b/keyboards/knops/readme.md
@@ -0,0 +1,10 @@
1# Knops
2
3![Knops Mini Logo](http://knops.io/img/Knops_logo.jpg)
4
5[Knops](http://www.knops.io/) makes fully customizable custom keyboards in a variety of formfactors. So far the Knops Mini, a 3x2 macro keypad is the biggest success. Inside this directory you'll find support for the entire line of Knops products.
6
7* Maintainer: [Pawnerd](https://github.com/pawnerd)
8* Hardware Supported:
9 * [`Mini`](mini/): Knops Mini
10* Hardware Availability: [knops.io](https://www.knops.io/) \ No newline at end of file