Merge pull request #162 from lalalademaxiya1/k11_pro_encoder_fixed
k11 pro encoder fixed
This commit is contained in:
commit
41f7e6ddcb
14 changed files with 41 additions and 22 deletions
|
|
@ -135,8 +135,8 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(KC_BLUETOOTH_ENABLE) && defined(ENCODER_ENBALE)
|
#if defined(ENCODER_ENABLE)
|
||||||
static void encoder0_pad_cb(void *param) {
|
static void encoder_pad_cb(void *param) {
|
||||||
encoder_inerrupt_read((uint32_t)param & 0xFF);
|
encoder_inerrupt_read((uint32_t)param & 0xFF);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -156,16 +156,16 @@ void keyboard_post_init_kb(void) {
|
||||||
|
|
||||||
ckbt51_init(false);
|
ckbt51_init(false);
|
||||||
bluetooth_init();
|
bluetooth_init();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENCODER_ENBALE
|
|
||||||
|
#ifdef ENCODER_ENABLE
|
||||||
pin_t encoders_pad_a[NUM_ENCODERS] = ENCODERS_PAD_A;
|
pin_t encoders_pad_a[NUM_ENCODERS] = ENCODERS_PAD_A;
|
||||||
pin_t encoders_pad_b[NUM_ENCODERS] = ENCODERS_PAD_B;
|
pin_t encoders_pad_b[NUM_ENCODERS] = ENCODERS_PAD_B;
|
||||||
for (uint8_t i = 0; i < NUM_ENCODERS; i++) {
|
for (uint32_t i = 0; i < NUM_ENCODERS; i++) {
|
||||||
palEnableLineEvent(encoders_pad_a[i], PAL_EVENT_MODE_BOTH_EDGES);
|
palEnableLineEvent(encoders_pad_a[i], PAL_EVENT_MODE_BOTH_EDGES);
|
||||||
palEnableLineEvent(encoders_pad_b[i], PAL_EVENT_MODE_BOTH_EDGES);
|
palEnableLineEvent(encoders_pad_b[i], PAL_EVENT_MODE_BOTH_EDGES);
|
||||||
palSetLineCallback(encoders_pad_a[i], encoder_pad_cb, &i);
|
palSetLineCallback(encoders_pad_a[i], encoder_pad_cb, (void *)i);
|
||||||
palSetLineCallback(encoders_pad_b[i], encoder_pad_cb, &i);
|
palSetLineCallback(encoders_pad_b[i], encoder_pad_cb, (void *)i);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"usb": {
|
"usb": {
|
||||||
"pid": "0x0211",
|
"pid": "0x0211",
|
||||||
"device_version": "1.0.1"
|
"device_version": "1.0.2"
|
||||||
},
|
},
|
||||||
"features": {
|
"features": {
|
||||||
"rgb_matrix": true
|
"rgb_matrix": true
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"usb": {
|
"usb": {
|
||||||
"pid": "0x0214",
|
"pid": "0x0214",
|
||||||
"device_version": "1.0.0"
|
"device_version": "1.0.1"
|
||||||
},
|
},
|
||||||
"features": {
|
"features": {
|
||||||
"led_matrix": true
|
"led_matrix": true
|
||||||
|
|
|
||||||
|
|
@ -317,3 +317,9 @@ void raw_hid_receive(uint8_t *data, uint8_t length) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void suspend_wakeup_init_kb(void) {
|
||||||
|
// code will run on keyboard wakeup
|
||||||
|
clear_keyboard();
|
||||||
|
send_keyboard_report();
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,8 @@
|
||||||
# define DRIVER_COUNT 2
|
# define DRIVER_COUNT 2
|
||||||
# define DRIVER_ADDR_1 0b1110111
|
# define DRIVER_ADDR_1 0b1110111
|
||||||
# define DRIVER_ADDR_2 0b1110100
|
# define DRIVER_ADDR_2 0b1110100
|
||||||
|
|
||||||
|
/* RGB Matrix Configuration */
|
||||||
# define DRIVER_1_LED_TOTAL 29
|
# define DRIVER_1_LED_TOTAL 29
|
||||||
# define DRIVER_2_LED_TOTAL 39
|
# define DRIVER_2_LED_TOTAL 39
|
||||||
# define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
|
# define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
ENCODER_MAP_ENABLE = yes
|
ENCODER_MAP_ENABLE = yes
|
||||||
OPT_DEFS += -DDYNAMIC_KEYMAP_LAYER_COUNT=5
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,2 @@
|
||||||
VIA_ENABLE = yes
|
VIA_ENABLE = yes
|
||||||
ENCODER_MAP_ENABLE = yes
|
ENCODER_MAP_ENABLE = yes
|
||||||
OPT_DEFS += -DDYNAMIC_KEYMAP_LAYER_COUNT=5
|
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,11 @@
|
||||||
|
|
||||||
#define HAL_USE_I2C TRUE
|
#define HAL_USE_I2C TRUE
|
||||||
|
|
||||||
#ifdef KC_BLUETOOTH_ENABLE
|
#if defined(ENCODER_ENBALE) || defined(KC_BLUETOOTH_ENABLE)
|
||||||
# define PAL_USE_CALLBACKS TRUE
|
# define PAL_USE_CALLBACKS TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef KC_BLUETOOTH_ENABLE
|
||||||
# define HAL_USE_SERIAL TRUE
|
# define HAL_USE_SERIAL TRUE
|
||||||
# define HAL_USE_RTC TRUE
|
# define HAL_USE_RTC TRUE
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -57,5 +57,8 @@
|
||||||
"rotary": [
|
"rotary": [
|
||||||
{"pin_a": "A0", "pin_b": "A10"}
|
{"pin_a": "A0", "pin_b": "A10"}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"dynamic_keymap": {
|
||||||
|
"layer_count": 5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,8 @@
|
||||||
# define DRIVER_COUNT 2
|
# define DRIVER_COUNT 2
|
||||||
# define DRIVER_ADDR_1 0b1110111
|
# define DRIVER_ADDR_1 0b1110111
|
||||||
# define DRIVER_ADDR_2 0b1110100
|
# define DRIVER_ADDR_2 0b1110100
|
||||||
|
|
||||||
|
/* RGB Matrix Configuration */
|
||||||
# define DRIVER_1_LED_TOTAL 29
|
# define DRIVER_1_LED_TOTAL 29
|
||||||
# define DRIVER_2_LED_TOTAL 40
|
# define DRIVER_2_LED_TOTAL 40
|
||||||
# define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
|
# define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,2 @@
|
||||||
VIA_ENABLE = yes
|
VIA_ENABLE = yes
|
||||||
ENCODER_MAP_ENABLE = yes
|
ENCODER_MAP_ENABLE = yes
|
||||||
OPT_DEFS += -DDYNAMIC_KEYMAP_LAYER_COUNT=5
|
|
||||||
|
|
|
||||||
|
|
@ -134,9 +134,9 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(KC_BLUETOOTH_ENABLE) && defined(ENCODER_ENABLE)
|
#if defined(ENCODER_ENABLE)
|
||||||
static void encoder_pad_cb(void *param) {
|
static void encoder_pad_cb(void *param) {
|
||||||
encoder_inerrupt_read((uint32_t)param & 0XFF);
|
encoder_inerrupt_read((uint32_t)param & 0xFF);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -156,8 +156,9 @@ void keyboard_post_init_kb(void) {
|
||||||
|
|
||||||
ckbt51_init(false);
|
ckbt51_init(false);
|
||||||
bluetooth_init();
|
bluetooth_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
# ifdef ENCODER_ENABLE
|
#ifdef ENCODER_ENABLE
|
||||||
pin_t encoders_pad_a[NUM_ENCODERS] = ENCODERS_PAD_A;
|
pin_t encoders_pad_a[NUM_ENCODERS] = ENCODERS_PAD_A;
|
||||||
pin_t encoders_pad_b[NUM_ENCODERS] = ENCODERS_PAD_B;
|
pin_t encoders_pad_b[NUM_ENCODERS] = ENCODERS_PAD_B;
|
||||||
for (uint32_t i = 0; i < NUM_ENCODERS; i++) {
|
for (uint32_t i = 0; i < NUM_ENCODERS; i++) {
|
||||||
|
|
@ -166,7 +167,6 @@ void keyboard_post_init_kb(void) {
|
||||||
palSetLineCallback(encoders_pad_a[i], encoder_pad_cb, (void *)i);
|
palSetLineCallback(encoders_pad_a[i], encoder_pad_cb, (void *)i);
|
||||||
palSetLineCallback(encoders_pad_b[i], encoder_pad_cb, (void *)i);
|
palSetLineCallback(encoders_pad_b[i], encoder_pad_cb, (void *)i);
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
keyboard_post_init_user();
|
keyboard_post_init_user();
|
||||||
|
|
@ -312,3 +312,9 @@ void raw_hid_receive(uint8_t *data, uint8_t length) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void suspend_wakeup_init_kb(void) {
|
||||||
|
// code will run on keyboard wakeup
|
||||||
|
clear_keyboard();
|
||||||
|
send_keyboard_report();
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
# Keychron Q8 Pro
|
# Keychron Q8 Pro
|
||||||
|
|
||||||
![Keychron Q8 Pro]
|

|
||||||
|
|
||||||
A customizable 65% Alice keyboard.
|
A customizable 65% Alice keyboard.
|
||||||
|
|
||||||
* Keyboard Maintainer: [Keychron](https://github.com/keychron)
|
* Keyboard Maintainer: [Keychron](https://github.com/keychron)
|
||||||
* Hardware Supported: Keychron Q8 Pro
|
* Hardware Supported: Keychron Q8 Pro
|
||||||
* Hardware Availability:
|
* Hardware Availability:[Keychron Q8 Pro (Alice Layout) QMK/VIA Wireless Custom Mechanical Keyboard](https://www.keychron.com/products/keychron-q8-pro-alice-layout-qmk-via-wireless-custom-mechanical-keyboard)
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -137,15 +137,15 @@
|
||||||
"1,11",
|
"1,11",
|
||||||
"1,12",
|
"1,12",
|
||||||
{
|
{
|
||||||
"w": 1.5
|
"w": 1.5,
|
||||||
|
"c": "#aaaaaa"
|
||||||
},
|
},
|
||||||
"1,13"
|
"1,13"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"y": -0.9,
|
"y": -0.9,
|
||||||
"x": 17.3,
|
"x": 17.3
|
||||||
"c": "#aaaaaa"
|
|
||||||
},
|
},
|
||||||
"1,14"
|
"1,14"
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue