diff options
| author | Mattia Dal Ben <mattdibi@users.noreply.github.com> | 2018-04-29 22:01:33 +0200 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2018-04-29 13:01:33 -0700 |
| commit | 3b7b1994cd9e3e61fdee84eff78875135642aa6c (patch) | |
| tree | bb7be07641b6b4bf5b992a53d80990d92dc62e41 /keyboards/redox/rev1 | |
| parent | 19aa2c34e859946edae24108fe7df69c949b124e (diff) | |
| download | qmk_firmware-3b7b1994cd9e3e61fdee84eff78875135642aa6c.tar.gz qmk_firmware-3b7b1994cd9e3e61fdee84eff78875135642aa6c.zip | |
Redox keyboard code (#2843)
* Added Redox keyboard with default keymap (IT layout)
* Updated manufacturer url
* Applied requested changes
Diffstat (limited to 'keyboards/redox/rev1')
| -rw-r--r-- | keyboards/redox/rev1/config.h | 88 | ||||
| -rw-r--r-- | keyboards/redox/rev1/rev1.c | 22 | ||||
| -rw-r--r-- | keyboards/redox/rev1/rev1.h | 66 | ||||
| -rw-r--r-- | keyboards/redox/rev1/rules.mk | 1 |
4 files changed, 177 insertions, 0 deletions
diff --git a/keyboards/redox/rev1/config.h b/keyboards/redox/rev1/config.h new file mode 100644 index 000000000..f8041f235 --- /dev/null +++ b/keyboards/redox/rev1/config.h | |||
| @@ -0,0 +1,88 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2018 Mattia Dal Ben <matthewdibi@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 | #ifndef REV1_CONFIG_H | ||
| 19 | #define REV1_CONFIG_H | ||
| 20 | |||
| 21 | #include "config_common.h" | ||
| 22 | |||
| 23 | /* USB Device descriptor parameter */ | ||
| 24 | #define VENDOR_ID 0xFEED | ||
| 25 | #define PRODUCT_ID 0x0000 | ||
| 26 | #define DEVICE_VER 0x0100 | ||
| 27 | #define MANUFACTURER Falbatech | ||
| 28 | #define PRODUCT The Redox Keyboard | ||
| 29 | #define DESCRIPTION Split Ergodox-like 5x7 custom keyboard | ||
| 30 | |||
| 31 | /* key matrix size */ | ||
| 32 | // Rows are doubled-up | ||
| 33 | #define MATRIX_ROWS 10 | ||
| 34 | #define MATRIX_COLS 7 | ||
| 35 | |||
| 36 | // wiring of each half | ||
| 37 | #define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } | ||
| 38 | #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } | ||
| 39 | // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5} //uncomment this line and comment line above if you need to reverse left-to-right key order | ||
| 40 | |||
| 41 | /* COL2ROW or ROW2COL */ | ||
| 42 | #define DIODE_DIRECTION COL2ROW | ||
| 43 | |||
| 44 | /* define if matrix has ghost */ | ||
| 45 | //#define MATRIX_HAS_GHOST | ||
| 46 | |||
| 47 | /* number of backlight levels */ | ||
| 48 | // #define BACKLIGHT_LEVELS 3 | ||
| 49 | |||
| 50 | /* Set 0 if debouncing isn't needed */ | ||
| 51 | #define DEBOUNCING_DELAY 5 | ||
| 52 | |||
| 53 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 54 | #define LOCKING_SUPPORT_ENABLE | ||
| 55 | /* Locking resynchronize hack */ | ||
| 56 | #define LOCKING_RESYNC_ENABLE | ||
| 57 | |||
| 58 | /* key combination for command */ | ||
| 59 | #define IS_COMMAND() ( \ | ||
| 60 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | ||
| 61 | ) | ||
| 62 | |||
| 63 | /* ws2812 RGB LED */ | ||
| 64 | #define RGB_DI_PIN D3 | ||
| 65 | #define RGBLIGHT_TIMER | ||
| 66 | #define RGBLED_NUM 14 // Number of LEDs | ||
| 67 | #define ws2812_PORTREG PORTD | ||
| 68 | #define ws2812_DDRREG DDRD | ||
| 69 | |||
| 70 | /* | ||
| 71 | * Feature disable options | ||
| 72 | * These options are also useful to firmware size reduction. | ||
| 73 | */ | ||
| 74 | |||
| 75 | /* disable debug print */ | ||
| 76 | // #define NO_DEBUG | ||
| 77 | |||
| 78 | /* disable print */ | ||
| 79 | // #define NO_PRINT | ||
| 80 | |||
| 81 | /* disable action features */ | ||
| 82 | //#define NO_ACTION_LAYER | ||
| 83 | //#define NO_ACTION_TAPPING | ||
| 84 | //#define NO_ACTION_ONESHOT | ||
| 85 | //#define NO_ACTION_MACRO | ||
| 86 | //#define NO_ACTION_FUNCTION | ||
| 87 | |||
| 88 | #endif | ||
diff --git a/keyboards/redox/rev1/rev1.c b/keyboards/redox/rev1/rev1.c new file mode 100644 index 000000000..2eb7c7c0e --- /dev/null +++ b/keyboards/redox/rev1/rev1.c | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | #include "redox.h" | ||
| 2 | |||
| 3 | |||
| 4 | #ifdef SSD1306OLED | ||
| 5 | void led_set_kb(uint8_t usb_led) { | ||
| 6 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | ||
| 7 | led_set_user(usb_led); | ||
| 8 | } | ||
| 9 | #endif | ||
| 10 | |||
| 11 | void matrix_init_kb(void) { | ||
| 12 | |||
| 13 | // // green led on | ||
| 14 | // DDRD |= (1<<5); | ||
| 15 | // PORTD &= ~(1<<5); | ||
| 16 | |||
| 17 | // // orange led on | ||
| 18 | // DDRB |= (1<<0); | ||
| 19 | // PORTB &= ~(1<<0); | ||
| 20 | |||
| 21 | matrix_init_user(); | ||
| 22 | }; | ||
diff --git a/keyboards/redox/rev1/rev1.h b/keyboards/redox/rev1/rev1.h new file mode 100644 index 000000000..be6224750 --- /dev/null +++ b/keyboards/redox/rev1/rev1.h | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | #ifndef REV1_H | ||
| 2 | #define REV1_H | ||
| 3 | |||
| 4 | #include "../redox.h" | ||
| 5 | |||
| 6 | //void promicro_bootloader_jmp(bool program); | ||
| 7 | #include "quantum.h" | ||
| 8 | |||
| 9 | |||
| 10 | #ifdef USE_I2C | ||
| 11 | #include <stddef.h> | ||
| 12 | #ifdef __AVR__ | ||
| 13 | #include <avr/io.h> | ||
| 14 | #include <avr/interrupt.h> | ||
| 15 | #endif | ||
| 16 | #endif | ||
| 17 | |||
| 18 | //void promicro_bootloader_jmp(bool program); | ||
| 19 | |||
| 20 | #ifndef FLIP_HALF | ||
| 21 | // Standard Keymap | ||
| 22 | // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) | ||
| 23 | #define LAYOUT( \ | ||
| 24 | L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ | ||
| 25 | L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ | ||
| 26 | L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ | ||
| 27 | L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ | ||
| 28 | L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ | ||
| 29 | ) \ | ||
| 30 | { \ | ||
| 31 | { L00, L01, L02, L03, L04, L05, L06 }, \ | ||
| 32 | { L10, L11, L12, L13, L14, L15, L16 }, \ | ||
| 33 | { L20, L21, L22, L23, L24, L25, L26 }, \ | ||
| 34 | { L30, L31, L32, L33, L34, L35, L36 }, \ | ||
| 35 | { L40, L41, L42, L43, L44, L45, L46 }, \ | ||
| 36 | { R06, R05, R04, R03, R02, R01, R00 }, \ | ||
| 37 | { R16, R15, R14, R13, R12, R11, R10 }, \ | ||
| 38 | { R26, R25, R24, R23, R22, R21, R20 }, \ | ||
| 39 | { R36, R35, R34, R33, R32, R31, R30 }, \ | ||
| 40 | { R46, R45, R44, R43, R42, R41, R40 } \ | ||
| 41 | } | ||
| 42 | #else | ||
| 43 | // Keymap with right side flipped | ||
| 44 | // (TRRS jack on both halves are to the right) | ||
| 45 | #define LAYOUT( \ | ||
| 46 | L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ | ||
| 47 | L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ | ||
| 48 | L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ | ||
| 49 | L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ | ||
| 50 | L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ | ||
| 51 | ) \ | ||
| 52 | { \ | ||
| 53 | { L00, L01, L02, L03, L04, L05, L06 }, \ | ||
| 54 | { L10, L11, L12, L13, L14, L15, L16 }, \ | ||
| 55 | { L20, L21, L22, L23, L24, L25, L26 }, \ | ||
| 56 | { L30, L31, L32, L33, L34, L35, L36 }, \ | ||
| 57 | { L40, L41, L42, L43, L44, L45, L46 }, \ | ||
| 58 | { R00, R01, R02, R03, R04, R05, R06 }, \ | ||
| 59 | { R10, R11, R12, R13, R14, R15, R16 }, \ | ||
| 60 | { R20, R21, R22, R23, R24, R25, R26 }, \ | ||
| 61 | { R30, R31, R32, R33, R34, R35, R36 }, \ | ||
| 62 | { R40, R41, R42, R43, R44, R45, R46 } \ | ||
| 63 | } | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #endif | ||
diff --git a/keyboards/redox/rev1/rules.mk b/keyboards/redox/rev1/rules.mk new file mode 100644 index 000000000..f84561674 --- /dev/null +++ b/keyboards/redox/rev1/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| BACKLIGHT_ENABLE = no \ No newline at end of file | |||
