aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormechlovin <57231893+mechlovin@users.noreply.github.com>2020-06-29 15:19:09 +0700
committerGitHub <noreply@github.com>2020-06-29 01:19:09 -0700
commite9e6054ee7eaca4cbd8d1c7566f394559ea8770a (patch)
tree36218fbceaa591cb58e30dfa3d468f001ace120a
parent4e4a3449a731bce9f6893d18d884af365d0df407 (diff)
downloadqmk_firmware-e9e6054ee7eaca4cbd8d1c7566f394559ea8770a.tar.gz
qmk_firmware-e9e6054ee7eaca4cbd8d1c7566f394559ea8770a.zip
[Keyboard] Refactor: add adelais rev.3 (#9496)
* Refactor: add adelais rev.3 * update * Update keymap.c * update * update * update
-rw-r--r--keyboards/mechlovin/adelais/keymaps/default/keymap.c29
-rw-r--r--keyboards/mechlovin/adelais/keymaps/via/keymap.c29
-rw-r--r--keyboards/mechlovin/adelais/readme.md2
-rw-r--r--keyboards/mechlovin/adelais/rules.mk2
-rw-r--r--keyboards/mechlovin/adelais/standard_led/config.h1
-rw-r--r--keyboards/mechlovin/adelais/standard_led/rev2/config.h3
-rw-r--r--keyboards/mechlovin/adelais/standard_led/rev2/rules.mk0
-rw-r--r--keyboards/mechlovin/adelais/standard_led/rev3/config.h8
-rw-r--r--keyboards/mechlovin/adelais/standard_led/rev3/rules.mk1
-rw-r--r--keyboards/mechlovin/adelais/standard_led/rules.mk6
10 files changed, 73 insertions, 8 deletions
diff --git a/keyboards/mechlovin/adelais/keymaps/default/keymap.c b/keyboards/mechlovin/adelais/keymaps/default/keymap.c
index 7848a5709..19c298d4a 100644
--- a/keyboards/mechlovin/adelais/keymaps/default/keymap.c
+++ b/keyboards/mechlovin/adelais/keymaps/default/keymap.c
@@ -29,4 +29,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
29 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 29 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
30 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), 30 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
31 31
32}; \ No newline at end of file 32};
33
34#ifdef ENCODER_ENABLE
35void encoder_update_user(uint8_t index, bool clockwise) {
36 if (index == 0) {
37 if (clockwise) {
38 tap_code(KC_VOLU);
39 } else {
40 tap_code(KC_VOLD);
41 }
42 }
43 else if (index == 1) {
44 if (clockwise) {
45 tap_code(KC_LEFT);
46 } else {
47 tap_code(KC_RGHT);
48 }
49 }
50 else if (index == 2) {
51 if (clockwise) {
52 tap_code(KC_UP);
53 } else {
54 tap_code(KC_DOWN);
55 }
56 }
57}
58
59 #endif \ No newline at end of file
diff --git a/keyboards/mechlovin/adelais/keymaps/via/keymap.c b/keyboards/mechlovin/adelais/keymaps/via/keymap.c
index 03636d02b..d44a4e938 100644
--- a/keyboards/mechlovin/adelais/keymaps/via/keymap.c
+++ b/keyboards/mechlovin/adelais/keymaps/via/keymap.c
@@ -41,4 +41,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
41 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 41 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
42 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), 42 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
43 43
44}; \ No newline at end of file 44};
45
46#ifdef ENCODER_ENABLE
47void encoder_update_user(uint8_t index, bool clockwise) {
48 if (index == 0) {
49 if (clockwise) {
50 tap_code(KC_VOLU);
51 } else {
52 tap_code(KC_VOLD);
53 }
54 }
55 else if (index == 1) {
56 if (clockwise) {
57 tap_code(KC_LEFT);
58 } else {
59 tap_code(KC_RGHT);
60 }
61 }
62 else if (index == 2) {
63 if (clockwise) {
64 tap_code(KC_UP);
65 } else {
66 tap_code(KC_DOWN);
67 }
68 }
69}
70
71 #endif \ No newline at end of file
diff --git a/keyboards/mechlovin/adelais/readme.md b/keyboards/mechlovin/adelais/readme.md
index 947d5a31d..f8b3b47ff 100644
--- a/keyboards/mechlovin/adelais/readme.md
+++ b/keyboards/mechlovin/adelais/readme.md
@@ -3,7 +3,7 @@
3![adelais](https://i.imgur.com/6U1IfZe.png) 3![adelais](https://i.imgur.com/6U1IfZe.png)
4 4
5Compatible with TGR Alice and all clone variants. 5Compatible with TGR Alice and all clone variants.
6`standard_led` (Adelais) comes with backlight and RGB underglow LEDs pre-soldered. 6`standard_led` (Adelais) comes with backlight and RGB underglow LEDs pre-soldered. Adelais rev.3 support 3 rotary encoder, USB TypeC both side and reset button.
7`rgb_led` (Adelais En Ciel) comes with per-key RGB LEDs pre-soldered. 7`rgb_led` (Adelais En Ciel) comes with per-key RGB LEDs pre-soldered.
8 8
9* Keyboard Maintainer: [Team Mechlovin'](https://github.com/mechlovin) 9* Keyboard Maintainer: [Team Mechlovin'](https://github.com/mechlovin)
diff --git a/keyboards/mechlovin/adelais/rules.mk b/keyboards/mechlovin/adelais/rules.mk
index 91f87e5f3..75b9b6d28 100644
--- a/keyboards/mechlovin/adelais/rules.mk
+++ b/keyboards/mechlovin/adelais/rules.mk
@@ -20,4 +20,4 @@ AUDIO_ENABLE = no # Audio output on port C6
20FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches 20FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
21HD44780_ENABLE = no # Enable support for HD44780 based LCDs 21HD44780_ENABLE = no # Enable support for HD44780 based LCDs
22 22
23DEFAULT_FOLDER = mechlovin/adelais/standard_led \ No newline at end of file 23DEFAULT_FOLDER = mechlovin/adelais/standard_led/rev2 \ No newline at end of file
diff --git a/keyboards/mechlovin/adelais/standard_led/config.h b/keyboards/mechlovin/adelais/standard_led/config.h
index 0de6cc6b4..6a008e2f3 100644
--- a/keyboards/mechlovin/adelais/standard_led/config.h
+++ b/keyboards/mechlovin/adelais/standard_led/config.h
@@ -1,6 +1,5 @@
1#pragma once 1#pragma once
2 2
3#define PRODUCT_ID 0xAD01
4#define PRODUCT Adelais 3#define PRODUCT Adelais
5#define DESCRIPTION Team.Mechlovin Adelais 4#define DESCRIPTION Team.Mechlovin Adelais
6 5
diff --git a/keyboards/mechlovin/adelais/standard_led/rev2/config.h b/keyboards/mechlovin/adelais/standard_led/rev2/config.h
new file mode 100644
index 000000000..7c2c63ea2
--- /dev/null
+++ b/keyboards/mechlovin/adelais/standard_led/rev2/config.h
@@ -0,0 +1,3 @@
1#pragma once
2
3#define PRODUCT_ID 0xAD01 \ No newline at end of file
diff --git a/keyboards/mechlovin/adelais/standard_led/rev2/rules.mk b/keyboards/mechlovin/adelais/standard_led/rev2/rules.mk
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/keyboards/mechlovin/adelais/standard_led/rev2/rules.mk
diff --git a/keyboards/mechlovin/adelais/standard_led/rev3/config.h b/keyboards/mechlovin/adelais/standard_led/rev3/config.h
new file mode 100644
index 000000000..60e288296
--- /dev/null
+++ b/keyboards/mechlovin/adelais/standard_led/rev3/config.h
@@ -0,0 +1,8 @@
1#pragma once
2
3#define PRODUCT_ID 0xAD02
4
5#define ENCODERS_PAD_A { A6, A4, B7 }
6#define ENCODERS_PAD_B { A5, A3, B6 }
7#define ENCODER_RESOLUTION 4
8
diff --git a/keyboards/mechlovin/adelais/standard_led/rev3/rules.mk b/keyboards/mechlovin/adelais/standard_led/rev3/rules.mk
new file mode 100644
index 000000000..5af1ba853
--- /dev/null
+++ b/keyboards/mechlovin/adelais/standard_led/rev3/rules.mk
@@ -0,0 +1 @@
ENCODER_ENABLE = yes
diff --git a/keyboards/mechlovin/adelais/standard_led/rules.mk b/keyboards/mechlovin/adelais/standard_led/rules.mk
index 4ddc35240..34de30aa9 100644
--- a/keyboards/mechlovin/adelais/standard_led/rules.mk
+++ b/keyboards/mechlovin/adelais/standard_led/rules.mk
@@ -1,3 +1,3 @@
1BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality 1
2BACKLIGHT_DRIVER = pwm 2
3RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow \ No newline at end of file 3DEFAULT_FOLDER = mechlovin/adelais/standard_led/rev2 \ No newline at end of file