aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKayle Knops <kayle.knops@alltrons.nl>2018-02-12 21:33:09 +0100
committerJack Humbert <jack.humb@gmail.com>2018-02-12 15:45:05 -0500
commit6f1d5f73a4bee1ad0bcc9a1057eb9e355ea5cff0 (patch)
tree340cccf2978ecdfd424dc29f2900adba788c3dce
parent994d94140e16f60515f193337309d89af6e6695e (diff)
downloadqmk_firmware-6f1d5f73a4bee1ad0bcc9a1057eb9e355ea5cff0.tar.gz
qmk_firmware-6f1d5f73a4bee1ad0bcc9a1057eb9e355ea5cff0.zip
Committed initial version of the knops configurator.
-rw-r--r--keyboards/knops/mini/keymaps/knops/config.h24
-rw-r--r--keyboards/knops/mini/keymaps/knops/keymap.c127
-rw-r--r--keyboards/knops/mini/keymaps/knops/readme.md11
3 files changed, 162 insertions, 0 deletions
diff --git a/keyboards/knops/mini/keymaps/knops/config.h b/keyboards/knops/mini/keymaps/knops/config.h
new file mode 100644
index 000000000..999d8876c
--- /dev/null
+++ b/keyboards/knops/mini/keymaps/knops/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/knops/keymap.c b/keyboards/knops/mini/keymaps/knops/keymap.c
new file mode 100644
index 000000000..4e50c29f5
--- /dev/null
+++ b/keyboards/knops/mini/keymaps/knops/keymap.c
@@ -0,0 +1,127 @@
1#include "mini.h"
2
3/*KNOPS_MISC*/
4
5const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
6
7 /*KNOPS_KEYMAP*/
8
9};
10
11void set_led_state(int ledId, bool state) {
12 if(state) {
13 switch(ledId) {
14 /* LED 0 to 5 are the leds of each keyswitch. From left to right, top to bottom. These are equal to the numbers in the legends of the default keycaps. */
15 case 0:
16 PORTD |= (1<<7);
17 break;
18 case 1:
19 PORTC |= (1<<6);
20 break;
21 case 2:
22 PORTD |= (1<<4);
23 break;
24 case 3:
25 PORTE |= (1<<6);
26 break;
27 case 4:
28 PORTB |= (1<<4);
29 break;
30 case 5:
31 PORTD |= (1<<6);
32 break;
33 /* LED 6 to 8 are the three layer leds in front of the device from left to right. */
34 case 6:
35 PORTD &= ~(1<<5);
36 break;
37 case 7:
38 PORTB |= (1<<6);
39 break;
40 case 8:
41 PORTB &= ~(1<<0);
42 break;
43 }
44 } else {
45 switch(ledId) {
46 case 0:
47 PORTD &= ~(1<<7);
48 break;
49 case 1:
50 PORTC &= ~(1<<6);
51 break;
52 case 2:
53 PORTD &= ~(1<<4);
54 break;
55 case 3:
56 PORTE &= ~(1<<6);
57 break;
58 case 4:
59 PORTB &= ~(1<<4);
60 break;
61 case 5:
62 PORTD &= ~(1<<6);
63 break;
64 case 6:
65 PORTD |= (1<<5);
66 break;
67 case 7:
68 PORTB &= ~(1<<6);
69 break;
70 case 8:
71 PORTB |= (1<<0);
72 break;
73 }
74 }
75}
76
77void led_init_ports() {
78 DDRD |= (1<<7);
79 DDRC |= (1<<6);
80 DDRD |= (1<<4);
81 DDRE |= (1<<6);
82 DDRB |= (1<<4);
83 DDRD |= (1<<6);
84
85 DDRD |= (1<<5);
86 DDRB |= (1<<6);
87 DDRB |= (1<<0);
88}
89
90void matrix_init_user(void) {
91 led_init_ports();
92
93 led_set_layer(0);
94
95 /*KNOPS_INIT*/
96}
97
98const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
99 //keyevent_t event = record->event;
100
101 /*KNOPS_MACRO*/
102}
103
104
105void matrix_scan_user(void) {
106 /*KNOPS_SCAN*/
107}
108
109void led_set_user(uint8_t usb_led) {
110
111 /*KNOPS_FUNCTIONALLED_STATES*/
112
113}
114
115void led_set_layer(int layer) {
116
117 /*KNOPS_SIMPLELED_STATES*/
118
119}
120
121bool process_record_user (uint16_t keycode, keyrecord_t *record) {
122
123 /*KNOPS_PROCESS_STATE*/
124
125}
126
127
diff --git a/keyboards/knops/mini/keymaps/knops/readme.md b/keyboards/knops/mini/keymaps/knops/readme.md
new file mode 100644
index 000000000..58696974e
--- /dev/null
+++ b/keyboards/knops/mini/keymaps/knops/readme.md
@@ -0,0 +1,11 @@
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 keymap that our configurator uses to compile new keymaps and features. Here is a screenshot:
8
9![Knops Mini Layout Image](https://i.imgur.com/afH1NOt.png)
10
11As of 12th of february 2018, this tool has not yet been released to the public. You may have a look at our older tool, KBFlasher: [our (almost outdated) configurator tool](http://knops.io/configurator.html) for this. \ No newline at end of file