mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-27 11:31:13 +00:00
incorporating changes from drashna
This commit is contained in:
parent
819028dd28
commit
e4ae5ef3f2
@ -111,4 +111,4 @@ bool cmk_cmk6646_housekeeping_task(void) {
|
|||||||
update_usb_audio_enable();
|
update_usb_audio_enable();
|
||||||
// Return value is enabled state of the CM6646
|
// Return value is enabled state of the CM6646
|
||||||
return cm6646_enabled;
|
return cm6646_enabled;
|
||||||
}
|
}
|
||||||
|
@ -42,4 +42,4 @@ enum cmk_cm6646_keycodes {
|
|||||||
|
|
||||||
void process_record_cmk_cm6646(uint16_t keycode, keyrecord_t *record);
|
void process_record_cmk_cm6646(uint16_t keycode, keyrecord_t *record);
|
||||||
void cmk_cmk6646_init(bool enabled);
|
void cmk_cmk6646_init(bool enabled);
|
||||||
bool cmk_cmk6646_housekeeping_task(void);
|
bool cmk_cmk6646_housekeeping_task(void);
|
||||||
|
@ -45,4 +45,4 @@
|
|||||||
#define MIC_MUTE_CONTROL_PIN A0
|
#define MIC_MUTE_CONTROL_PIN A0
|
||||||
#define USB_AUDIO_ENABLE_PIN B6
|
#define USB_AUDIO_ENABLE_PIN B6
|
||||||
|
|
||||||
#define LED_PIN_ON_STATE 0
|
#define LED_PIN_ON_STATE 0
|
||||||
|
@ -2,19 +2,19 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "keyboards/custommk/cmk_cm6646.h"
|
#include "ergosentry_ansi.h"
|
||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
uint32_t raw;
|
uint32_t raw;
|
||||||
struct {
|
struct {
|
||||||
bool usb_audio_enabled;
|
bool usb_audio_enabled;
|
||||||
};
|
};
|
||||||
} user_config_t;
|
} keyboard_config_t;
|
||||||
|
|
||||||
user_config_t user_config;
|
keyboard_config_t keyboard_config;
|
||||||
|
|
||||||
void update_kb_eeprom(void) {
|
void update_kb_eeprom(void) {
|
||||||
eeconfig_update_kb(user_config.raw);
|
eeconfig_update_kb(keyboard_config.raw);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
@ -23,29 +23,30 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void keyboard_post_init_kb(void) {
|
void keyboard_post_init_kb(void) {
|
||||||
user_config.raw = eeconfig_read_kb();
|
keyboard_config.raw = eeconfig_read_kb();
|
||||||
cmk_cmk6646_init(user_config.usb_audio_enabled);
|
cmk_cmk6646_init(keyboard_config.usb_audio_enabled);
|
||||||
keyboard_post_init_user();
|
keyboard_post_init_user();
|
||||||
}
|
}
|
||||||
|
|
||||||
void housekeeping_task_kb(void) {
|
void housekeeping_task_kb(void) {
|
||||||
bool usb_audio_enabled;
|
bool usb_audio_enabled;
|
||||||
usb_audio_enabled = cmk_cmk6646_housekeeping_task();
|
usb_audio_enabled = cmk_cmk6646_housekeeping_task();
|
||||||
if (usb_audio_enabled != user_config.usb_audio_enabled) {
|
if (usb_audio_enabled != keyboard_config.usb_audio_enabled) {
|
||||||
user_config.usb_audio_enabled = usb_audio_enabled;
|
keyboard_config.usb_audio_enabled = usb_audio_enabled;
|
||||||
update_kb_eeprom();
|
update_kb_eeprom();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void eeconfig_init_kb() {
|
void eeconfig_init_kb(void) {
|
||||||
//enable nkro by default (not forced)
|
//enable nkro by default (not forced)
|
||||||
keymap_config.raw = eeconfig_read_keymap();
|
keymap_config.raw = eeconfig_read_keymap();
|
||||||
keymap_config.nkro = 1;
|
keymap_config.nkro = 1;
|
||||||
eeconfig_update_keymap(keymap_config.raw);
|
eeconfig_update_keymap(keymap_config.raw);
|
||||||
|
|
||||||
//enable audio by default (not forced)
|
//enable USB audio by default (not forced)
|
||||||
user_config.raw = eeconfig_read_kb();
|
keyboard_config.raw = eeconfig_read_kb();
|
||||||
user_config.usb_audio_enabled = 1;
|
keyboard_config.usb_audio_enabled = 1;
|
||||||
eeconfig_update_kb(user_config.raw);
|
eeconfig_update_kb(keyboard_config.raw);
|
||||||
|
|
||||||
}
|
eeconfig_init_user();
|
||||||
|
}
|
||||||
|
4
keyboards/custommk/ergosentry_ansi/ergosentry_ansi.h
Normal file
4
keyboards/custommk/ergosentry_ansi/ergosentry_ansi.h
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
// Copyright 2025 customMK
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include "keyboards/custommk/cmk_cm6646.h"
|
@ -22,8 +22,6 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"features": {
|
"features": {
|
||||||
"command": false,
|
|
||||||
"console": false,
|
|
||||||
"audio": true,
|
"audio": true,
|
||||||
"bootmagic": true,
|
"bootmagic": true,
|
||||||
"encoder": true,
|
"encoder": true,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
#include "cmk_cm6646.h"
|
#include "ergosentry_ansi.h"
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = LAYOUT(
|
[0] = LAYOUT(
|
||||||
@ -21,4 +21,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
||||||
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(RM_PREV, RM_NEXT), ENCODER_CCW_CW(RM_VALD, RM_VALU) }
|
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(RM_PREV, RM_NEXT), ENCODER_CCW_CW(RM_VALD, RM_VALU) }
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -1 +1 @@
|
|||||||
ENCODER_MAP_ENABLE = yes
|
ENCODER_MAP_ENABLE = yes
|
||||||
|
@ -19,4 +19,4 @@
|
|||||||
|
|
||||||
// Used for FRAM
|
// Used for FRAM
|
||||||
#undef STM32_SPI_USE_SPI1
|
#undef STM32_SPI_USE_SPI1
|
||||||
#define STM32_SPI_USE_SPI1 TRUE
|
#define STM32_SPI_USE_SPI1 TRUE
|
||||||
|
@ -2,4 +2,3 @@ SRC += matrix.c \
|
|||||||
keyboards/custommk/cmk_cm6646.c
|
keyboards/custommk/cmk_cm6646.c
|
||||||
|
|
||||||
CUSTOM_MATRIX = lite
|
CUSTOM_MATRIX = lite
|
||||||
CIE1931_CURVE = yes
|
|
Loading…
Reference in New Issue
Block a user