diff options
| author | mechlovin <57231893+mechlovin@users.noreply.github.com> | 2020-09-01 07:20:19 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-31 17:20:19 -0700 |
| commit | fa740c12861f77b1381fa2ee282fd57080c70502 (patch) | |
| tree | 7f71b71fdae4b7db815d381d3ae84f42f08fe2c2 | |
| parent | 69804bb243989c06d276581cfdcc9e2f6fb188e6 (diff) | |
| download | qmk_firmware-fa740c12861f77b1381fa2ee282fd57080c70502.tar.gz qmk_firmware-fa740c12861f77b1381fa2ee282fd57080c70502.zip | |
[Keyboard] Mechlovin Delphine (#9835)
* add
* ADD
* update
* update
* update
* update
* Update rgb_led.c
* Update rgb_led.c
| -rw-r--r-- | keyboards/mechlovin/delphine/config.h | 44 | ||||
| -rw-r--r-- | keyboards/mechlovin/delphine/delphine.c | 35 | ||||
| -rw-r--r-- | keyboards/mechlovin/delphine/delphine.h | 35 | ||||
| -rw-r--r-- | keyboards/mechlovin/delphine/info.json | 38 | ||||
| -rw-r--r-- | keyboards/mechlovin/delphine/keymaps/default/keymap.c | 28 | ||||
| -rw-r--r-- | keyboards/mechlovin/delphine/keymaps/default/readme.md | 1 | ||||
| -rw-r--r-- | keyboards/mechlovin/delphine/keymaps/via/keymap.c | 52 | ||||
| -rw-r--r-- | keyboards/mechlovin/delphine/keymaps/via/readme.md | 1 | ||||
| -rw-r--r-- | keyboards/mechlovin/delphine/keymaps/via/rules.mk | 1 | ||||
| -rw-r--r-- | keyboards/mechlovin/delphine/mono_led/config.h | 34 | ||||
| -rw-r--r-- | keyboards/mechlovin/delphine/mono_led/rules.mk | 2 | ||||
| -rw-r--r-- | keyboards/mechlovin/delphine/readme.md | 15 | ||||
| -rw-r--r-- | keyboards/mechlovin/delphine/rgb_led/config.h | 47 | ||||
| -rw-r--r-- | keyboards/mechlovin/delphine/rgb_led/rgb_led.c | 160 | ||||
| -rw-r--r-- | keyboards/mechlovin/delphine/rgb_led/rgb_led.h | 19 | ||||
| -rw-r--r-- | keyboards/mechlovin/delphine/rgb_led/rules.mk | 2 | ||||
| -rw-r--r-- | keyboards/mechlovin/delphine/rules.mk | 25 |
17 files changed, 539 insertions, 0 deletions
diff --git a/keyboards/mechlovin/delphine/config.h b/keyboards/mechlovin/delphine/config.h new file mode 100644 index 000000000..b3a084f67 --- /dev/null +++ b/keyboards/mechlovin/delphine/config.h | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2020 Team Mechlovin' | ||
| 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 0x4D4C | ||
| 24 | #define MANUFACTURER Mechlovin | ||
| 25 | #define PRODUCT Mechlovin Delphine | ||
| 26 | |||
| 27 | /* key matrix size */ | ||
| 28 | #define MATRIX_ROWS 6 | ||
| 29 | #define MATRIX_COLS 4 | ||
| 30 | |||
| 31 | /* | ||
| 32 | * Keyboard Matrix Assignments | ||
| 33 | * | ||
| 34 | * Change this to how you wired your keyboard | ||
| 35 | * COLS: AVR pins used for columns, left to right | ||
| 36 | * ROWS: AVR pins used for rows, top to bottom | ||
| 37 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
| 38 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
| 39 | * | ||
| 40 | */ | ||
| 41 | #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, D3 } | ||
| 42 | #define MATRIX_COL_PINS { F7, D7, D6, D2 } | ||
| 43 | |||
| 44 | #define DIODE_DIRECTION COL2ROW \ No newline at end of file | ||
diff --git a/keyboards/mechlovin/delphine/delphine.c b/keyboards/mechlovin/delphine/delphine.c new file mode 100644 index 000000000..52292b3c9 --- /dev/null +++ b/keyboards/mechlovin/delphine/delphine.c | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | /* Copyright 2020 Team Mechlovin' | ||
| 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 "delphine.h" | ||
| 18 | |||
| 19 | void matrix_init_kb(void) { | ||
| 20 | matrix_init_user(); | ||
| 21 | led_init_ports(); | ||
| 22 | } | ||
| 23 | |||
| 24 | void led_init_ports(void) { | ||
| 25 | setPinOutput(B5); | ||
| 26 | writePinLow(B5); | ||
| 27 | } | ||
| 28 | |||
| 29 | bool led_update_kb(led_t led_state) { | ||
| 30 | if(led_update_user(led_state)) { | ||
| 31 | writePin(B5, led_state.num_lock); | ||
| 32 | } | ||
| 33 | |||
| 34 | return true; | ||
| 35 | } | ||
diff --git a/keyboards/mechlovin/delphine/delphine.h b/keyboards/mechlovin/delphine/delphine.h new file mode 100644 index 000000000..1112fc27f --- /dev/null +++ b/keyboards/mechlovin/delphine/delphine.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | /* Copyright 2020 Team Mechlovin' | ||
| 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_ortho_6x4( \ | ||
| 22 | K00, K01, K02, K03, \ | ||
| 23 | K10, K11, K12, K13, \ | ||
| 24 | K20, K21, K22, K23, \ | ||
| 25 | K30, K31, K32, K33, \ | ||
| 26 | K40, K41, K42, K43, \ | ||
| 27 | K50, K51, K52, K53 \ | ||
| 28 | ) { \ | ||
| 29 | { K00, K01, K02, K03 }, \ | ||
| 30 | { K10, K11, K12, K13 }, \ | ||
| 31 | { K20, K21, K22, K23 }, \ | ||
| 32 | { K30, K31, K32, K33 }, \ | ||
| 33 | { K40, K41, K42, K43 }, \ | ||
| 34 | { K50, K51, K52, K53 }, \ | ||
| 35 | } | ||
diff --git a/keyboards/mechlovin/delphine/info.json b/keyboards/mechlovin/delphine/info.json new file mode 100644 index 000000000..6356f4a3d --- /dev/null +++ b/keyboards/mechlovin/delphine/info.json | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "Delphine", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "Team Mechlovin'", | ||
| 5 | "width": 4, | ||
| 6 | "height": 6.25, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT_ortho_6x4": { | ||
| 9 | "layout": [ | ||
| 10 | {"label":"K00 (F0,F7)", "x":0, "y":0}, | ||
| 11 | {"label":"K01 (F0,D7)", "x":1, "y":0}, | ||
| 12 | {"label":"K02 (F0,D6)", "x":2, "y":0}, | ||
| 13 | {"label":"K03 (F0,D2)", "x":3, "y":0}, | ||
| 14 | {"label":"K10 (F1,F7)", "x":0, "y":1.25}, | ||
| 15 | {"label":"K11 (F1,D7)", "x":1, "y":1.25}, | ||
| 16 | {"label":"K12 (F1,D6)", "x":2, "y":1.25}, | ||
| 17 | {"label":"K13 (F1,D2)", "x":3, "y":1.25}, | ||
| 18 | {"label":"K20 (F4,F7)", "x":0, "y":2.25}, | ||
| 19 | {"label":"K21 (F4,D7)", "x":1, "y":2.25}, | ||
| 20 | {"label":"K22 (F4,D6)", "x":2, "y":2.25}, | ||
| 21 | {"label":"K23 (F4,D2)", "x":3, "y":2.25}, | ||
| 22 | {"label":"K30 (F5,F7)", "x":0, "y":3.25}, | ||
| 23 | {"label":"K31 (F5,D7)", "x":1, "y":3.25}, | ||
| 24 | {"label":"K32 (F5,D6)", "x":2, "y":3.25}, | ||
| 25 | {"label":"K33 (F5,D2)", "x":3, "y":3.25}, | ||
| 26 | {"label":"K40 (F6,F7)", "x":0, "y":4.25}, | ||
| 27 | {"label":"K41 (F6,D7)", "x":1, "y":4.25}, | ||
| 28 | {"label":"K42 (F6,D6)", "x":2, "y":4.25}, | ||
| 29 | {"label":"K43 (F6,D2)", "x":3, "y":4.25}, | ||
| 30 | {"label":"K50 (D3,F7)", "x":0, "y":5.25}, | ||
| 31 | {"label":"K51 (D3,D7)", "x":1, "y":5.25}, | ||
| 32 | {"label":"K52 (D3,D6)", "x":2, "y":5.25}, | ||
| 33 | {"label":"K53 (D3,D2)", "x":3, "y":5.25} | ||
| 34 | ] | ||
| 35 | } | ||
| 36 | } | ||
| 37 | ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" | ||
| 38 | } | ||
diff --git a/keyboards/mechlovin/delphine/keymaps/default/keymap.c b/keyboards/mechlovin/delphine/keymaps/default/keymap.c new file mode 100644 index 000000000..584d0b223 --- /dev/null +++ b/keyboards/mechlovin/delphine/keymaps/default/keymap.c | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | /* Copyright 2020 Team Mechlovin' | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 19 | [0] = LAYOUT_ortho_6x4( | ||
| 20 | KC_ESC, BL_STEP, RGB_TOG, RGB_MOD, | ||
| 21 | KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, | ||
| 22 | KC_P7, KC_P8, KC_P9, KC_PPLS, | ||
| 23 | KC_P4, KC_P5, KC_P6, KC_PEQL, | ||
| 24 | KC_P1, KC_P2, KC_P3, KC_PENT, | ||
| 25 | KC_P0, KC_P0, KC_PDOT, KC_BSPC | ||
| 26 | ), | ||
| 27 | |||
| 28 | }; \ No newline at end of file | ||
diff --git a/keyboards/mechlovin/delphine/keymaps/default/readme.md b/keyboards/mechlovin/delphine/keymaps/default/readme.md new file mode 100644 index 000000000..67504a70d --- /dev/null +++ b/keyboards/mechlovin/delphine/keymaps/default/readme.md | |||
| @@ -0,0 +1 @@ | |||
| # The default keymap for delphine | |||
diff --git a/keyboards/mechlovin/delphine/keymaps/via/keymap.c b/keyboards/mechlovin/delphine/keymaps/via/keymap.c new file mode 100644 index 000000000..18c30fdba --- /dev/null +++ b/keyboards/mechlovin/delphine/keymaps/via/keymap.c | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | /* Copyright 2020 Team Mechlovin' | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 19 | [0] = LAYOUT_ortho_6x4( | ||
| 20 | KC_ESC, BL_STEP, RGB_TOG, RGB_MOD, | ||
| 21 | KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, | ||
| 22 | KC_P7, KC_P8, KC_P9, KC_PPLS, | ||
| 23 | KC_P4, KC_P5, KC_P6, KC_PEQL, | ||
| 24 | KC_P1, KC_P2, KC_P3, KC_PENT, | ||
| 25 | KC_P0, KC_P0, KC_PDOT, KC_BSPC | ||
| 26 | ), | ||
| 27 | [1] = LAYOUT_ortho_6x4( | ||
| 28 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 29 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 30 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 31 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 32 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 33 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 34 | ), | ||
| 35 | [2] = LAYOUT_ortho_6x4( | ||
| 36 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 37 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 38 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 39 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 40 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 41 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 42 | ), | ||
| 43 | [3] = LAYOUT_ortho_6x4( | ||
| 44 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 45 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 46 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 47 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 48 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 49 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 50 | ), | ||
| 51 | |||
| 52 | }; \ No newline at end of file | ||
diff --git a/keyboards/mechlovin/delphine/keymaps/via/readme.md b/keyboards/mechlovin/delphine/keymaps/via/readme.md new file mode 100644 index 000000000..b97ae1f26 --- /dev/null +++ b/keyboards/mechlovin/delphine/keymaps/via/readme.md | |||
| @@ -0,0 +1 @@ | |||
| # The via keymap for delphine | |||
diff --git a/keyboards/mechlovin/delphine/keymaps/via/rules.mk b/keyboards/mechlovin/delphine/keymaps/via/rules.mk new file mode 100644 index 000000000..036bd6d1c --- /dev/null +++ b/keyboards/mechlovin/delphine/keymaps/via/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| VIA_ENABLE = yes \ No newline at end of file | |||
diff --git a/keyboards/mechlovin/delphine/mono_led/config.h b/keyboards/mechlovin/delphine/mono_led/config.h new file mode 100644 index 000000000..ead627937 --- /dev/null +++ b/keyboards/mechlovin/delphine/mono_led/config.h | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | |||
| 2 | #pragma once | ||
| 3 | |||
| 4 | #define PRODUCT_ID 0xDEF1 | ||
| 5 | #define DEVICE_VER 0x0001 | ||
| 6 | |||
| 7 | |||
| 8 | #ifdef BACKLIGHT_ENABLE | ||
| 9 | #define BACKLIGHT_PIN B6 | ||
| 10 | // #define BACKLIGHT_BREATHING | ||
| 11 | #define BACKLIGHT_LEVELS 3 | ||
| 12 | #endif | ||
| 13 | |||
| 14 | #ifdef RGBLIGHT_ENABLE | ||
| 15 | #define RGB_DI_PIN E2 | ||
| 16 | #define RGBLED_NUM 13 | ||
| 17 | #define RGBLIGHT_HUE_STEP 8 | ||
| 18 | #define RGBLIGHT_SAT_STEP 8 | ||
| 19 | #define RGBLIGHT_VAL_STEP 8 | ||
| 20 | #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | ||
| 21 | #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
| 22 | /*== all animations enable ==*/ | ||
| 23 | #define RGBLIGHT_ANIMATIONS | ||
| 24 | // /*== or choose animations ==*/ | ||
| 25 | // #define RGBLIGHT_EFFECT_BREATHING | ||
| 26 | // #define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
| 27 | // #define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
| 28 | // #define RGBLIGHT_EFFECT_SNAKE | ||
| 29 | // #define RGBLIGHT_EFFECT_KNIGHT | ||
| 30 | // #define RGBLIGHT_EFFECT_CHRISTMAS | ||
| 31 | // #define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
| 32 | // #define RGBLIGHT_EFFECT_RGB_TEST | ||
| 33 | // #define RGBLIGHT_EFFECT_ALTERNATING | ||
| 34 | #endif \ No newline at end of file | ||
diff --git a/keyboards/mechlovin/delphine/mono_led/rules.mk b/keyboards/mechlovin/delphine/mono_led/rules.mk new file mode 100644 index 000000000..ed572b0bb --- /dev/null +++ b/keyboards/mechlovin/delphine/mono_led/rules.mk | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | ||
| 2 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow \ No newline at end of file | ||
diff --git a/keyboards/mechlovin/delphine/readme.md b/keyboards/mechlovin/delphine/readme.md new file mode 100644 index 000000000..9a5389a5f --- /dev/null +++ b/keyboards/mechlovin/delphine/readme.md | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | # delphine | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | A Number-Pad PCB, Mono backlight and RGB backlight version, Dolpad compatible. | ||
| 6 | |||
| 7 | * Keyboard Maintainer: [Mechlovin'](https://github.com/mechlovin) | ||
| 8 | * Hardware Supported: Delphine PCB | ||
| 9 | * Hardware Availability: [Team Mechlovin'](https://mechlove.com) | ||
| 10 | |||
| 11 | Make example for this keyboard (after setting up your build environment): | ||
| 12 | |||
| 13 | make mechlovin/delphine:default | ||
| 14 | |||
| 15 | 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/mechlovin/delphine/rgb_led/config.h b/keyboards/mechlovin/delphine/rgb_led/config.h new file mode 100644 index 000000000..4d5c853d0 --- /dev/null +++ b/keyboards/mechlovin/delphine/rgb_led/config.h | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #define PRODUCT_ID 0xDEF2 | ||
| 4 | #define DEVICE_VER 0x0001 | ||
| 5 | |||
| 6 | #ifdef RGBLIGHT_ENABLE | ||
| 7 | #define RGB_DI_PIN E2 | ||
| 8 | #define RGBLED_NUM 13 | ||
| 9 | #define RGBLIGHT_HUE_STEP 8 | ||
| 10 | #define RGBLIGHT_SAT_STEP 8 | ||
| 11 | #define RGBLIGHT_VAL_STEP 8 | ||
| 12 | #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | ||
| 13 | #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
| 14 | /*== all animations enable ==*/ | ||
| 15 | #define RGBLIGHT_ANIMATIONS | ||
| 16 | // /*== or choose animations ==*/ | ||
| 17 | // #define RGBLIGHT_EFFECT_BREATHING | ||
| 18 | // #define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
| 19 | // #define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
| 20 | // #define RGBLIGHT_EFFECT_SNAKE | ||
| 21 | // #define RGBLIGHT_EFFECT_KNIGHT | ||
| 22 | // #define RGBLIGHT_EFFECT_CHRISTMAS | ||
| 23 | // #define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
| 24 | // #define RGBLIGHT_EFFECT_RGB_TEST | ||
| 25 | // #define RGBLIGHT_EFFECT_ALTERNATING | ||
| 26 | #endif | ||
| 27 | |||
| 28 | //rgb matrix setting// This is a 7-bit address, that gets left-shifted and bit 0 | ||
| 29 | // set to 0 for write, 1 for read (as per I2C protocol) | ||
| 30 | // The address will vary depending on your wiring: | ||
| 31 | // 0b1110100 AD <-> GND | ||
| 32 | // 0b1110111 AD <-> VCC | ||
| 33 | // 0b1110101 AD <-> SCL | ||
| 34 | // 0b1110110 AD <-> SDA | ||
| 35 | #define DRIVER_ADDR_1 0b1110110 | ||
| 36 | #define DRIVER_ADDR_2 0b1110100 | ||
| 37 | #define DRIVER_COUNT 1 | ||
| 38 | #define DRIVER_1_LED_TOTAL 25 | ||
| 39 | #define DRIVER_2_LED_TOTAL 0 | ||
| 40 | #define DRIVER_LED_TOTAL 25 | ||
| 41 | #define RGB_MATRIX_KEYPRESSES // reacts to keypresses | ||
| 42 | #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) | ||
| 43 | #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects | ||
| 44 | #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended | ||
| 45 | #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) | ||
| 46 | #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 | ||
| 47 | #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set | ||
diff --git a/keyboards/mechlovin/delphine/rgb_led/rgb_led.c b/keyboards/mechlovin/delphine/rgb_led/rgb_led.c new file mode 100644 index 000000000..6f3e3ec73 --- /dev/null +++ b/keyboards/mechlovin/delphine/rgb_led/rgb_led.c | |||
| @@ -0,0 +1,160 @@ | |||
| 1 | /* Copyright 2020 Team Mechlovin' | ||
| 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 "rgb_led.h" | ||
| 18 | |||
| 19 | |||
| 20 | #ifdef RGB_MATRIX_ENABLE | ||
| 21 | const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | ||
| 22 | // left CA | ||
| 23 | {0, C5_2, C6_2, C7_2}, //D2-0 | ||
| 24 | {0, C1_1, C3_2, C4_2}, //D20-1 | ||
| 25 | {0, C5_1, C6_1, C7_1}, //D36-2 | ||
| 26 | {0, C2_1, C3_1, C4_1}, //D46-3 | ||
| 27 | {0, C5_4, C6_4, C7_4}, //D65-4 | ||
| 28 | {0, C1_3, C2_3, C3_3}, //D26-5 | ||
| 29 | {0, C5_3, C6_3, C7_3}, //D37-6 | ||
| 30 | {0, C1_2, C2_2, C4_3}, //D47-7 | ||
| 31 | {0, C4_5, C5_5, C7_6}, //D11-8 | ||
| 32 | {0, C1_5, C2_5, C3_5}, //D27-9 | ||
| 33 | {0, C4_4, C6_5, C7_5}, //D38-10 | ||
| 34 | {0, C1_4, C2_4, C3_4}, //D48-11 | ||
| 35 | |||
| 36 | // left CB | ||
| 37 | {0, C2_9, C3_9, C4_9}, //D17-12 | ||
| 38 | {0, C5_9, C6_9, C7_9}, //D28-13 | ||
| 39 | {0, C1_9, C3_10, C4_10}, //D39-14 | ||
| 40 | {0, C5_10, C6_10, C7_10}, //D49-15 | ||
| 41 | {0, C1_10, C2_10, C4_11}, //D18-16 | ||
| 42 | {0, C5_11, C6_11, C7_11}, //D29-17 | ||
| 43 | {0, C1_11, C2_11, C3_11}, //D40-18 | ||
| 44 | {0, C5_12, C6_12, C7_12}, //D50-19 | ||
| 45 | {0, C1_12, C2_12, C3_12}, //D19-20 | ||
| 46 | {0, C1_13, C2_13, C3_13}, //D61-21 | ||
| 47 | {0, C4_13, C5_13, C7_14}, //D35-22 | ||
| 48 | {0, C1_14, C2_14, C3_14}, //D41-23 | ||
| 49 | {0, C4_14, C5_14, C6_14}, //D51-24 | ||
| 50 | }; | ||
| 51 | |||
| 52 | led_config_t g_led_config = { { | ||
| 53 | // Key Matrix to LED Index | ||
| 54 | {0, 1, 2, 3}, | ||
| 55 | {4, 5, 6, 7}, | ||
| 56 | {8, 9, 10, 11}, | ||
| 57 | {12, 13, 14, 15}, | ||
| 58 | {16, 17, 18, 19}, | ||
| 59 | {20, 22, 23, 24} | ||
| 60 | }, | ||
| 61 | { | ||
| 62 | //LED Index to Physical Positon | ||
| 63 | { 0, 0}, { 75, 0}, {149, 0}, {224, 0}, | ||
| 64 | { 0, 13}, { 75, 13}, {149, 13}, {224, 13}, | ||
| 65 | { 0, 25}, { 75, 25}, {149, 25}, {224, 25}, | ||
| 66 | { 0, 38}, { 75, 38}, {149, 38}, {224, 38}, | ||
| 67 | { 0, 51}, { 75, 51}, {149, 51}, {224, 51}, | ||
| 68 | { 0, 64}, { 37, 64}, { 75, 64}, {149, 64}, {224, 64}, | ||
| 69 | }, { | ||
| 70 | 4, 4, 4, 4, | ||
| 71 | 4, 1, 1, 4, | ||
| 72 | 4, 1, 1, 4, | ||
| 73 | 4, 1, 1, 4, | ||
| 74 | 4, 1, 1, 4, | ||
| 75 | 4, 0, 1, 1, 4, | ||
| 76 | } }; | ||
| 77 | |||
| 78 | void rgb_matrix_indicators_kb(void) { | ||
| 79 | if (host_keyboard_led_state().num_lock) { | ||
| 80 | rgb_matrix_set_color(4, 255, 255, 255); | ||
| 81 | } | ||
| 82 | } | ||
| 83 | |||
| 84 | __attribute__((weak)) | ||
| 85 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
| 86 | // if on layer 1, turn on L1 LED, otherwise off. | ||
| 87 | if (get_highest_layer(state) == 0) { | ||
| 88 | rgb_matrix_set_color(1, 255, 0, 0); | ||
| 89 | } else { | ||
| 90 | rgb_matrix_set_color(1, 0, 0, 0); | ||
| 91 | } | ||
| 92 | // if on layer 2, turn on L2 LED, otherwise off. | ||
| 93 | if (get_highest_layer(state) == 1) { | ||
| 94 | rgb_matrix_set_color(0, 255, 0, 0); | ||
| 95 | } else { | ||
| 96 | rgb_matrix_set_color(0, 0, 0, 0); | ||
| 97 | } | ||
| 98 | |||
| 99 | // if on layer 3, turn on L3 LED, otherwise off. | ||
| 100 | if (get_highest_layer(state) == 2) { | ||
| 101 | rgb_matrix_set_color(3, 255, 0, 0); | ||
| 102 | } else { | ||
| 103 | rgb_matrix_set_color(3, 0, 0, 0); | ||
| 104 | } | ||
| 105 | |||
| 106 | // if on layer 4, turn on L4 LED, otherwise off. | ||
| 107 | if (get_highest_layer(state) == 3) { | ||
| 108 | rgb_matrix_set_color(2, 255, 0, 0); | ||
| 109 | } else { | ||
| 110 | rgb_matrix_set_color(2, 0, 0, 0); | ||
| 111 | } | ||
| 112 | |||
| 113 | return state; | ||
| 114 | } | ||
| 115 | |||
| 116 | #endif | ||
| 117 | |||
| 118 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
| 119 | if (!process_record_user(keycode, record)) { return false; } | ||
| 120 | |||
| 121 | if (record->event.pressed) { | ||
| 122 | switch(keycode) { | ||
| 123 | #ifdef RGB_MATRIX_ENABLE | ||
| 124 | case KC_F13: // toggle rgb matrix | ||
| 125 | rgb_matrix_toggle(); | ||
| 126 | return false; | ||
| 127 | case KC_F14: | ||
| 128 | rgb_matrix_step(); | ||
| 129 | return false; | ||
| 130 | case KC_F15: | ||
| 131 | rgb_matrix_increase_speed(); | ||
| 132 | return false; | ||
| 133 | case KC_F16: | ||
| 134 | rgb_matrix_decrease_speed(); | ||
| 135 | return false; | ||
| 136 | case KC_F17: | ||
| 137 | rgb_matrix_increase_hue(); | ||
| 138 | return false; | ||
| 139 | case KC_F18: | ||
| 140 | rgb_matrix_decrease_hue(); | ||
| 141 | return false; | ||
| 142 | case KC_F19: | ||
| 143 | rgb_matrix_increase_sat(); | ||
| 144 | return false; | ||
| 145 | case KC_F20: | ||
| 146 | rgb_matrix_decrease_sat(); | ||
| 147 | return false; | ||
| 148 | case KC_F21: | ||
| 149 | rgb_matrix_increase_val(); | ||
| 150 | return false; | ||
| 151 | case KC_F22: | ||
| 152 | rgb_matrix_decrease_val(); | ||
| 153 | return false; | ||
| 154 | #endif | ||
| 155 | default: | ||
| 156 | break; | ||
| 157 | } | ||
| 158 | } | ||
| 159 | return true; | ||
| 160 | } | ||
diff --git a/keyboards/mechlovin/delphine/rgb_led/rgb_led.h b/keyboards/mechlovin/delphine/rgb_led/rgb_led.h new file mode 100644 index 000000000..60d581734 --- /dev/null +++ b/keyboards/mechlovin/delphine/rgb_led/rgb_led.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | /* Copyright 2020 Team Mechlovin' | ||
| 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" | ||
diff --git a/keyboards/mechlovin/delphine/rgb_led/rules.mk b/keyboards/mechlovin/delphine/rgb_led/rules.mk new file mode 100644 index 000000000..853f740ce --- /dev/null +++ b/keyboards/mechlovin/delphine/rgb_led/rules.mk | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 2 | RGB_MATRIX_ENABLE = IS31FL3731 # Use RGB matrix | ||
diff --git a/keyboards/mechlovin/delphine/rules.mk b/keyboards/mechlovin/delphine/rules.mk new file mode 100644 index 000000000..217bb758b --- /dev/null +++ b/keyboards/mechlovin/delphine/rules.mk | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = atmel-dfu | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 11 | MOUSEKEY_ENABLE = yes # 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 | |||
| 24 | LAYOUTS = ortho_6x4 | ||
| 25 | DEFAULT_FOLDER = mechlovin/delphine/mono_led \ No newline at end of file | ||
