diff options
Diffstat (limited to 'keyboards/ristretto')
| -rw-r--r-- | keyboards/ristretto/config.h | 50 | ||||
| -rw-r--r-- | keyboards/ristretto/info.json | 17 | ||||
| -rw-r--r-- | keyboards/ristretto/keymaps/default/keymap.c | 53 | ||||
| -rw-r--r-- | keyboards/ristretto/readme.md | 18 | ||||
| -rw-r--r-- | keyboards/ristretto/ristretto.c | 63 | ||||
| -rw-r--r-- | keyboards/ristretto/ristretto.h | 31 | ||||
| -rw-r--r-- | keyboards/ristretto/rules.mk | 25 |
7 files changed, 257 insertions, 0 deletions
diff --git a/keyboards/ristretto/config.h b/keyboards/ristretto/config.h new file mode 100644 index 000000000..3d5a66fbc --- /dev/null +++ b/keyboards/ristretto/config.h | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | /* Copyright 2021 Brandon Lewis | ||
| 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 | #include "config_common.h" | ||
| 20 | |||
| 21 | /* USB Device descriptor parameter */ | ||
| 22 | #define VENDOR_ID 0x666B // fk | ||
| 23 | #define PRODUCT_ID 0x7273 // rs | ||
| 24 | #define DEVICE_VER 0x0001 // rev 1 | ||
| 25 | #define MANUFACTURER fruitykeeb | ||
| 26 | #define PRODUCT ristretto | ||
| 27 | |||
| 28 | /* key matrix size */ | ||
| 29 | #define MATRIX_ROWS 4 | ||
| 30 | #define MATRIX_COLS 13 | ||
| 31 | |||
| 32 | /* key matrix pins */ | ||
| 33 | #define MATRIX_ROW_PINS { B1, B2, B3, D3 } | ||
| 34 | #define MATRIX_COL_PINS { C7, C6, B6, B5, B4, D7, B7, F0, F1, F4, F5, F6, F7 } | ||
| 35 | |||
| 36 | /* COL2ROW or ROW2COL */ | ||
| 37 | #define DIODE_DIRECTION COL2ROW | ||
| 38 | |||
| 39 | /* Set 0 if debouncing isn't needed */ | ||
| 40 | #define DEBOUNCE 5 | ||
| 41 | |||
| 42 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 43 | #define LOCKING_SUPPORT_ENABLE | ||
| 44 | |||
| 45 | /* Locking resynchronize hack */ | ||
| 46 | #define LOCKING_RESYNC_ENABLE | ||
| 47 | |||
| 48 | #define ENCODERS_PAD_A { D4 } | ||
| 49 | #define ENCODERS_PAD_B { D6 } | ||
| 50 | #define ENCODER_RESOLUTION 4 | ||
diff --git a/keyboards/ristretto/info.json b/keyboards/ristretto/info.json new file mode 100644 index 000000000..86a0172c1 --- /dev/null +++ b/keyboards/ristretto/info.json | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "ristretto", | ||
| 3 | "url": "https://www.fruitykeeb.xyz/product/ristretto", | ||
| 4 | "maintainer": "Fruit", | ||
| 5 | "width": 13, | ||
| 6 | "height": 4, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT": { | ||
| 9 | "layout": [ | ||
| 10 | {"label":"ESC", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0} , {"label":"Y", "x":7, "y":0}, {"label":"U", "x":8, "y":0}, {"label":"I", "x":9, "y":0}, {"label":"O", "x":10, "y":0}, {"label":"P", "x":11, "y":0}, {"label":"BKSP", "x":12, "y":0}, | ||
| 11 | {"label":"TAB", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1} , {"label":"H", "x":7, "y":1}, {"label":"J", "x":8, "y":1}, {"label":"K", "x":9, "y":1}, {"label":"L", "x":10, "y":1}, {"label":";", "x":11, "y":1}, {"label":"'", "x":12, "y":2}, | ||
| 12 | {"label":"LSFT", "x":0, "y":2},{"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2} , {"label":"N", "x":7, "y":2}, {"label":"M", "x":8, "y":2}, {"label":"<", "x":9, "y":2}, {"label":">", "x":10, "y":2}, {"label":"?", "x":11, "y":2}, {"label":"ENTR", "x":12, "y":2}, | ||
| 13 | {"label":"LCTL", "x":0, "y":3},{"label":"LGUI","x":1,"y":3},{"label":"LALT","x":2,"y":3},{"label":"" , "x":3, "y":3}, {"label":"" , "x":4, "y":3}, {"label":"" , "x":5, "y":3}, {"label":"Rotary", "x":6, "y":3}, {"label":"" , "x":7, "y":3}, {"label":"" , "x":8, "y":3}, {"label":"" , "x":9, "y":3}, {"label":"RALT","x":10,"y":3},{"label":"RGUI","x":11,"y":3}, {"label":"RCTL","x":12, "y":3} | ||
| 14 | ] | ||
| 15 | } | ||
| 16 | } | ||
| 17 | } \ No newline at end of file | ||
diff --git a/keyboards/ristretto/keymaps/default/keymap.c b/keyboards/ristretto/keymaps/default/keymap.c new file mode 100644 index 000000000..e02c6ea24 --- /dev/null +++ b/keyboards/ristretto/keymaps/default/keymap.c | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | /* Copyright 2021 Brandon Lewis | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | enum layers { | ||
| 20 | _BASE, | ||
| 21 | _RAISE, | ||
| 22 | _LOWER, | ||
| 23 | _ADJUST | ||
| 24 | }; | ||
| 25 | |||
| 26 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 27 | [_BASE] = LAYOUT( | ||
| 28 | KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_BSPC , | ||
| 29 | KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , | ||
| 30 | KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_ENT , | ||
| 31 | KC_LCTL , KC_LGUI , KC_LALT ,MO(_LOWER),KC_ENT , KC_SPC , KC_MUTE , KC_SPC , KC_RSFT ,MO(_RAISE),KC_RALT , KC_RGUI , KC_RCTRL | ||
| 32 | ), | ||
| 33 | [_RAISE] = LAYOUT( | ||
| 34 | KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_DEL , | ||
| 35 | KC_CAPS , KC_MINS , KC_EQL , KC_LBRC , KC_RBRC , KC_BSLS , KC_NO , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT , KC_BSLS , | ||
| 36 | KC_TRNS , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , | ||
| 37 | KC_TRNS , KC_TRNS , KC_TRNS ,MO(_ADJUST),KC_ENT , KC_NO , KC_MPLY , KC_NO , KC_RSFT , KC_NO , KC_TRNS , KC_TRNS , KC_TRNS | ||
| 38 | ), | ||
| 39 | [_LOWER] = LAYOUT( | ||
| 40 | KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , | ||
| 41 | KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_LBRC , KC_RBRC , KC_NO , | ||
| 42 | KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , | ||
| 43 | KC_TRNS , KC_TRNS , KC_TRNS , KC_NO , KC_ENT , KC_NO , KC_MUTE , KC_NO , KC_RSFT ,MO(_ADJUST),KC_TRNS, KC_TRNS , KC_TRNS | ||
| 44 | ), | ||
| 45 | [_ADJUST] = LAYOUT( | ||
| 46 | XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , | ||
| 47 | XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_CAPS , KC_NLCK , KC_SLCK , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , | ||
| 48 | XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , | ||
| 49 | KC_TRNS , KC_TRNS , KC_TRNS , XXXXXXX , XXXXXXX , XXXXXXX , KC_MUTE , XXXXXXX , XXXXXXX , XXXXXXX , KC_TRNS , KC_TRNS , KC_TRNS | ||
| 50 | ), | ||
| 51 | }; | ||
| 52 | |||
| 53 | // OLED and Encoder function is located in the ristretto.c File | ||
diff --git a/keyboards/ristretto/readme.md b/keyboards/ristretto/readme.md new file mode 100644 index 000000000..d047e7099 --- /dev/null +++ b/keyboards/ristretto/readme.md | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | # Ristretto | ||
| 2 | |||
| 3 |  | ||
| 4 |  | ||
| 5 | |||
| 6 | An Integrated, Column Stagger, 40% Keyboard with OLED and Rotary Encoder | ||
| 7 | |||
| 8 | * Keyboard Maintainer: [Fruit](https://github.com/Blewis308) | ||
| 9 | * Hardware Supported: Ristretto PCB, Atmega32u4 | ||
| 10 | * Hardware Availability: Through Group Buy - May 2021 | ||
| 11 | |||
| 12 | To enter the bootloader, press the button marked "SW1" on the bottom of the PCB. | ||
| 13 | |||
| 14 | Make example for this keyboard (after setting up your build envionment): | ||
| 15 | |||
| 16 | make ristretto:default | ||
| 17 | |||
| 18 | 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). \ No newline at end of file | ||
diff --git a/keyboards/ristretto/ristretto.c b/keyboards/ristretto/ristretto.c new file mode 100644 index 000000000..1ea43bcee --- /dev/null +++ b/keyboards/ristretto/ristretto.c | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | /* Copyright 2021 Brandon Lewis | ||
| 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 | #include "ristretto.h" | ||
| 18 | |||
| 19 | enum layers { | ||
| 20 | _BASE, | ||
| 21 | _RAISE, | ||
| 22 | _LOWER, | ||
| 23 | _ADJUST | ||
| 24 | }; | ||
| 25 | |||
| 26 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 27 | if (!encoder_update_user(index, clockwise)) { return false; } | ||
| 28 | if(index == 0) { | ||
| 29 | if (clockwise) { | ||
| 30 | tap_code(KC_VOLD); | ||
| 31 | } else { | ||
| 32 | tap_code(KC_VOLU); | ||
| 33 | } | ||
| 34 | } | ||
| 35 | return true; | ||
| 36 | } | ||
| 37 | |||
| 38 | #ifdef OLED_DRIVER_ENABLE | ||
| 39 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
| 40 | return OLED_ROTATION_270; | ||
| 41 | } | ||
| 42 | |||
| 43 | __attribute__((weak)) void oled_task_user(void) { | ||
| 44 | oled_write_P(PSTR("\n\n"), false); | ||
| 45 | oled_write_ln_P(PSTR("LAYER"), false); | ||
| 46 | oled_write_ln_P(PSTR(""), false); | ||
| 47 | switch (get_highest_layer(layer_state)) { | ||
| 48 | case _BASE: | ||
| 49 | oled_write_P(PSTR("BASE\n"), false); | ||
| 50 | break; | ||
| 51 | case _RAISE: | ||
| 52 | oled_write_P(PSTR("RAISE\n"), false); | ||
| 53 | break; | ||
| 54 | case _LOWER: | ||
| 55 | oled_write_P(PSTR("LOWER\n"), false); | ||
| 56 | break; | ||
| 57 | case _ADJUST: | ||
| 58 | oled_write_P(PSTR("ADJ\n"), false); | ||
| 59 | break; | ||
| 60 | } | ||
| 61 | } | ||
| 62 | |||
| 63 | #endif | ||
diff --git a/keyboards/ristretto/ristretto.h b/keyboards/ristretto/ristretto.h new file mode 100644 index 000000000..66be57b18 --- /dev/null +++ b/keyboards/ristretto/ristretto.h | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | /* Copyright 2021 Brandon Lewis | ||
| 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 | #include "quantum.h" | ||
| 20 | |||
| 21 | #define LAYOUT( \ | ||
| 22 | K000, K001, K002, K003, K004, K005, K007, K008, K009, K010, K011, K012, \ | ||
| 23 | K100, K101, K102, K103, K104, K105, K107, K108, K109, K110, K111, K112, \ | ||
| 24 | K200, K201, K202, K203, K204, K205, K207, K208, K209, K210, K211, K212, \ | ||
| 25 | K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312 \ | ||
| 26 | ) { \ | ||
| 27 | {K000, K001, K002, K003, K004, K005, KC_NO, K007, K008, K009, K010, K011, K012}, \ | ||
| 28 | {K100, K101, K102, K103, K104, K105, KC_NO, K107, K108, K109, K110, K111, K112}, \ | ||
| 29 | {K200, K201, K202, K203, K204, K205, KC_NO, K207, K208, K209, K210, K211, K212}, \ | ||
| 30 | {K300, K301, K302, K303, K304, K305, K306 , K307, K308, K309, K310, K311, K312} \ | ||
| 31 | } | ||
diff --git a/keyboards/ristretto/rules.mk b/keyboards/ristretto/rules.mk new file mode 100644 index 000000000..96bf291a0 --- /dev/null +++ b/keyboards/ristretto/rules.mk | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = caterina | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration | ||
| 11 | MOUSEKEY_ENABLE = no # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 18 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
| 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 22 | AUDIO_ENABLE = no # Audio output | ||
| 23 | ENCODER_ENABLE = yes | ||
| 24 | OLED_DRIVER_ENABLE = yes | ||
| 25 | WAIT_FOR_USB = yes | ||
