1
0
Fork 0
forked from forks/qmk_firmware

[Keyboard] Refactor: add adelais rev.3 (#9496)

* Refactor: add adelais rev.3

* update

* Update keymap.c

* update

* update

* update
This commit is contained in:
mechlovin 2020-06-29 15:19:09 +07:00 committed by GitHub
parent 4e4a3449a7
commit e9e6054ee7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 73 additions and 8 deletions

View file

@ -30,3 +30,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
};
#ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
}
else if (index == 1) {
if (clockwise) {
tap_code(KC_LEFT);
} else {
tap_code(KC_RGHT);
}
}
else if (index == 2) {
if (clockwise) {
tap_code(KC_UP);
} else {
tap_code(KC_DOWN);
}
}
}
#endif

View file

@ -42,3 +42,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
};
#ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
}
else if (index == 1) {
if (clockwise) {
tap_code(KC_LEFT);
} else {
tap_code(KC_RGHT);
}
}
else if (index == 2) {
if (clockwise) {
tap_code(KC_UP);
} else {
tap_code(KC_DOWN);
}
}
}
#endif

View file

@ -3,7 +3,7 @@
![adelais](https://i.imgur.com/6U1IfZe.png)
Compatible with TGR Alice and all clone variants.
`standard_led` (Adelais) comes with backlight and RGB underglow LEDs pre-soldered.
`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.
`rgb_led` (Adelais En Ciel) comes with per-key RGB LEDs pre-soldered.
* Keyboard Maintainer: [Team Mechlovin'](https://github.com/mechlovin)

View file

@ -20,4 +20,4 @@ AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
DEFAULT_FOLDER = mechlovin/adelais/standard_led
DEFAULT_FOLDER = mechlovin/adelais/standard_led/rev2

View file

@ -1,6 +1,5 @@
#pragma once
#define PRODUCT_ID 0xAD01
#define PRODUCT Adelais
#define DESCRIPTION Team.Mechlovin Adelais

View file

@ -0,0 +1,3 @@
#pragma once
#define PRODUCT_ID 0xAD01

View file

@ -0,0 +1,8 @@
#pragma once
#define PRODUCT_ID 0xAD02
#define ENCODERS_PAD_A { A6, A4, B7 }
#define ENCODERS_PAD_B { A5, A3, B6 }
#define ENCODER_RESOLUTION 4

View file

@ -0,0 +1 @@
ENCODER_ENABLE = yes

View file

@ -1,3 +1,3 @@
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
BACKLIGHT_DRIVER = pwm
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
DEFAULT_FOLDER = mechlovin/adelais/standard_led/rev2