diff options
| author | Yan-Fa Li <yanfali@gmail.com> | 2019-08-24 23:44:20 -0700 |
|---|---|---|
| committer | noroadsleft <18669334+noroadsleft@users.noreply.github.com> | 2019-08-24 23:44:20 -0700 |
| commit | f6da00b85d32f5bc451f5c89e26845434ae62bed (patch) | |
| tree | c057e5e4cea14de4b7652feb93c499af89567702 | |
| parent | 43b03099702265ef514cb84236d9031e04047837 (diff) | |
| download | qmk_firmware-f6da00b85d32f5bc451f5c89e26845434ae62bed.tar.gz qmk_firmware-f6da00b85d32f5bc451f5c89e26845434ae62bed.zip | |
[Keyboard] Maartenwut Wonderland PCB (#6492)
* Initial Commit
* ID
* Use current manu name
* Fix define DEBOUNCE
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Fix NUM Lock LED detection
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Fix CAPs LED detection
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Fix Scroll Lock LED detection
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Use correct convention for setting pins
* Move folder to maartenwut
- enable velocikey
* Fix columns size
* Sync with homerowco
* Add Keebs keymap
* Best practices
* Latest keymap changes from homerowco
| -rwxr-xr-x | keyboards/maartenwut/wonderland/config.h | 55 | ||||
| -rwxr-xr-x | keyboards/maartenwut/wonderland/keymaps/default/keymap.c | 25 | ||||
| -rwxr-xr-x | keyboards/maartenwut/wonderland/keymaps/keebs/keymap.c | 26 | ||||
| -rwxr-xr-x | keyboards/maartenwut/wonderland/rules.mk | 58 | ||||
| -rwxr-xr-x | keyboards/maartenwut/wonderland/wonderland.c | 42 | ||||
| -rwxr-xr-x | keyboards/maartenwut/wonderland/wonderland.h | 22 |
6 files changed, 228 insertions, 0 deletions
diff --git a/keyboards/maartenwut/wonderland/config.h b/keyboards/maartenwut/wonderland/config.h new file mode 100755 index 000000000..4da601257 --- /dev/null +++ b/keyboards/maartenwut/wonderland/config.h | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
| 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 | #include "config_common.h" | ||
| 21 | |||
| 22 | /* USB Device descriptor parameter */ | ||
| 23 | #define VENDOR_ID 0xFEED | ||
| 24 | #define PRODUCT_ID 0xA71C | ||
| 25 | #define DEVICE_VER 0x0003 | ||
| 26 | #define MANUFACTURER Maartenwut | ||
| 27 | #define PRODUCT Wonderland | ||
| 28 | #define DESCRIPTION "QMK Firmware for the Wonderland" | ||
| 29 | |||
| 30 | /* key matrix size */ | ||
| 31 | #define MATRIX_ROWS 5 | ||
| 32 | #define MATRIX_COLS 15 | ||
| 33 | |||
| 34 | // ROWS: Top to bottom, COLS: Left to right | ||
| 35 | |||
| 36 | #define MATRIX_ROW_PINS {B0,D1,D2,D3,D5} | ||
| 37 | #define MATRIX_COL_PINS {F0,F1,F4,F5,F6,F7,E6,C7,C6,B6,B5,B4,D7,D6,D4} | ||
| 38 | #define UNUSED_PINS | ||
| 39 | |||
| 40 | |||
| 41 | /* COL2ROW or ROW2COL */ | ||
| 42 | #define DIODE_DIRECTION COL2ROW | ||
| 43 | |||
| 44 | /* Set 0 if debouncing isn't needed */ | ||
| 45 | #define DEBOUNCE 5 | ||
| 46 | |||
| 47 | /* Backlight configuration | ||
| 48 | */ | ||
| 49 | #define RGB_DI_PIN B7 | ||
| 50 | #define RGBLIGHT_ANIMATIONS | ||
| 51 | #define RGBLED_NUM 12 | ||
| 52 | |||
| 53 | #define QMK_ESC_OUTPUT F0 // usually COL | ||
| 54 | #define QMK_ESC_INPUT B0 // usually ROW | ||
| 55 | #define QMK_LED B1 | ||
diff --git a/keyboards/maartenwut/wonderland/keymaps/default/keymap.c b/keyboards/maartenwut/wonderland/keymaps/default/keymap.c new file mode 100755 index 000000000..fb876443b --- /dev/null +++ b/keyboards/maartenwut/wonderland/keymaps/default/keymap.c | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | #include QMK_KEYBOARD_H | ||
| 2 | |||
| 3 | enum layers { | ||
| 4 | _BASE, | ||
| 5 | _FUNC | ||
| 6 | }; | ||
| 7 | |||
| 8 | |||
| 9 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 10 | |||
| 11 | [_BASE] = LAYOUT( | ||
| 12 | KC_ESC, KC_1, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_BSPC, \ | ||
| 13 | KC_F10, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ | ||
| 14 | RGB_TOG, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ | ||
| 15 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ | ||
| 16 | KC_LCTL, KC_LAPO, KC_BSPC, KC_LGUI, KC_SPC, KC_RAPC, KC_RCTRL \ | ||
| 17 | ), | ||
| 18 | [_FUNC] = LAYOUT( | ||
| 19 | RGB_TOG, VLK_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, RESET, \ | ||
| 20 | RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ | ||
| 21 | RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, \ | ||
| 22 | KC_LSFT, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, \ | ||
| 23 | _______, KC_LALT, _______, _______, _______, KC_RALT, _______ \ | ||
| 24 | ) | ||
| 25 | }; | ||
diff --git a/keyboards/maartenwut/wonderland/keymaps/keebs/keymap.c b/keyboards/maartenwut/wonderland/keymaps/keebs/keymap.c new file mode 100755 index 000000000..437370bb7 --- /dev/null +++ b/keyboards/maartenwut/wonderland/keymaps/keebs/keymap.c | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | #include QMK_KEYBOARD_H | ||
| 2 | |||
| 3 | enum layers { | ||
| 4 | _BASE, | ||
| 5 | _FUNC | ||
| 6 | }; | ||
| 7 | |||
| 8 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 9 | |||
| 10 | [_BASE] = LAYOUT( | ||
| 11 | KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_BSPC, \ | ||
| 12 | KC_F10, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ | ||
| 13 | RGB_HUI, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ | ||
| 14 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ | ||
| 15 | KC_LCTL, KC_LAPO, KC_LGUI, RGUI(KC_SPC), KC_SPC, KC_RAPC, KC_RCTRL \ | ||
| 16 | ), | ||
| 17 | [_FUNC] = LAYOUT( | ||
| 18 | RGB_TOG, VLK_TOG, KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_F6,KC_F7,KC_F8,KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, RESET, \ | ||
| 19 | RGB_MODE_FORWARD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ | ||
| 20 | RGB_MODE_REVERSE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, \ | ||
| 21 | KC_LSFT, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX,KC_LEFT,KC_DOWN,KC_RIGHT,XXXXXXX, \ | ||
| 22 | KC_LCTL, KC_LALT, KC_BSPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTRL \ | ||
| 23 | ) | ||
| 24 | }; | ||
| 25 | |||
| 26 | |||
diff --git a/keyboards/maartenwut/wonderland/rules.mk b/keyboards/maartenwut/wonderland/rules.mk new file mode 100755 index 000000000..498076d4e --- /dev/null +++ b/keyboards/maartenwut/wonderland/rules.mk | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | MCU = atmega32u4 | ||
| 2 | |||
| 3 | # Processor frequency. | ||
| 4 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
| 5 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
| 6 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
| 7 | # automatically to create a 32-bit value in your source code. | ||
| 8 | # | ||
| 9 | # This will be an integer division of F_USB below, as it is sourced by | ||
| 10 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
| 11 | # does not *change* the processor frequency - it should merely be updated to | ||
| 12 | # reflect the processor speed set externally so that the code can use accurate | ||
| 13 | # software delays. | ||
| 14 | F_CPU = 16000000 | ||
| 15 | |||
| 16 | |||
| 17 | # | ||
| 18 | # LUFA specific | ||
| 19 | # | ||
| 20 | # Target architecture (see library "Board Types" documentation). | ||
| 21 | ARCH = AVR8 | ||
| 22 | |||
| 23 | # Input clock frequency. | ||
| 24 | # This will define a symbol, F_USB, in all source code files equal to the | ||
| 25 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
| 26 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
| 27 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
| 28 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
| 29 | # at the end, this will be done automatically to create a 32-bit value in your | ||
| 30 | # source code. | ||
| 31 | # | ||
| 32 | # If no clock division is performed on the input clock inside the AVR (via the | ||
| 33 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
| 34 | F_USB = $(F_CPU) | ||
| 35 | |||
| 36 | # Interrupt driven control endpoint task(+60) | ||
| 37 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
| 38 | |||
| 39 | |||
| 40 | BOOTLOADER = qmk-dfu | ||
| 41 | |||
| 42 | # Build Options | ||
| 43 | # comment out to disable the options. | ||
| 44 | # | ||
| 45 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) | ||
| 46 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
| 47 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
| 48 | CONSOLE_ENABLE = yes # Console for debug(+400) | ||
| 49 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
| 50 | NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 51 | RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) | ||
| 52 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality (+1150) | ||
| 53 | MIDI_ENABLE = no # MIDI controls | ||
| 54 | AUDIO_ENABLE = no | ||
| 55 | UNICODE_ENABLE = no # Unicode | ||
| 56 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 57 | AUTO_SHIFT_ENABLE = no | ||
| 58 | VELOCIKEY_ENABLE = yes | ||
diff --git a/keyboards/maartenwut/wonderland/wonderland.c b/keyboards/maartenwut/wonderland/wonderland.c new file mode 100755 index 000000000..9f3233e0f --- /dev/null +++ b/keyboards/maartenwut/wonderland/wonderland.c | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | #include "wonderland.h" | ||
| 2 | |||
| 3 | void matrix_init_kb(void) { | ||
| 4 | // put your keyboard start-up code here | ||
| 5 | // runs once when the firmware starts up | ||
| 6 | matrix_init_user(); | ||
| 7 | led_init_ports(); | ||
| 8 | }; | ||
| 9 | |||
| 10 | void matrix_scan_kb(void) { | ||
| 11 | // put your looping keyboard code here | ||
| 12 | // runs every cycle (a lot) | ||
| 13 | matrix_scan_user(); | ||
| 14 | }; | ||
| 15 | |||
| 16 | void led_init_ports(void) { | ||
| 17 | // * Set our LED pins as output | ||
| 18 | setPinOutput(B1); | ||
| 19 | setPinOutput(B2); | ||
| 20 | setPinOutput(B3); | ||
| 21 | } | ||
| 22 | |||
| 23 | void led_set_kb(uint8_t usb_led) { | ||
| 24 | if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { | ||
| 25 | writePinLow(B1); | ||
| 26 | } else { | ||
| 27 | writePinHigh(B1); | ||
| 28 | } | ||
| 29 | |||
| 30 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | ||
| 31 | writePinLow(B2); | ||
| 32 | } else { | ||
| 33 | writePinHigh(B2); | ||
| 34 | } | ||
| 35 | |||
| 36 | if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { | ||
| 37 | writePinLow(B3); | ||
| 38 | } else { | ||
| 39 | writePinHigh(B3); | ||
| 40 | } | ||
| 41 | led_set_user(usb_led); | ||
| 42 | } | ||
diff --git a/keyboards/maartenwut/wonderland/wonderland.h b/keyboards/maartenwut/wonderland/wonderland.h new file mode 100755 index 000000000..075e3f64b --- /dev/null +++ b/keyboards/maartenwut/wonderland/wonderland.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | #pragma once | ||
| 2 | #include "quantum.h" | ||
| 3 | |||
| 4 | // readability | ||
| 5 | #define XXX KC_NO | ||
| 6 | #define LAYOUT( \ | ||
| 7 | k10, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ | ||
| 8 | k20, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ | ||
| 9 | k30, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ | ||
| 10 | k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ | ||
| 11 | k41, k43, k45, k46, k48, k4a, k4e \ | ||
| 12 | ) \ | ||
| 13 | { \ | ||
| 14 | {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ | ||
| 15 | {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e}, \ | ||
| 16 | {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, XXX, k2e}, \ | ||
| 17 | {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \ | ||
| 18 | {XXX, k41, XXX, k43, XXX, k45, k46, XXX, k48, XXX, k4a, XXX, XXX, XXX, k4e} \ | ||
| 19 | } | ||
| 20 | |||
| 21 | void matrix_init_user(void); | ||
| 22 | void matrix_scan_user(void); | ||
