From a0d9221dcc085b196e071581e9e7d8d9a96037fe Mon Sep 17 00:00:00 2001 From: Brandon Claveria <48102030+swiftrax@users.noreply.github.com> Date: Tue, 26 Jan 2021 16:52:17 -0800 Subject: pull retropad out of handwired and update readme.md (#11545) Co-authored-by: Swiftrax --- keyboards/handwired/swiftrax/retropad/config.h | 64 -------------------- keyboards/handwired/swiftrax/retropad/info.json | 12 ---- .../swiftrax/retropad/keymaps/default/keymap.c | 69 ---------------------- .../swiftrax/retropad/keymaps/via/keymap.c | 69 ---------------------- .../swiftrax/retropad/keymaps/via/rules.mk | 1 - keyboards/handwired/swiftrax/retropad/readme.md | 13 ---- keyboards/handwired/swiftrax/retropad/retropad.c | 16 ----- keyboards/handwired/swiftrax/retropad/retropad.h | 31 ---------- keyboards/handwired/swiftrax/retropad/rules.mk | 23 -------- keyboards/swiftrax/retropad/config.h | 64 ++++++++++++++++++++ keyboards/swiftrax/retropad/info.json | 12 ++++ .../swiftrax/retropad/keymaps/default/keymap.c | 69 ++++++++++++++++++++++ keyboards/swiftrax/retropad/keymaps/via/keymap.c | 69 ++++++++++++++++++++++ keyboards/swiftrax/retropad/keymaps/via/rules.mk | 1 + keyboards/swiftrax/retropad/readme.md | 13 ++++ keyboards/swiftrax/retropad/retropad.c | 16 +++++ keyboards/swiftrax/retropad/retropad.h | 31 ++++++++++ keyboards/swiftrax/retropad/rules.mk | 23 ++++++++ 18 files changed, 298 insertions(+), 298 deletions(-) delete mode 100644 keyboards/handwired/swiftrax/retropad/config.h delete mode 100644 keyboards/handwired/swiftrax/retropad/info.json delete mode 100644 keyboards/handwired/swiftrax/retropad/keymaps/default/keymap.c delete mode 100644 keyboards/handwired/swiftrax/retropad/keymaps/via/keymap.c delete mode 100644 keyboards/handwired/swiftrax/retropad/keymaps/via/rules.mk delete mode 100644 keyboards/handwired/swiftrax/retropad/readme.md delete mode 100644 keyboards/handwired/swiftrax/retropad/retropad.c delete mode 100644 keyboards/handwired/swiftrax/retropad/retropad.h delete mode 100644 keyboards/handwired/swiftrax/retropad/rules.mk create mode 100644 keyboards/swiftrax/retropad/config.h create mode 100644 keyboards/swiftrax/retropad/info.json create mode 100644 keyboards/swiftrax/retropad/keymaps/default/keymap.c create mode 100644 keyboards/swiftrax/retropad/keymaps/via/keymap.c create mode 100644 keyboards/swiftrax/retropad/keymaps/via/rules.mk create mode 100644 keyboards/swiftrax/retropad/readme.md create mode 100644 keyboards/swiftrax/retropad/retropad.c create mode 100644 keyboards/swiftrax/retropad/retropad.h create mode 100644 keyboards/swiftrax/retropad/rules.mk diff --git a/keyboards/handwired/swiftrax/retropad/config.h b/keyboards/handwired/swiftrax/retropad/config.h deleted file mode 100644 index e604eda419..0000000000 --- a/keyboards/handwired/swiftrax/retropad/config.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -Copyright 2020 Swiftrax - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x04D8 -#define PRODUCT_ID 0xEB0C -#define DEVICE_VER 0x0001 -#define MANUFACTURER Swiftrax -#define PRODUCT Retropad - -/* key matrix size */ -#define MATRIX_ROWS 3 -#define MATRIX_COLS 2 - -// ROWS: Top to bottom, COLS: Left to right - -#define MATRIX_ROW_PINS { C7, C6, B5 } -#define MATRIX_COL_PINS { B4, D2 } - -#define ENCODERS_PAD_A { D0 } -#define ENCODERS_PAD_B { D1 } - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -#define RGB_DI_PIN B7 -#ifdef RGB_DI_PIN -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 6 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 -#endif - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/*EEPROM for via*/ -#define DYNAMIC_KEYMAP_LAYER_COUNT 3 - -/* bootmagic row col assignment */ -#define BOOTMAGIC_LITE_ROW 1 -#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/swiftrax/retropad/info.json b/keyboards/handwired/swiftrax/retropad/info.json deleted file mode 100644 index 9637c7b3f7..0000000000 --- a/keyboards/handwired/swiftrax/retropad/info.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "keyboard_name": "Retropad", - "url": "https://github.com/swiftrax", - "maintainer": "swiftrax", - "width": 2, - "height": 3.5, - "layouts": { - "LAYOUT": { - "layout": [{"label":"0,1", "x":0.5, "y":0}, {"label":"1,0", "x":0, "y":1.5}, {"label":"1,1", "x":1, "y":1.5}, {"label":"2,0", "x":0, "y":2.5}, {"label":"2,1", "x":1, "y":2.5}] - } - } -} \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/retropad/keymaps/default/keymap.c b/keyboards/handwired/swiftrax/retropad/keymaps/default/keymap.c deleted file mode 100644 index 8b9992e1d7..0000000000 --- a/keyboards/handwired/swiftrax/retropad/keymaps/default/keymap.c +++ /dev/null @@ -1,69 +0,0 @@ - /* Copyright 2020 swiftrax - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -[0] = LAYOUT( - TO(1), //windows - KC_MSTP, KC_MPLY, - KC_MPRV, KC_MNXT), - -[1] = LAYOUT( //macOS - TO(2), - KC_MSTP, KC_MPLY, - KC_MRWD, KC_MFFD), - -[2] = LAYOUT( - TO(0), - KC_HOME, KC_PGUP, - KC_END, KC_PGDN), -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if(IS_LAYER_ON(2)){ - if (clockwise) - tap_code(KC_LEFT); - else - tap_code(KC_RGHT); - } - else{ - if(clockwise) - tap_code(KC_VOLU); - else - tap_code(KC_VOLD); - } -} - -void matrix_init_user(void) { - // set top LED to output and off (active low) - setPinOutput(D5); - writePinHigh(D5); - // set middle LED to output and off (active low) - setPinOutput(D4); - writePinHigh(D4); - // set bottom LED to output and off (active low) - setPinOutput(D3); - writePinHigh(D3); -} - -// write to above indicators in a binary fashion based on current layer -layer_state_t layer_state_set_user(layer_state_t state) { - writePin(D5, get_highest_layer(state)); - writePin(D4, !layer_state_cmp(state, 1)); - writePin(D3, !layer_state_cmp(state, 2)); - return state; -} \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/retropad/keymaps/via/keymap.c b/keyboards/handwired/swiftrax/retropad/keymaps/via/keymap.c deleted file mode 100644 index 8b9992e1d7..0000000000 --- a/keyboards/handwired/swiftrax/retropad/keymaps/via/keymap.c +++ /dev/null @@ -1,69 +0,0 @@ - /* Copyright 2020 swiftrax - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -[0] = LAYOUT( - TO(1), //windows - KC_MSTP, KC_MPLY, - KC_MPRV, KC_MNXT), - -[1] = LAYOUT( //macOS - TO(2), - KC_MSTP, KC_MPLY, - KC_MRWD, KC_MFFD), - -[2] = LAYOUT( - TO(0), - KC_HOME, KC_PGUP, - KC_END, KC_PGDN), -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if(IS_LAYER_ON(2)){ - if (clockwise) - tap_code(KC_LEFT); - else - tap_code(KC_RGHT); - } - else{ - if(clockwise) - tap_code(KC_VOLU); - else - tap_code(KC_VOLD); - } -} - -void matrix_init_user(void) { - // set top LED to output and off (active low) - setPinOutput(D5); - writePinHigh(D5); - // set middle LED to output and off (active low) - setPinOutput(D4); - writePinHigh(D4); - // set bottom LED to output and off (active low) - setPinOutput(D3); - writePinHigh(D3); -} - -// write to above indicators in a binary fashion based on current layer -layer_state_t layer_state_set_user(layer_state_t state) { - writePin(D5, get_highest_layer(state)); - writePin(D4, !layer_state_cmp(state, 1)); - writePin(D3, !layer_state_cmp(state, 2)); - return state; -} \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/retropad/keymaps/via/rules.mk b/keyboards/handwired/swiftrax/retropad/keymaps/via/rules.mk deleted file mode 100644 index 036bd6d1c3..0000000000 --- a/keyboards/handwired/swiftrax/retropad/keymaps/via/rules.mk +++ /dev/null @@ -1 +0,0 @@ -VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/retropad/readme.md b/keyboards/handwired/swiftrax/retropad/readme.md deleted file mode 100644 index 5dd2e2dff5..0000000000 --- a/keyboards/handwired/swiftrax/retropad/readme.md +++ /dev/null @@ -1,13 +0,0 @@ -# Retropad - -2x2 macro pad with a rotary encoder - -* Keyboard Maintainer: Swiftrax -* Hardware Supported: Retropad PCB -* Hardware Availability: https://github.com/swiftrax - -Make example for this keyboard (after setting up your build environment): - - make handwired/swiftrax/retropad:default - -See 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/handwired/swiftrax/retropad/retropad.c b/keyboards/handwired/swiftrax/retropad/retropad.c deleted file mode 100644 index 3ffe29528f..0000000000 --- a/keyboards/handwired/swiftrax/retropad/retropad.c +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright 2020 swiftrax - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "retropad.h" \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/retropad/retropad.h b/keyboards/handwired/swiftrax/retropad/retropad.h deleted file mode 100644 index e7527d5c00..0000000000 --- a/keyboards/handwired/swiftrax/retropad/retropad.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright 2020 swiftrax - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#pragma once - -#include "quantum.h" - -// readability -#define XXX KC_NO - -#define LAYOUT( \ - K001, \ - K100, K101, \ - K200, K201 \ -) { \ - { XXX, K001, }, \ - { K100, K101, }, \ - { K200, K201, } \ -} diff --git a/keyboards/handwired/swiftrax/retropad/rules.mk b/keyboards/handwired/swiftrax/retropad/rules.mk deleted file mode 100644 index 8771c701de..0000000000 --- a/keyboards/handwired/swiftrax/retropad/rules.mk +++ /dev/null @@ -1,23 +0,0 @@ -# MCU name -MCU = atmega32u2 - -# Bootloader selection -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth -AUDIO_ENABLE = no # Audio output -ENCODER_ENABLE = yes diff --git a/keyboards/swiftrax/retropad/config.h b/keyboards/swiftrax/retropad/config.h new file mode 100644 index 0000000000..e604eda419 --- /dev/null +++ b/keyboards/swiftrax/retropad/config.h @@ -0,0 +1,64 @@ +/* +Copyright 2020 Swiftrax + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEB0C +#define DEVICE_VER 0x0001 +#define MANUFACTURER Swiftrax +#define PRODUCT Retropad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 2 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { C7, C6, B5 } +#define MATRIX_COL_PINS { B4, D2 } + +#define ENCODERS_PAD_A { D0 } +#define ENCODERS_PAD_B { D1 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN B7 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 6 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/*EEPROM for via*/ +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 + +/* bootmagic row col assignment */ +#define BOOTMAGIC_LITE_ROW 1 +#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/swiftrax/retropad/info.json b/keyboards/swiftrax/retropad/info.json new file mode 100644 index 0000000000..9637c7b3f7 --- /dev/null +++ b/keyboards/swiftrax/retropad/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Retropad", + "url": "https://github.com/swiftrax", + "maintainer": "swiftrax", + "width": 2, + "height": 3.5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"0,1", "x":0.5, "y":0}, {"label":"1,0", "x":0, "y":1.5}, {"label":"1,1", "x":1, "y":1.5}, {"label":"2,0", "x":0, "y":2.5}, {"label":"2,1", "x":1, "y":2.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/swiftrax/retropad/keymaps/default/keymap.c b/keyboards/swiftrax/retropad/keymaps/default/keymap.c new file mode 100644 index 0000000000..8b9992e1d7 --- /dev/null +++ b/keyboards/swiftrax/retropad/keymaps/default/keymap.c @@ -0,0 +1,69 @@ + /* Copyright 2020 swiftrax + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT( + TO(1), //windows + KC_MSTP, KC_MPLY, + KC_MPRV, KC_MNXT), + +[1] = LAYOUT( //macOS + TO(2), + KC_MSTP, KC_MPLY, + KC_MRWD, KC_MFFD), + +[2] = LAYOUT( + TO(0), + KC_HOME, KC_PGUP, + KC_END, KC_PGDN), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if(IS_LAYER_ON(2)){ + if (clockwise) + tap_code(KC_LEFT); + else + tap_code(KC_RGHT); + } + else{ + if(clockwise) + tap_code(KC_VOLU); + else + tap_code(KC_VOLD); + } +} + +void matrix_init_user(void) { + // set top LED to output and off (active low) + setPinOutput(D5); + writePinHigh(D5); + // set middle LED to output and off (active low) + setPinOutput(D4); + writePinHigh(D4); + // set bottom LED to output and off (active low) + setPinOutput(D3); + writePinHigh(D3); +} + +// write to above indicators in a binary fashion based on current layer +layer_state_t layer_state_set_user(layer_state_t state) { + writePin(D5, get_highest_layer(state)); + writePin(D4, !layer_state_cmp(state, 1)); + writePin(D3, !layer_state_cmp(state, 2)); + return state; +} \ No newline at end of file diff --git a/keyboards/swiftrax/retropad/keymaps/via/keymap.c b/keyboards/swiftrax/retropad/keymaps/via/keymap.c new file mode 100644 index 0000000000..8b9992e1d7 --- /dev/null +++ b/keyboards/swiftrax/retropad/keymaps/via/keymap.c @@ -0,0 +1,69 @@ + /* Copyright 2020 swiftrax + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT( + TO(1), //windows + KC_MSTP, KC_MPLY, + KC_MPRV, KC_MNXT), + +[1] = LAYOUT( //macOS + TO(2), + KC_MSTP, KC_MPLY, + KC_MRWD, KC_MFFD), + +[2] = LAYOUT( + TO(0), + KC_HOME, KC_PGUP, + KC_END, KC_PGDN), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if(IS_LAYER_ON(2)){ + if (clockwise) + tap_code(KC_LEFT); + else + tap_code(KC_RGHT); + } + else{ + if(clockwise) + tap_code(KC_VOLU); + else + tap_code(KC_VOLD); + } +} + +void matrix_init_user(void) { + // set top LED to output and off (active low) + setPinOutput(D5); + writePinHigh(D5); + // set middle LED to output and off (active low) + setPinOutput(D4); + writePinHigh(D4); + // set bottom LED to output and off (active low) + setPinOutput(D3); + writePinHigh(D3); +} + +// write to above indicators in a binary fashion based on current layer +layer_state_t layer_state_set_user(layer_state_t state) { + writePin(D5, get_highest_layer(state)); + writePin(D4, !layer_state_cmp(state, 1)); + writePin(D3, !layer_state_cmp(state, 2)); + return state; +} \ No newline at end of file diff --git a/keyboards/swiftrax/retropad/keymaps/via/rules.mk b/keyboards/swiftrax/retropad/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/swiftrax/retropad/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/swiftrax/retropad/readme.md b/keyboards/swiftrax/retropad/readme.md new file mode 100644 index 0000000000..34f6af405f --- /dev/null +++ b/keyboards/swiftrax/retropad/readme.md @@ -0,0 +1,13 @@ +# Retropad + +2x2 macro pad with a rotary encoder + +* Keyboard Maintainer: Swiftrax +* Hardware Supported: Retropad PCB +* Hardware Availability: https://github.com/swiftrax + +Make example for this keyboard (after setting up your build environment): + + make swiftrax/retropad:default + +See 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/swiftrax/retropad/retropad.c b/keyboards/swiftrax/retropad/retropad.c new file mode 100644 index 0000000000..3ffe29528f --- /dev/null +++ b/keyboards/swiftrax/retropad/retropad.c @@ -0,0 +1,16 @@ +/* Copyright 2020 swiftrax + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "retropad.h" \ No newline at end of file diff --git a/keyboards/swiftrax/retropad/retropad.h b/keyboards/swiftrax/retropad/retropad.h new file mode 100644 index 0000000000..e7527d5c00 --- /dev/null +++ b/keyboards/swiftrax/retropad/retropad.h @@ -0,0 +1,31 @@ +/* Copyright 2020 swiftrax + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +// readability +#define XXX KC_NO + +#define LAYOUT( \ + K001, \ + K100, K101, \ + K200, K201 \ +) { \ + { XXX, K001, }, \ + { K100, K101, }, \ + { K200, K201, } \ +} diff --git a/keyboards/swiftrax/retropad/rules.mk b/keyboards/swiftrax/retropad/rules.mk new file mode 100644 index 0000000000..8771c701de --- /dev/null +++ b/keyboards/swiftrax/retropad/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes -- cgit v1.2.3