aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-01-22 16:49:05 +0000
committerQMK Bot <hello@qmk.fm>2021-01-22 16:49:05 +0000
commitf52baa4bc10be215a249b8c6c1f9866d65191b91 (patch)
treeacacab6ce4a52de4587e88724e3c4ce4a6d03894
parent1c3ec3a91fa61ab39e0361e87314ca12187f1ba5 (diff)
parent188c0bacb05335067bf79c2380eb0dca189a5c55 (diff)
downloadqmk_firmware-f52baa4bc10be215a249b8c6c1f9866d65191b91.tar.gz
qmk_firmware-f52baa4bc10be215a249b8c6c1f9866d65191b91.zip
Merge remote-tracking branch 'origin/master' into develop
-rw-r--r--keyboards/handwired/woodpad/config.h141
-rw-r--r--keyboards/handwired/woodpad/info.json37
-rw-r--r--keyboards/handwired/woodpad/keymaps/default/config.h19
-rw-r--r--keyboards/handwired/woodpad/keymaps/default/keymap.c179
-rw-r--r--keyboards/handwired/woodpad/keymaps/default/readme.md2
-rw-r--r--keyboards/handwired/woodpad/keymaps/default/rules.mk19
-rw-r--r--keyboards/handwired/woodpad/readme.md31
-rw-r--r--keyboards/handwired/woodpad/rules.mk28
-rw-r--r--keyboards/handwired/woodpad/woodpad.c31
-rw-r--r--keyboards/handwired/woodpad/woodpad.h30
10 files changed, 214 insertions, 303 deletions
diff --git a/keyboards/handwired/woodpad/config.h b/keyboards/handwired/woodpad/config.h
index 72b9fabab..9894fe133 100644
--- a/keyboards/handwired/woodpad/config.h
+++ b/keyboards/handwired/woodpad/config.h
@@ -1,5 +1,5 @@
1/* 1/*
2Copyright 2017 2Copyright 2017 WoodKeys
3 3
4This program is free software: you can redistribute it and/or modify 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 5it under the terms of the GNU General Public License as published by
@@ -15,17 +15,16 @@ You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/ 16*/
17 17
18#ifndef CONFIG_H 18#pragma once
19#define CONFIG_H
20 19
21#include "config_common.h" 20#include "config_common.h"
22 21
23/* USB Device descriptor parameter */ 22/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED 23#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x6069 24#define PRODUCT_ID 0x6069
26#define DEVICE_VER 0x0001 25#define DEVICE_VER 0x0001
27#define MANUFACTURER WoodKeys.click 26#define MANUFACTURER WoodKeys.click
28#define PRODUCT woodpad 27#define PRODUCT Woodpad
29 28
30/* key matrix size */ 29/* key matrix size */
31#define MATRIX_ROWS 5 30#define MATRIX_ROWS 5
@@ -40,17 +39,45 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
40 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) 39 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
41 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) 40 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
42 * 41 *
43*/ 42 */
44#define MATRIX_ROW_PINS { D1, D0, D4, C6, D7 } 43#define MATRIX_ROW_PINS { D1, D0, D4, C6, D7 }
45#define MATRIX_COL_PINS { B1, B3, B2, B6 } 44#define MATRIX_COL_PINS { B1, B3, B2, B6 }
46#define UNUSED_PINS 45#define UNUSED_PINS
47 46
48/* COL2ROW, ROW2COL*/ 47/* COL2ROW, ROW2COL */
49#define DIODE_DIRECTION COL2ROW 48#define DIODE_DIRECTION COL2ROW
50 49
51// #define BACKLIGHT_PIN B7 50//#define BACKLIGHT_PIN B7
52// #define BACKLIGHT_BREATHING 51//#define BACKLIGHT_BREATHING
53// #define BACKLIGHT_LEVELS 3 52//#define BACKLIGHT_LEVELS 3
53
54//#define RGB_DI_PIN E2
55//#ifdef RGB_DI_PIN
56//# define RGBLED_NUM 16
57//# define RGBLIGHT_HUE_STEP 8
58//# define RGBLIGHT_SAT_STEP 8
59//# define RGBLIGHT_VAL_STEP 8
60//# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
61//# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
62/*== all animations enable ==*/
63//# define RGBLIGHT_ANIMATIONS
64/*== or choose animations ==*/
65//# define RGBLIGHT_EFFECT_BREATHING
66//# define RGBLIGHT_EFFECT_RAINBOW_MOOD
67//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
68//# define RGBLIGHT_EFFECT_SNAKE
69//# define RGBLIGHT_EFFECT_KNIGHT
70//# define RGBLIGHT_EFFECT_CHRISTMAS
71//# define RGBLIGHT_EFFECT_STATIC_GRADIENT
72//# define RGBLIGHT_EFFECT_RGB_TEST
73//# define RGBLIGHT_EFFECT_ALTERNATING
74/*== customize breathing effect ==*/
75/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
76//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
77/*==== use exp() and sin() ====*/
78//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
79//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
80//#endif
54 81
55/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ 82/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
56#define DEBOUNCE 5 83#define DEBOUNCE 5
@@ -58,13 +85,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
58/* define if matrix has ghost (lacks anti-ghosting diodes) */ 85/* define if matrix has ghost (lacks anti-ghosting diodes) */
59//#define MATRIX_HAS_GHOST 86//#define MATRIX_HAS_GHOST
60 87
61/* number of backlight levels */
62
63/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ 88/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
64#define LOCKING_SUPPORT_ENABLE 89#define LOCKING_SUPPORT_ENABLE
65/* Locking resynchronize hack */ 90/* Locking resynchronize hack */
66#define LOCKING_RESYNC_ENABLE 91#define LOCKING_RESYNC_ENABLE
67 92
93/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
94 * This is useful for the Windows task manager shortcut (ctrl+shift+esc).
95 */
96//#define GRAVE_ESC_CTRL_OVERRIDE
97
68/* 98/*
69 * Force NKRO 99 * Force NKRO
70 * 100 *
@@ -87,54 +117,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
87//#define FORCE_NKRO 117//#define FORCE_NKRO
88 118
89/* 119/*
90 * Magic Key Options
91 *
92 * Magic keys are hotkey commands that allow control over firmware functions of
93 * the keyboard. They are best used in combination with the HID Listen program,
94 * found here: https://www.pjrc.com/teensy/hid_listen.html
95 *
96 * The options below allow the magic key functionality to be changed. This is
97 * useful if your keyboard/keypad is missing keys and you want magic key support.
98 *
99 */
100
101/* control how magic key switches layers */
102//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
103//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
104//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
105
106/* override magic key keymap */
107//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
108//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
109//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
110//#define MAGIC_KEY_HELP1 H
111//#define MAGIC_KEY_HELP2 SLASH
112//#define MAGIC_KEY_DEBUG D
113//#define MAGIC_KEY_DEBUG_MATRIX X
114//#define MAGIC_KEY_DEBUG_KBD K
115//#define MAGIC_KEY_DEBUG_MOUSE M
116//#define MAGIC_KEY_VERSION V
117//#define MAGIC_KEY_STATUS S
118//#define MAGIC_KEY_CONSOLE C
119//#define MAGIC_KEY_LAYER0_ALT1 ESC
120//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
121//#define MAGIC_KEY_LAYER0 0
122//#define MAGIC_KEY_LAYER1 1
123//#define MAGIC_KEY_LAYER2 2
124//#define MAGIC_KEY_LAYER3 3
125//#define MAGIC_KEY_LAYER4 4
126//#define MAGIC_KEY_LAYER5 5
127//#define MAGIC_KEY_LAYER6 6
128//#define MAGIC_KEY_LAYER7 7
129//#define MAGIC_KEY_LAYER8 8
130//#define MAGIC_KEY_LAYER9 9
131//#define MAGIC_KEY_BOOTLOADER PAUSE
132//#define MAGIC_KEY_LOCK CAPS
133//#define MAGIC_KEY_EEPROM E
134//#define MAGIC_KEY_NKRO N
135//#define MAGIC_KEY_SLEEP_LED Z
136
137/*
138 * Feature disable options 120 * Feature disable options
139 * These options are also useful to firmware size reduction. 121 * These options are also useful to firmware size reduction.
140 */ 122 */
@@ -149,30 +131,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
149//#define NO_ACTION_LAYER 131//#define NO_ACTION_LAYER
150//#define NO_ACTION_TAPPING 132//#define NO_ACTION_TAPPING
151//#define NO_ACTION_ONESHOT 133//#define NO_ACTION_ONESHOT
152//#define NO_ACTION_MACRO
153//#define NO_ACTION_FUNCTION
154
155/*
156 * MIDI options
157 */
158
159/* Prevent use of disabled MIDI features in the keymap */
160//#define MIDI_ENABLE_STRICT 1
161
162/* enable basic MIDI features:
163 - MIDI notes can be sent when in Music mode is on
164*/
165//#define MIDI_BASIC
166
167/* enable advanced MIDI features:
168 - MIDI notes can be added to the keymap
169 - Octave shift and transpose
170 - Virtual sustain, portamento, and modulation wheel
171 - etc.
172*/
173//#define MIDI_ADVANCED
174 134
175/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ 135/* disable these deprecated features by default */
176//#define MIDI_TONE_KEYCODE_OCTAVES 1 136#define NO_ACTION_MACRO
137#define NO_ACTION_FUNCTION
177 138
178#endif 139/* Bootmagic Lite key configuration */
140//#define BOOTMAGIC_LITE_ROW 0
141//#define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/handwired/woodpad/info.json b/keyboards/handwired/woodpad/info.json
new file mode 100644
index 000000000..96c28fa5e
--- /dev/null
+++ b/keyboards/handwired/woodpad/info.json
@@ -0,0 +1,37 @@
1{
2 "keyboard_name": "Woodpad",
3 "url": "",
4 "maintainer": "qmk",
5 "width": 4,
6 "height": 5,
7 "layouts": {
8 "LAYOUT_ortho_5x4": {
9 "layout": [
10 {"x": 0, "y": 0},
11 {"x": 1, "y": 0},
12 {"x": 2, "y": 0},
13 {"x": 3, "y": 0},
14
15 {"x": 0, "y": 1},
16 {"x": 1, "y": 1},
17 {"x": 2, "y": 1},
18 {"x": 3, "y": 1},
19
20 {"x": 0, "y": 2},
21 {"x": 1, "y": 2},
22 {"x": 2, "y": 2},
23 {"x": 3, "y": 2},
24
25 {"x": 0, "y": 3},
26 {"x": 1, "y": 3},
27 {"x": 2, "y": 3},
28 {"x": 3, "y": 3},
29
30 {"x": 0, "y": 4},
31 {"x": 1, "y": 4},
32 {"x": 2, "y": 4},
33 {"x": 3, "y": 4}
34 ]
35 }
36 }
37}
diff --git a/keyboards/handwired/woodpad/keymaps/default/config.h b/keyboards/handwired/woodpad/keymaps/default/config.h
deleted file mode 100644
index a72596783..000000000
--- a/keyboards/handwired/woodpad/keymaps/default/config.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/* Copyright 2017 REPLACE_WITH_YOUR_NAME
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#pragma once
18
19// place overrides here
diff --git a/keyboards/handwired/woodpad/keymaps/default/keymap.c b/keyboards/handwired/woodpad/keymaps/default/keymap.c
index 838c14ead..059d46087 100644
--- a/keyboards/handwired/woodpad/keymaps/default/keymap.c
+++ b/keyboards/handwired/woodpad/keymaps/default/keymap.c
@@ -1,4 +1,4 @@
1/* Copyright 2017 REPLACE_WITH_YOUR_NAME 1/* Copyright 2017 WoodKeys
2 * 2 *
3 * This program is free software: you can redistribute it and/or modify 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 4 * it under the terms of the GNU General Public License as published by
@@ -13,115 +13,88 @@
13 * You should have received a copy of the GNU General Public License 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/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16
16#include QMK_KEYBOARD_H 17#include QMK_KEYBOARD_H
17 18
18// Each layer gets a name for readability, which is then used in the keymap matrix below. 19enum layer_names {
19// The underscores don't mean anything - you can have a layer called STUFF or any other name. 20 _NUMLOCK,
20// Layer names don't all need to be of the same length, obviously, and you can also skip them 21 _NAV,
21// entirely and just use numbers. 22 _ALT,
22#define _NUMLOCK 0 23 _ADJUST
23#define _NAV 1 24};
24#define _ALT 2
25#define _ADJUST 3
26 25
27const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 26const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
28[_NUMLOCK] = KEYMAP( /* Base */ 27 [_NUMLOCK] = LAYOUT_ortho_5x4( /* Base */
29 KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\ 28 KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
30 KC_P7, KC_P8, KC_P9, KC_PPLS, \ 29 KC_P7, KC_P8, KC_P9, KC_PPLS,
31 KC_P4, KC_P5, KC_P6, KC_PEQL, \ 30 KC_P4, KC_P5, KC_P6, KC_PEQL,
32 KC_P1, KC_P2, KC_P3, KC_COMM, \ 31 KC_P1, KC_P2, KC_P3, KC_COMM,
33 KC_LALT, KC_P0, KC_PDOT, KC_PENT \ 32 KC_LALT, KC_P0, KC_PDOT, KC_PENT
34), 33 ),
35[_NAV] = KEYMAP( /* Base */ 34 [_NAV] = LAYOUT_ortho_5x4( /* Base */
36 _______, _______, _______, _______,\ 35 _______, _______, _______, _______,
37 KC_HOME, KC_UP, KC_PGUP, _______, \ 36 KC_HOME, KC_UP, KC_PGUP, _______,
38 KC_LEFT, XXXXXXX, KC_RIGHT, _______, \ 37 KC_LEFT, XXXXXXX, KC_RGHT, _______,
39 KC_END, KC_DOWN, KC_PGDN, _______, \ 38 KC_END, KC_DOWN, KC_PGDN, _______,
40 _______, KC_INS, KC_DEL, _______ \ 39 _______, KC_INS, KC_DEL, _______
41), 40 ),
42[_ALT] = KEYMAP( /* Base */ 41 [_ALT] = LAYOUT_ortho_5x4( /* Base */
43 _______, KC_MUTE, KC_VOLD, KC_VOLU,\ 42 _______, KC_MUTE, KC_VOLD, KC_VOLU,
44 _______, _______, _______, _______, \ 43 _______, _______, _______, _______,
45 _______, _______, _______, _______, \ 44 _______, _______, _______, _______,
46 _______, _______, _______, _______, \ 45 _______, _______, _______, _______,
47 _______, _______, _______, _______ \ 46 _______, _______, _______, _______
48), 47 ),
49[_ADJUST] = KEYMAP( /* Base */ 48 [_ADJUST] = LAYOUT_ortho_5x4( /* Base */
50 _______, KC_A, _______, RESET,\ 49 _______, KC_A, _______, RESET,
51 _______, _______, _______, _______, \ 50 _______, _______, _______, _______,
52 _______, _______, _______, _______, \ 51 _______, _______, _______, _______,
53 _______, _______, _______, _______, \ 52 _______, _______, _______, _______,
54 _______, _______, _______, _______ \ 53 _______, _______, _______, _______
55), 54 )
56}; 55};
57 56
58void numlock_led_on(void) {
59 PORTF |= (1<<7);
60}
61
62void numlock_led_off(void) {
63 PORTF &= ~(1<<7);
64}
65
66static bool numlock_down = false; 57static bool numlock_down = false;
67 58
68bool process_record_user(uint16_t keycode, keyrecord_t *record) { 59bool process_record_user(uint16_t keycode, keyrecord_t *record) {
69 switch (keycode) { 60 switch (keycode) {
70 case KC_NLCK: 61 case KC_NLCK:
71 if (record->event.pressed) { 62 if (record->event.pressed) {
72 numlock_down = true; 63 numlock_down = true;
73 if (IS_LAYER_ON(_ALT)) { 64 if (IS_LAYER_ON(_ALT)) {
74 layer_on(_ADJUST); 65 layer_on(_ADJUST);
75 } 66 }
76 } else{ 67 } else {
77 if(!IS_LAYER_ON(_ADJUST)) { 68 if(!IS_LAYER_ON(_ADJUST)) {
78 if (!IS_LAYER_ON(_NAV)){ 69 if (!IS_LAYER_ON(_NAV)) {
79 numlock_led_off(); 70 numlock_led_off();
80 layer_on(_NAV); 71 layer_on(_NAV);
81 } else { 72 } else {
82 numlock_led_on(); 73 numlock_led_on();
83 layer_off(_NAV); 74 layer_off(_NAV);
84 } 75 }
85 } else { 76 } else {
86 layer_off(_ADJUST); 77 layer_off(_ADJUST);
87 } 78 }
88 numlock_down = false; 79 numlock_down = false;
89 } 80 }
90 return false; 81 return false;
91 break; 82 case KC_LALT:
92 case KC_LALT: 83 if (record->event.pressed) {
93 if (record->event.pressed) { 84 if (numlock_down) {
94 if (numlock_down) { 85 layer_on(_ADJUST);
95 layer_on(_ADJUST); 86 } else {
96 } else { 87 layer_on(_ALT);
97 layer_on(_ALT); 88 }
98 } 89 } else {
99 } else { 90 if(IS_LAYER_ON(_ADJUST)) {
100 if(IS_LAYER_ON(_ADJUST)) { 91 layer_off(_ADJUST);
101 layer_off(_ADJUST); 92 } else {
102 } else { 93 layer_off(_ALT);
103 layer_off(_ALT); 94 }
104 } 95 }
105 } 96 // Allow normal processing of ALT
106 // Allow normal processing of ALT? 97 return false;
107 return false; 98 }
108 break; 99 return true;
109 }
110 return true;
111}
112
113void matrix_init_user(void) {
114 // set Numlock LED to output and low
115 DDRF |= (1<<7);
116 PORTF &= ~(1<<7);
117
118}
119
120void matrix_scan_user(void) {
121
122}
123
124
125void led_set_user(uint8_t usb_led) {
126
127} 100}
diff --git a/keyboards/handwired/woodpad/keymaps/default/readme.md b/keyboards/handwired/woodpad/keymaps/default/readme.md
index 5f1740978..1f9e92468 100644
--- a/keyboards/handwired/woodpad/keymaps/default/readme.md
+++ b/keyboards/handwired/woodpad/keymaps/default/readme.md
@@ -1 +1 @@
# The default keymap for woodpad # The default keymap for Woodpad
diff --git a/keyboards/handwired/woodpad/keymaps/default/rules.mk b/keyboards/handwired/woodpad/keymaps/default/rules.mk
index 394bc0271..88dc64450 100644
--- a/keyboards/handwired/woodpad/keymaps/default/rules.mk
+++ b/keyboards/handwired/woodpad/keymaps/default/rules.mk
@@ -1,17 +1,2 @@
1# QMK Build Options 1CONSOLE_ENABLE = no
2# change to "no" to disable the options, or define them in the Makefile in 2NKRO_ENABLE = yes
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = no # Console for debug(+400)
9COMMAND_ENABLE = yes # Commands for debug and configuration
10NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
12MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
13AUDIO_ENABLE = no # Audio output on port C6
14UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
16RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
17SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/handwired/woodpad/readme.md b/keyboards/handwired/woodpad/readme.md
index 2697398c9..189e6c4ad 100644
--- a/keyboards/handwired/woodpad/readme.md
+++ b/keyboards/handwired/woodpad/readme.md
@@ -1,28 +1,17 @@
1woodpad keyboard firmware 1# Woodpad
2======================
3 2
4## Quantum MK Firmware 3![Woodpad](https://woodkeys.click/wp-content/uploads/2017/08/ma2.jpg)
5 4
6For the full Quantum feature list, see [the parent readme](/). 5* Keyboard Maintainer: QMK Community
6* Hardware Supported: Woodpad PCB
7* Hardware Availability: [WoodKeys](https://woodkeys.click/product/woodpad/)
7 8
8## Building 9Make example for this keyboard (after setting up your build environment):
9 10
10Download or clone the whole firmware and navigate to the keyboards/woodpad folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. 11 make handwired/woodpad:default
11 12
12Depending on which keymap you would like to use, you will have to compile slightly differently. 13Flashing example for this keyboard:
13 14
14### Default 15 make handwired/woodpad:default:flash
15 16
16To build with the default keymap, simply run `make default`. 17See 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).
17
18### Other Keymaps
19
20Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files.
21
22To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
23
24```
25$ make [default|jack|<name>]
26```
27
28Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
diff --git a/keyboards/handwired/woodpad/rules.mk b/keyboards/handwired/woodpad/rules.mk
index a3a1e5ffe..8c2c2fbdc 100644
--- a/keyboards/handwired/woodpad/rules.mk
+++ b/keyboards/handwired/woodpad/rules.mk
@@ -2,31 +2,23 @@
2MCU = atmega32u4 2MCU = atmega32u4
3 3
4# Bootloader selection 4# Bootloader selection
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 5BOOTLOADER = caterina
13 6
14# Build Options 7# Build Options
15# change yes to no to disable 8# change yes to no to disable
16# 9#
17BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) 10BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
18MOUSEKEY_ENABLE = yes # Mouse keys(+4700) 11MOUSEKEY_ENABLE = yes # Mouse keys
19EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 12EXTRAKEY_ENABLE = yes # Audio control and System control
20CONSOLE_ENABLE = yes # Console for debug(+400) 13CONSOLE_ENABLE = yes # Console for debug
21COMMAND_ENABLE = yes # Commands for debug and configuration 14COMMAND_ENABLE = yes # Commands for debug and configuration
22# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE 15# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
23SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend 16SLEEP_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 17# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
25NKRO_ENABLE = no # USB Nkey Rollover 18NKRO_ENABLE = no # USB Nkey Rollover
26BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default 19BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
27MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) 20RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
28UNICODE_ENABLE = no # Unicode 21BLUETOOTH_ENABLE = no # Enable Bluetooth
29BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID 22AUDIO_ENABLE = no # Audio output
30AUDIO_ENABLE = no # Audio output on port C6 23
31FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches 24LAYOUTS = ortho_5x4
32RGBLIGHT_ENABLE = no
diff --git a/keyboards/handwired/woodpad/woodpad.c b/keyboards/handwired/woodpad/woodpad.c
index 15a87f2ea..71bc0ba71 100644
--- a/keyboards/handwired/woodpad/woodpad.c
+++ b/keyboards/handwired/woodpad/woodpad.c
@@ -1,4 +1,4 @@
1/* Copyright 2017 REPLACE_WITH_YOUR_NAME 1/* Copyright 2017 WoodKeys
2 * 2 *
3 * This program is free software: you can redistribute it and/or modify 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 4 * it under the terms of the GNU General Public License as published by
@@ -13,31 +13,18 @@
13 * You should have received a copy of the GNU General Public License 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/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16#include "woodpad.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 16
25void matrix_scan_kb(void) { 17#include "woodpad.h"
26 // put your looping keyboard code here
27 // runs every cycle (a lot)
28 18
29 matrix_scan_user(); 19void keyboard_pre_init_kb(void) {
20 setPinOutput(F7);
21 keyboard_pre_init_user();
30} 22}
31 23
32bool process_record_kb(uint16_t keycode, keyrecord_t *record) { 24inline void numlock_led_on(void) {
33 // put your per-action keyboard code here 25 writePinHigh(F7);
34 // runs for every action, just before processing by the firmware
35
36 return process_record_user(keycode, record);
37} 26}
38 27
39void led_set_kb(uint8_t usb_led) { 28inline void numlock_led_off(void) {
40 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here 29 writePinLow(F7);
41
42 led_set_user(usb_led);
43} 30}
diff --git a/keyboards/handwired/woodpad/woodpad.h b/keyboards/handwired/woodpad/woodpad.h
index 13ec0bfc2..078e56cdf 100644
--- a/keyboards/handwired/woodpad/woodpad.h
+++ b/keyboards/handwired/woodpad/woodpad.h
@@ -1,4 +1,4 @@
1/* Copyright 2017 REPLACE_WITH_YOUR_NAME 1/* Copyright 2017 WoodKeys
2 * 2 *
3 * This program is free software: you can redistribute it and/or modify 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 4 * it under the terms of the GNU General Public License as published by
@@ -13,28 +13,32 @@
13 * You should have received a copy of the GNU General Public License 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/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16#ifndef WOODPAD_H 16
17#define WOODPAD_H 17#pragma once
18 18
19#include "quantum.h" 19#include "quantum.h"
20 20
21// This a shortcut to help you visually see your layout. 21extern void numlock_led_on(void);
22// The following is an example using the Planck MIT layout 22extern void numlock_led_off(void);
23// The first section contains all of the arguments 23
24// The second converts the arguments into a two-dimensional array 24/* This is a shortcut to help you visually see your layout.
25#define KEYMAP( \ 25 *
26 * The first section contains all of the arguments representing the physical
27 * layout of the board and position of the keys.
28 *
29 * The second converts the arguments into a two-dimensional array which
30 * represents the switch matrix.
31 */
32#define LAYOUT_ortho_5x4( \
26 k00, k01, k02, k03, \ 33 k00, k01, k02, k03, \
27 k10, k11, k12, k13, \ 34 k10, k11, k12, k13, \
28 k20, k21, k22, k23, \ 35 k20, k21, k22, k23, \
29 k30, k31, k32, k33, \ 36 k30, k31, k32, k33, \
30 k40, k41, k42, k43 \ 37 k40, k41, k42, k43 \
31) \ 38) { \
32{ \
33 { k00, k01, k02, k03 }, \ 39 { k00, k01, k02, k03 }, \
34 { k10, k11, k12, k13 }, \ 40 { k10, k11, k12, k13 }, \
35 { k20, k21, k22, k23 }, \ 41 { k20, k21, k22, k23 }, \
36 { k30, k31, k32, k33 }, \ 42 { k30, k31, k32, k33 }, \
37 { k40, k41, k42, k43 }, \ 43 { k40, k41, k42, k43 } \
38} 44}
39
40#endif