diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2022-09-25 16:02:54 +0200 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2022-09-25 16:02:54 +0200 |
commit | 6afdd9d74da250e47ac64d6690bd19d037045e99 (patch) | |
tree | 661f6cfb244c02bcd1fbfe8fb9b2bd9242a91394 /keyboards/viendi8l | |
parent | 93a55e61b59d20f7cd842cce02e5b18a63a23612 (diff) | |
parent | 1bdf4cdc22ae57d111efb2f7d71e405e5c7b3f11 (diff) | |
download | qmk_firmware-6afdd9d74da250e47ac64d6690bd19d037045e99.tar.gz qmk_firmware-6afdd9d74da250e47ac64d6690bd19d037045e99.zip |
Merge branch 'master' into taamas
Diffstat (limited to 'keyboards/viendi8l')
-rw-r--r-- | keyboards/viendi8l/config.h | 66 | ||||
-rw-r--r-- | keyboards/viendi8l/halconf.h | 24 | ||||
-rw-r--r-- | keyboards/viendi8l/info.json | 103 | ||||
-rwxr-xr-x | keyboards/viendi8l/keymaps/default/keymap.c | 45 | ||||
-rwxr-xr-x | keyboards/viendi8l/keymaps/via/keymap.c | 52 | ||||
-rw-r--r-- | keyboards/viendi8l/keymaps/via/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/viendi8l/mcuconf.h | 28 | ||||
-rw-r--r-- | keyboards/viendi8l/readme.md | 27 | ||||
-rw-r--r-- | keyboards/viendi8l/rules.mk | 28 | ||||
-rw-r--r-- | keyboards/viendi8l/viendi8l.c | 56 | ||||
-rw-r--r-- | keyboards/viendi8l/viendi8l.h | 37 |
11 files changed, 467 insertions, 0 deletions
diff --git a/keyboards/viendi8l/config.h b/keyboards/viendi8l/config.h new file mode 100644 index 0000000000..827a490725 --- /dev/null +++ b/keyboards/viendi8l/config.h @@ -0,0 +1,66 @@ +/* + Copyright 2022 Gondolindrim <gondolindrim@acheronproject.com> + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 18 + + // C0 , C1 , C2 , C3 , C4 , C5 , C6 , C7 , C8 , C9 , C10, C11, C12, C13, C14, C15, C16, C17 +#define MATRIX_COL_PINS { C6 , C7 , C8 , C9 , A8 , B3 , B4 , A10, B5 , B8 , B9 , C13, C14, C15, A0 , A1 , A2 , A3 } + // R0 , R1 , R2 , R3 , R4 , R5 +#define MATRIX_ROW_PINS { C3 , C2 , C1 , C0 , B14, A7 } +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define ENCODERS_PAD_A { B10 } +#define ENCODERS_PAD_B { B12 } +#define ENCODER_RESOLUTION 2 + +#define TAPPING_TERM 200 + +#define I2C_DRIVER I2CD1 +#define I2C_SCL_PIN B6 +#define I2C_SDA_PIN B7 +#define I2C_SCL_PAL_MODE 4 +#define I2C_SDA_PAL_MODE 4 +#define EEPROM_I2C_24LC256 +#define I2C1_CLOCK_SPEED 400000 +#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 + +#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE + +#define RGB_DI_PIN B15 +#define RGBLED_NUM 4 +#define RGBLIGHT_DEFAULT_VAL 0 + +#define WS2812_PWM_COMPLEMENTARY_OUTPUT +#define WS2812_PWM_DRIVER PWMD1 +#define WS2812_PWM_CHANNEL 3 +#define WS2812_PWM_PAL_MODE 1 +#define WS2812_DMA_STREAM STM32_DMA2_STREAM5 +#define WS2812_DMA_CHANNEL 6 diff --git a/keyboards/viendi8l/halconf.h b/keyboards/viendi8l/halconf.h new file mode 100644 index 0000000000..ebdb4954a1 --- /dev/null +++ b/keyboards/viendi8l/halconf.h @@ -0,0 +1,24 @@ +/* Copyright 2020 QMK + * + * 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 <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#define HAL_USE_PWM TRUE +#define HAL_USE_PAL TRUE + +#define HAL_USE_I2C TRUE + +#include_next <halconf.h> diff --git a/keyboards/viendi8l/info.json b/keyboards/viendi8l/info.json new file mode 100644 index 0000000000..745937869d --- /dev/null +++ b/keyboards/viendi8l/info.json @@ -0,0 +1,103 @@ +{ + "keyboard_name": "8L", + "manufacturer": "Viendi", + "url": "https://viendi.co/", + "maintainer": "gondolindrim", + "usb": { + "vid": "0x8673", + "pid": "0x0877", + "device_version": "0.0.1" + }, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"Push", "x":0, "y":0}, + {"label":"\u00d7", "x":1, "y":0}, + {"label":"/", "x":2, "y":0}, + {"label":"Del", "x":3, "y":0}, + {"label":"Esc", "x":4.5, "y":0}, + {"label":"!", "x":5.5, "y":0}, + {"label":"@", "x":6.5, "y":0}, + {"label":"#", "x":7.5, "y":0}, + {"label":"$", "x":8.5, "y":0}, + {"label":"%", "x":9.5, "y":0}, + {"label":"^", "x":10.5, "y":0}, + {"label":"&", "x":11.5, "y":0}, + {"label":"*", "x":12.5, "y":0}, + {"label":"(", "x":13.5, "y":0}, + {"label":")", "x":14.5, "y":0}, + {"label":"-", "x":15.5, "y":0}, + {"label":"=", "x":16.5, "y":0}, + {"label":"Bksp", "x":17.5, "y":0}, + {"label":"Bksp", "x":18.5, "y":0}, + {"label":"-", "x":0, "y":1}, + {"label":"7", "x":1, "y":1}, + {"label":"8", "x":2, "y":1}, + {"label":"9", "x":3, "y":1}, + {"label":"Tab", "x":4.5, "y":1, "w":1.5}, + {"label":"Q", "x":6, "y":1}, + {"label":"W", "x":7, "y":1}, + {"label":"E", "x":8, "y":1}, + {"label":"R", "x":9, "y":1}, + {"label":"T", "x":10, "y":1}, + {"label":"Y", "x":11, "y":1}, + {"label":"U", "x":12, "y":1}, + {"label":"I", "x":13, "y":1}, + {"label":"O", "x":14, "y":1}, + {"label":"P", "x":15, "y":1}, + {"label":"{", "x":16, "y":1}, + {"label":"}", "x":17, "y":1}, + {"label":"|", "x":18, "y":1, "w":1.5}, + {"label":"+", "x":0, "y":2}, + {"label":"4", "x":1, "y":2}, + {"label":"5", "x":2, "y":2}, + {"label":"6", "x":3, "y":2}, + {"label":"Caps Lock", "x":4.5, "y":2, "w":1.75}, + {"label":"A", "x":6.25, "y":2}, + {"label":"S", "x":7.25, "y":2}, + {"label":"D", "x":8.25, "y":2}, + {"label":"F", "x":9.25, "y":2}, + {"label":"G", "x":10.25, "y":2}, + {"label":"H", "x":11.25, "y":2}, + {"label":"J", "x":12.25, "y":2}, + {"label":"K", "x":13.25, "y":2}, + {"label":"L", "x":14.25, "y":2}, + {"label":":", "x":15.25, "y":2}, + {"label":"\"", "x":16.25, "y":2}, + {"x":17.25, "y":2}, + {"label":"Enter", "x":18.25, "y":2, "w":1.25}, + {"label":"Enter", "x":0, "y":3}, + {"label":"1", "x":1, "y":3}, + {"label":"2", "x":2, "y":3}, + {"label":"3", "x":3, "y":3}, + {"label":"Shift", "x":4.5, "y":3, "w":1.25}, + {"x":5.75, "y":3}, + {"label":"Z", "x":6.75, "y":3}, + {"label":"X", "x":7.75, "y":3}, + {"label":"C", "x":8.75, "y":3}, + {"label":"V", "x":9.75, "y":3}, + {"label":"B", "x":10.75, "y":3}, + {"label":"N", "x":11.75, "y":3}, + {"label":"M", "x":12.75, "y":3}, + {"label":"<", "x":13.75, "y":3}, + {"label":">", "x":14.75, "y":3}, + {"label":"Shift", "x":15.75, "y":3, "w":1.75}, + {"label":"\u2191", "x":17.5, "y":3}, + {"x":18.5, "y":3}, + {"label":"Enter", "x":0, "y":4}, + {"label":".", "x":1, "y":4}, + {"label":".", "x":2, "y":4}, + {"label":"0", "x":3, "y":4}, + {"label":"Ctrl", "x":4.5, "y":4, "w":1.25}, + {"label":"Win", "x":5.75, "y":4, "w":1.25}, + {"label":"Alt", "x":7, "y":4, "w":1.25}, + {"x":8.25, "y":4, "w":6.25}, + {"x":14.5, "y":4}, + {"x":15.5, "y":4}, + {"label":"\u2190", "x":16.5, "y":4}, + {"label":"\u2193", "x":17.5, "y":4}, + {"label":"\u2192", "x":18.5, "y":4} + ] + } + } +} diff --git a/keyboards/viendi8l/keymaps/default/keymap.c b/keyboards/viendi8l/keymaps/default/keymap.c new file mode 100755 index 0000000000..3a7ff83fa0 --- /dev/null +++ b/keyboards/viendi8l/keymaps/default/keymap.c @@ -0,0 +1,45 @@ +/* +Copyright 2020 Álvaro "Gondolindrim" Volpato <alvaro.volpato@usp.br> + +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 <http://www.gnu.org/licenses/>. +*/ + +#include QMK_KEYBOARD_H + +#define LTCAPS LT(2, KC_CAPS) +#define MTRSFT RSFT_T(KC_UP) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_MUTE, KC_PSLS, KC_PAST, KC_BSPC, KC_GESC, 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_BSPC, + KC_PMNS, KC_P7, KC_P8, KC_P9, 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, + KC_PPLS, KC_P4, KC_P5, KC_P6, LTCAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_BSPC, + KC_PENT, KC_P1, KC_P2, KC_P3, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MTRSFT, KC_NUHS, + KC_PENT, KC_P0, KC_P0, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, TG(1), MO(2), KC_LEFT, KC_DOWN, KC_RGHT, MO(2) + ), + [1] = LAYOUT_all( + KC_MUTE, KC_PSLS, KC_PAST, KC_BSPC, KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, + KC_PMNS, KC_P7, KC_P8, KC_P9, 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, + KC_PPLS, KC_P4, KC_P5, KC_P6, LTCAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_BSPC, + KC_PENT, KC_P1, KC_P2, KC_P3, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MTRSFT, KC_NUHS, + KC_PENT, KC_P0, KC_P0, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, TG(1), MO(2), KC_LEFT, KC_DOWN, KC_RGHT, MO(2) + ), + [2] = LAYOUT_all( + KC_MUTE, KC_F10, KC_F11, KC_NUM, KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, KC_PLUS, XXXXXXX, + KC_MINS, KC_F7, KC_F8, KC_F9, KC_TAB, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, XXXXXXX, KC_PSCR, XXXXXXX, XXXXXXX, KC_DEL, + KC_EQL, KC_F4, KC_F5, KC_F6, _______, KC_HOME, KC_PGDN, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_F1, KC_F2, KC_F3, XXXXXXX, XXXXXXX, KC_LPRN, KC_RPRN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_CALC, KC_CALC, KC_DEL, XXXXXXX, GUI_TOG, KC_SLEP, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______ + ) +}; diff --git a/keyboards/viendi8l/keymaps/via/keymap.c b/keyboards/viendi8l/keymaps/via/keymap.c new file mode 100755 index 0000000000..5e7cf5d89b --- /dev/null +++ b/keyboards/viendi8l/keymaps/via/keymap.c @@ -0,0 +1,52 @@ +/* +Copyright 2020 Álvaro "Gondolindrim" Volpato <alvaro.volpato@usp.br> + +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 <http://www.gnu.org/licenses/>. +*/ + +#include QMK_KEYBOARD_H + +#define LTCAPS LT(2, KC_CAPS) +#define MTRSFT RSFT_T(KC_UP) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_MUTE, KC_PSLS, KC_PAST, KC_BSPC, KC_GESC, 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_BSPC, + KC_PMNS, KC_P7, KC_P8, KC_P9, 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, + KC_PPLS, KC_P4, KC_P5, KC_P6, LTCAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_BSPC, + KC_PENT, KC_P1, KC_P2, KC_P3, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MTRSFT, KC_NUHS, + KC_PENT, KC_P0, KC_P0, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, TG(1), MO(2), KC_LEFT, KC_DOWN, KC_RGHT, MO(2) + ), + [1] = LAYOUT_all( + KC_MUTE, KC_PSLS, KC_PAST, KC_BSPC, KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, + KC_PMNS, KC_P7, KC_P8, KC_P9, 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, + KC_PPLS, KC_P4, KC_P5, KC_P6, LTCAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_BSPC, + KC_PENT, KC_P1, KC_P2, KC_P3, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MTRSFT, KC_NUHS, + KC_PENT, KC_P0, KC_P0, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, TG(1), MO(2), KC_LEFT, KC_DOWN, KC_RGHT, MO(2) + ), + [2] = LAYOUT_all( + KC_MUTE, KC_F10, KC_F11, KC_NUM, KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, KC_PLUS, XXXXXXX, + KC_MINS, KC_F7, KC_F8, KC_F9, KC_TAB, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, XXXXXXX, KC_PSCR, XXXXXXX, XXXXXXX, KC_DEL, + KC_EQL, KC_F4, KC_F5, KC_F6, _______, KC_HOME, KC_PGDN, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_F1, KC_F2, KC_F3, XXXXXXX, XXXXXXX, KC_LPRN, KC_RPRN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_CALC, KC_CALC, KC_DEL, XXXXXXX, GUI_TOG, KC_SLEP, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______ + ), + [3] = LAYOUT_all( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) +}; diff --git a/keyboards/viendi8l/keymaps/via/rules.mk b/keyboards/viendi8l/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/viendi8l/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/viendi8l/mcuconf.h b/keyboards/viendi8l/mcuconf.h new file mode 100644 index 0000000000..6c8d8c8af9 --- /dev/null +++ b/keyboards/viendi8l/mcuconf.h @@ -0,0 +1,28 @@ +/* Copyright 2020 QMK + * + * 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 <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include_next <mcuconf.h> + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_PWM_USE_ADVANCED +#define STM32_PWM_USE_ADVANCED TRUE + +#undef STM32_PWM_USE_TIM1 +#define STM32_PWM_USE_TIM1 TRUE diff --git a/keyboards/viendi8l/readme.md b/keyboards/viendi8l/readme.md new file mode 100644 index 0000000000..12b3c5adc7 --- /dev/null +++ b/keyboards/viendi8l/readme.md @@ -0,0 +1,27 @@ +# Viendi8L PCB firmware + +![8L_image](https://imgur.com/z4cuSYJh.png) + +The 8L 80% (60% plus southpaw numpad) keyboard designed by Viendi, with PCB by Gondolindrim. + +* Keyboard Maintainer: [Gondolindrim](https://github.com/gondolindrim) +* Hardware Availability: proprietary PCB +* Website: [Viendi](https://viendi.co/) + +## How to flash + +### Enter bootloader + +* **Bootmagic reset**: hold down the key at (0,0) in the matrix (the encoder push) and plug in the keyboard, waiting for five seconds +* **Physical reset button**: press the button on the front of the PCB or use pliers to short the reset contacts, for at least five seconds +* **Keycode in layout**: press the key mapped to `QK_BOOT` if it is available (ESC key at layer 1 in the default layout) + +## Compile firmware + +After accessing the DFU state in your PCB, build the default layout using: + + make viendi8l:default + +Then download the resulting binary `*bin` file using `dfu-util` or QMK Toolbox. + +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/viendi8l/rules.mk b/keyboards/viendi8l/rules.mk new file mode 100644 index 0000000000..e42bc577d7 --- /dev/null +++ b/keyboards/viendi8l/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = STM32F401 + +BOARD = GENERIC_STM32_F401XC + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +WS2812_DRIVER = pwm +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes +LTO_ENABLE = no + +EEPROM_DRIVER = i2c + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE -DDEBUG_EEPROM_OUTPUT=TRUE diff --git a/keyboards/viendi8l/viendi8l.c b/keyboards/viendi8l/viendi8l.c new file mode 100644 index 0000000000..ef720ce207 --- /dev/null +++ b/keyboards/viendi8l/viendi8l.c @@ -0,0 +1,56 @@ +/* +Copyright 2022 Álvaro "Gondolindrim" Volpato <gondolindrim@acheronproject.com> + +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 <http://www.gnu.org/licenses/>. +*/ + +#include "viendi8l.h" + + +// Defining indicator colors +uint8_t caps_color[3] = {0xFF,0xFF,0xFF}; +uint8_t num_color[3] = {0xFF,0xFF,0xFF}; +uint8_t layer_color[3] = {0xFF,0xFF,0xFF}; + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + led_state.caps_lock ? rgblight_setrgb_at(caps_color[0], caps_color[1], caps_color[2], 2) : rgblight_setrgb_at(0x00,0x00,0x00,2); + led_state.num_lock ? rgblight_setrgb_at(num_color[0], num_color[1], num_color[2], 3) : rgblight_setrgb_at(0x00,0x00,0x00,3); + } + return res; +} + +layer_state_t layer_state_set_kb(layer_state_t state) { + switch (get_highest_layer(state)) { + case 1: + rgblight_setrgb_at(layer_color[0], layer_color[1], layer_color[2], 1); + break; + default: + rgblight_setrgb_at(0x00, 0x00, 0x00, 1); + break; + } + return state; +} + +#ifdef ENCODER_ENABLE +bool encoder_update_kb(uint8_t index, bool clockwise) { + if(!encoder_update_user(index, clockwise)) return false; + if (index == 0) { + if (clockwise) tap_code_delay(KC_VOLU, 10); + else tap_code_delay(KC_VOLD, 10); + } + return true; +} +#endif diff --git a/keyboards/viendi8l/viendi8l.h b/keyboards/viendi8l/viendi8l.h new file mode 100644 index 0000000000..80070619f0 --- /dev/null +++ b/keyboards/viendi8l/viendi8l.h @@ -0,0 +1,37 @@ +/* +Copyright 2020 Gondolindrim <gondolindrim@acheronproject.com> + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, \ + K40, K41, K42, K43, K44, K46, K47, K5A, K5C, K5D, K5E, K5F, K5G, K5H \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H }, \ + { K40, K41, K42, K43, K44, ___, K46, K47, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, K5A, ___, K5C, K5D, K5E, K5F, K5G, K5H } \ +} |