mirror of
https://github.com/carlosedp/qmk_firmware.git
synced 2026-08-04 08:17:05 -04:00
Remove Epomaker Galaxy100 due to issues and no support for wireless
This commit is contained in:
@@ -1,72 +0,0 @@
|
||||
// Copyright 2024 Epomaker (@Epomaker)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#define USB_POWER_EN_PIN B1 // USB ENABLE pin
|
||||
#define LED_POWER_EN_PIN A5 // LED ENABLE pin
|
||||
#define HS_BAT_CABLE_PIN A7 // USB insertion detection pin
|
||||
#define HS_LED_BOOSTING_PIN D2 // LED BOOSTING
|
||||
|
||||
#define BAT_FULL_PIN A15
|
||||
#define BAT_FULL_STATE 1
|
||||
|
||||
#define HS_RGB_INDICATOR_COUNT 99
|
||||
#define HS_RGB_BAT_COUNT 1
|
||||
|
||||
/* Status Indicator Lamp */
|
||||
|
||||
#define HS_RGB_INDEX_CAPS 47
|
||||
#define HS_RGB_INDEX_WIN_LOCK 70
|
||||
#define HS_RGB_BLINK_INDEX_VAI 5
|
||||
#define HS_RGB_BLINK_INDEX_VAD 6
|
||||
#define HS_RGB_BLINK_INDEX_SPI 7
|
||||
#define HS_RGB_BLINK_INDEX_SPD 26
|
||||
|
||||
#define HS_RGB_BLINK_INDEX_WIN 46
|
||||
#define HS_RGB_BLINK_INDEX_MAC 45
|
||||
|
||||
/* UART */
|
||||
#define SERIAL_DRIVER SD1
|
||||
#define SD1_TX_PIN C10
|
||||
#define SD1_RX_PIN C11
|
||||
|
||||
/* UART for wireless module */
|
||||
#define UART_RX_PIN C11
|
||||
#define UART_RX_PAL_MODE 7
|
||||
#define UART_TX_PIN C10
|
||||
#define UART_TX_PAL_MODE 7
|
||||
|
||||
/* Encoder */
|
||||
#define ENCODER_MAP_KEY_DELAY 1
|
||||
|
||||
/* SPI */
|
||||
#define SPI_DRIVER SPIDQ
|
||||
#define SPI_SCK_PIN B3
|
||||
#define SPI_MOSI_PIN B5
|
||||
#define SPI_MISO_PIN B4
|
||||
|
||||
/* Flash */
|
||||
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
|
||||
#define WEAR_LEVELING_LOGICAL_SIZE (WEAR_LEVELING_BACKING_SIZE / 2)
|
||||
|
||||
/* RGB Matrix */
|
||||
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||
#define RGB_MATRIX_KEYPRESSES
|
||||
|
||||
/* WS2812 */
|
||||
#define WS2812_SPI_DRIVER SPIDM2
|
||||
#define WS2812_SPI_DIVISOR 32
|
||||
|
||||
/* Matrix size */
|
||||
#define MATRIX_ROWS 6
|
||||
#define MATRIX_COLS 19
|
||||
|
||||
/* rgb_record */
|
||||
#define RGBREC_CHANNEL_NUM 1
|
||||
#define ENABLE_RGB_MATRIX_RGBR_PLAY
|
||||
#define EECONFIG_CONFINFO_USE_SIZE (4 + 16)
|
||||
#define EECONFIG_RGBREC_USE_SIZE (RGBREC_CHANNEL_NUM * MATRIX_ROWS * MATRIX_COLS * 2)
|
||||
#define EECONFIG_USER_DATA_SIZE (EECONFIG_RGBREC_USE_SIZE + EECONFIG_CONFINFO_USE_SIZE)
|
||||
#define RGBREC_EECONFIG_ADDR (uint8_t *)(EECONFIG_USER_DATABLOCK)
|
||||
#define CONFINFO_EECONFIG_ADDR (uint32_t *)((uint32_t)RGBREC_EECONFIG_ADDR + (uint32_t)EECONFIG_RGBREC_USE_SIZE)
|
||||
@@ -1,853 +0,0 @@
|
||||
// Copyright 2024 Epomaker (@Epomaker)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "rgb_record/rgb_record.h"
|
||||
|
||||
typedef union {
|
||||
uint32_t raw;
|
||||
struct {
|
||||
uint8_t flag : 1;
|
||||
uint8_t devs : 3;
|
||||
uint8_t record_channel : 4;
|
||||
uint8_t record_last_mode;
|
||||
uint8_t last_btdevs : 3;
|
||||
};
|
||||
} confinfo_t;
|
||||
confinfo_t confinfo;
|
||||
|
||||
typedef struct {
|
||||
bool active;
|
||||
uint32_t timer;
|
||||
uint32_t interval;
|
||||
uint32_t times;
|
||||
uint8_t index;
|
||||
RGB rgb;
|
||||
void (*blink_cb)(uint8_t);
|
||||
} hs_rgb_indicator_t;
|
||||
|
||||
enum layers {
|
||||
_BL = 0,
|
||||
_FL,
|
||||
_MBL,
|
||||
_MFL,
|
||||
_FBL,
|
||||
};
|
||||
|
||||
hs_rgb_indicator_t hs_rgb_indicators[HS_RGB_INDICATOR_COUNT];
|
||||
hs_rgb_indicator_t hs_rgb_bat[HS_RGB_BAT_COUNT];
|
||||
|
||||
void rgb_blink_dir(void);
|
||||
void hs_reset_settings(void);
|
||||
void rgb_matrix_hs_indicator(void);
|
||||
void rgb_matrix_hs_indicator_set(uint8_t index, RGB rgb, uint32_t interval, uint8_t times);
|
||||
void rgb_matrix_hs_set_remain_time(uint8_t index, uint8_t remain_time);
|
||||
|
||||
#define keymap_is_mac_system() ((get_highest_layer(default_layer_state) == _MBL) || (get_highest_layer(default_layer_state) == _MFL))
|
||||
#define keymap_is_base_layer() ((get_highest_layer(default_layer_state) == _BL) || (get_highest_layer(default_layer_state) == _FL))
|
||||
|
||||
uint32_t post_init_timer = 0x00;
|
||||
bool inqbat_flag = false;
|
||||
bool mac_status = false;
|
||||
bool charging_state = false;
|
||||
bool bat_full_flag = false;
|
||||
bool enable_bat_indicators = true;
|
||||
uint32_t bat_indicator_cnt = true;
|
||||
static uint32_t ee_clr_timer = 0;
|
||||
static uint32_t rec_time;
|
||||
static bool rec_filp;
|
||||
bool test_white_light_flag = false;
|
||||
HSV start_hsv;
|
||||
bool no_record_fg;
|
||||
bool lower_sleep = false;
|
||||
uint8_t buff[] = {14, 8, 2, 1, 1, 1, 1, 1, 1, 1, 0};
|
||||
|
||||
void eeconfig_confinfo_update(uint32_t raw) {
|
||||
|
||||
eeconfig_update_kb(raw);
|
||||
}
|
||||
|
||||
uint32_t eeconfig_confinfo_read(void) {
|
||||
|
||||
return eeconfig_read_kb();
|
||||
}
|
||||
|
||||
void eeconfig_confinfo_default(void) {
|
||||
|
||||
confinfo.flag = true;
|
||||
confinfo.record_channel = 0;
|
||||
confinfo.record_last_mode = 0xff;
|
||||
confinfo.last_btdevs = 1;
|
||||
|
||||
// #ifdef WIRELESS_ENABLE
|
||||
// confinfo.devs = DEVS_USB;
|
||||
// #endif
|
||||
|
||||
eeconfig_init_user_datablock();
|
||||
eeconfig_confinfo_update(confinfo.raw);
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_mode(buff[0]);
|
||||
#endif
|
||||
}
|
||||
|
||||
void eeconfig_confinfo_init(void) {
|
||||
|
||||
confinfo.raw = eeconfig_confinfo_read();
|
||||
if (!confinfo.raw) {
|
||||
eeconfig_confinfo_default();
|
||||
}
|
||||
}
|
||||
|
||||
void keyboard_post_init_kb(void) {
|
||||
|
||||
#ifdef CONSOLE_ENABLE
|
||||
debug_enable = true;
|
||||
#endif
|
||||
|
||||
eeconfig_confinfo_init();
|
||||
|
||||
#ifdef LED_POWER_EN_PIN
|
||||
gpio_set_pin_output(LED_POWER_EN_PIN);
|
||||
gpio_write_pin_high(LED_POWER_EN_PIN);
|
||||
gpio_set_pin_output(A9);
|
||||
gpio_write_pin_high(A9);
|
||||
|
||||
gpio_set_pin_output(HS_LED_BOOSTING_PIN);
|
||||
gpio_write_pin_high(HS_LED_BOOSTING_PIN);
|
||||
#endif
|
||||
|
||||
#ifdef MM_BT_DEF_PIN
|
||||
setPinInputHigh(MM_BT_DEF_PIN);
|
||||
#endif
|
||||
|
||||
#ifdef MM_2G4_DEF_PIN
|
||||
setPinInputHigh(MM_2G4_DEF_PIN);
|
||||
#endif
|
||||
|
||||
#ifdef USB_POWER_EN_PIN
|
||||
gpio_write_pin_low(USB_POWER_EN_PIN);
|
||||
gpio_set_pin_output(USB_POWER_EN_PIN);
|
||||
#endif
|
||||
|
||||
#ifdef HS_BAT_CABLE_PIN
|
||||
setPinInput(HS_BAT_CABLE_PIN);
|
||||
#endif
|
||||
|
||||
#ifdef BAT_FULL_PIN
|
||||
setPinInputHigh(BAT_FULL_PIN);
|
||||
#endif
|
||||
|
||||
#ifdef WIRELESS_ENABLE
|
||||
wireless_init();
|
||||
// wireless_devs_change(!confinfo.devs, confinfo.devs, false);
|
||||
post_init_timer = timer_read32();
|
||||
#endif
|
||||
|
||||
keyboard_post_init_user();
|
||||
|
||||
rgbrec_init(confinfo.record_channel);
|
||||
|
||||
start_hsv = rgb_matrix_get_hsv();
|
||||
}
|
||||
|
||||
#ifdef WIRELESS_ENABLE
|
||||
|
||||
void usb_power_connect(void) {
|
||||
|
||||
# ifdef USB_POWER_EN_PIN
|
||||
gpio_write_pin_low(USB_POWER_EN_PIN);
|
||||
# endif
|
||||
}
|
||||
|
||||
void usb_power_disconnect(void) {
|
||||
|
||||
# ifdef USB_POWER_EN_PIN
|
||||
gpio_write_pin_high(USB_POWER_EN_PIN);
|
||||
# endif
|
||||
}
|
||||
|
||||
void suspend_power_down_kb(void) {
|
||||
|
||||
# ifdef LED_POWER_EN_PIN
|
||||
gpio_write_pin_low(LED_POWER_EN_PIN);
|
||||
# endif
|
||||
|
||||
suspend_power_down_user();
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_kb(void) {
|
||||
|
||||
# ifdef LED_POWER_EN_PIN
|
||||
gpio_write_pin_high(LED_POWER_EN_PIN);
|
||||
# endif
|
||||
|
||||
wireless_devs_change(wireless_get_current_devs(), wireless_get_current_devs(), false);
|
||||
suspend_wakeup_init_user();
|
||||
hs_rgb_blink_set_timer(timer_read32());
|
||||
}
|
||||
|
||||
bool lpwr_is_allow_timeout_hook(void) {
|
||||
|
||||
if (wireless_get_current_devs() == DEVS_USB) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void wireless_post_task(void) {
|
||||
|
||||
// auto switching devs
|
||||
if (post_init_timer && timer_elapsed32(post_init_timer) >= 100) {
|
||||
|
||||
md_send_devctrl(MD_SND_CMD_DEVCTRL_FW_VERSION); // get the module fw version.
|
||||
md_send_devctrl(MD_SND_CMD_DEVCTRL_SLEEP_BT_EN); // timeout 30min to sleep in bt mode, enable
|
||||
md_send_devctrl(MD_SND_CMD_DEVCTRL_SLEEP_2G4_EN); // timeout 30min to sleep in 2.4g mode, enable
|
||||
wireless_devs_change(!confinfo.devs, confinfo.devs, false);
|
||||
post_init_timer = 0x00;
|
||||
}
|
||||
|
||||
hs_mode_scan(false, confinfo.devs, confinfo.last_btdevs);
|
||||
}
|
||||
|
||||
uint32_t wls_process_long_press(uint32_t trigger_time, void *cb_arg) {
|
||||
uint16_t keycode = *((uint16_t *)cb_arg);
|
||||
|
||||
switch (keycode) {
|
||||
case KC_BT1: {
|
||||
uint8_t mode = confinfo.devs;
|
||||
hs_modeio_detection(true, &mode, confinfo.last_btdevs);
|
||||
if ((mode == hs_bt) || (mode == hs_wireless) || (mode == hs_none)) {
|
||||
wireless_devs_change(wireless_get_current_devs(), DEVS_BT1, true);
|
||||
}
|
||||
|
||||
} break;
|
||||
case KC_BT2: {
|
||||
uint8_t mode = confinfo.devs;
|
||||
hs_modeio_detection(true, &mode, confinfo.last_btdevs);
|
||||
if ((mode == hs_bt) || (mode == hs_wireless) || (mode == hs_none)) {
|
||||
wireless_devs_change(wireless_get_current_devs(), DEVS_BT2, true);
|
||||
}
|
||||
} break;
|
||||
case KC_BT3: {
|
||||
uint8_t mode = confinfo.devs;
|
||||
hs_modeio_detection(true, &mode, confinfo.last_btdevs);
|
||||
if ((mode == hs_bt) || (mode == hs_wireless) || (mode == hs_none)) {
|
||||
wireless_devs_change(wireless_get_current_devs(), DEVS_BT3, true);
|
||||
}
|
||||
} break;
|
||||
case KC_2G4: {
|
||||
uint8_t mode = confinfo.devs;
|
||||
hs_modeio_detection(true, &mode, confinfo.last_btdevs);
|
||||
if ((mode == hs_2g4) || (mode == hs_wireless) || (mode == hs_none)) {
|
||||
wireless_devs_change(wireless_get_current_devs(), DEVS_2G4, true);
|
||||
}
|
||||
} break;
|
||||
case EE_CLR: {
|
||||
|
||||
} break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool process_record_wls(uint16_t keycode, keyrecord_t *record) {
|
||||
static uint16_t keycode_shadow = 0x00;
|
||||
static deferred_token wls_process_long_press_token = INVALID_DEFERRED_TOKEN;
|
||||
|
||||
keycode_shadow = keycode;
|
||||
|
||||
# ifndef WLS_KEYCODE_PAIR_TIME
|
||||
# define WLS_KEYCODE_PAIR_TIME 3000
|
||||
# endif
|
||||
|
||||
# define WLS_KEYCODE_EXEC(wls_dev) \
|
||||
do { \
|
||||
if (record->event.pressed) { \
|
||||
if (wireless_get_current_devs() != wls_dev) \
|
||||
wireless_devs_change(wireless_get_current_devs(), wls_dev, false); \
|
||||
if (wls_process_long_press_token == INVALID_DEFERRED_TOKEN) { \
|
||||
wls_process_long_press_token = defer_exec(WLS_KEYCODE_PAIR_TIME, wls_process_long_press, &keycode_shadow); \
|
||||
} \
|
||||
} else { \
|
||||
cancel_deferred_exec(wls_process_long_press_token); \
|
||||
wls_process_long_press_token = INVALID_DEFERRED_TOKEN; \
|
||||
} \
|
||||
} while (false)
|
||||
|
||||
switch (keycode) {
|
||||
case KC_BT1: {
|
||||
uint8_t mode = confinfo.devs;
|
||||
hs_modeio_detection(true, &mode, confinfo.last_btdevs);
|
||||
if ((mode == hs_bt) || (mode == hs_wireless) || (mode == hs_none)) {
|
||||
WLS_KEYCODE_EXEC(DEVS_BT1);
|
||||
hs_rgb_blink_set_timer(timer_read32());
|
||||
}
|
||||
|
||||
} break;
|
||||
case KC_BT2: {
|
||||
uint8_t mode = confinfo.devs;
|
||||
hs_modeio_detection(true, &mode, confinfo.last_btdevs);
|
||||
if ((mode == hs_bt) || (mode == hs_wireless) || (mode == hs_none)) {
|
||||
WLS_KEYCODE_EXEC(DEVS_BT2);
|
||||
hs_rgb_blink_set_timer(timer_read32());
|
||||
}
|
||||
} break;
|
||||
case KC_BT3: {
|
||||
uint8_t mode = confinfo.devs;
|
||||
hs_modeio_detection(true, &mode, confinfo.last_btdevs);
|
||||
if ((mode == hs_bt) || (mode == hs_wireless) || (mode == hs_none)) {
|
||||
WLS_KEYCODE_EXEC(DEVS_BT3);
|
||||
hs_rgb_blink_set_timer(timer_read32());
|
||||
}
|
||||
} break;
|
||||
case KC_2G4: {
|
||||
uint8_t mode = confinfo.devs;
|
||||
hs_modeio_detection(true, &mode, confinfo.last_btdevs);
|
||||
if ((mode == hs_2g4) || (mode == hs_wireless) || (mode == hs_none)) {
|
||||
WLS_KEYCODE_EXEC(DEVS_2G4);
|
||||
hs_rgb_blink_set_timer(timer_read32());
|
||||
}
|
||||
} break;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
if (test_white_light_flag && record->event.pressed) {
|
||||
test_white_light_flag = false;
|
||||
rgb_matrix_set_color_all(0x00, 0x00, 0x00);
|
||||
}
|
||||
|
||||
switch (keycode) {
|
||||
case MO(_FL):
|
||||
case MO(_MFL): {
|
||||
if (!record->event.pressed && rgbrec_is_started()) {
|
||||
if (no_record_fg == true) {
|
||||
no_record_fg = false;
|
||||
rgbrec_register_record(keycode, record);
|
||||
}
|
||||
no_record_fg = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case RP_END:
|
||||
case RP_P0:
|
||||
case RP_P1:
|
||||
case RP_P2:
|
||||
case RM_NEXT:
|
||||
break;
|
||||
default: {
|
||||
if (rgbrec_is_started()) {
|
||||
if (!IS_QK_MOMENTARY(keycode) && record->event.pressed) {
|
||||
rgbrec_register_record(keycode, record);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} break;
|
||||
}
|
||||
|
||||
if (rgbrec_is_started() && (!(keycode == RP_P0 || keycode == RP_P1 || keycode == RP_P2 || keycode == RP_END || keycode == RM_NEXT || keycode == MO(_FL) || keycode == MO(_MFL)))) {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
if (process_record_user(keycode, record) != true) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (keycode) {
|
||||
case QK_BOOT: {
|
||||
if (record->event.pressed) {
|
||||
dprintf("into boot!!!\r\n");
|
||||
eeconfig_disable();
|
||||
bootloader_jump();
|
||||
}
|
||||
} break;
|
||||
|
||||
case NK_TOGG: {
|
||||
if (rgbrec_is_started()) {
|
||||
|
||||
return false;
|
||||
}
|
||||
if (record->event.pressed) {
|
||||
rgb_matrix_hs_indicator_set(0xFF, (RGB){0x00, 0x6E, 0x00}, 250, 1);
|
||||
}
|
||||
} break;
|
||||
case EE_CLR: {
|
||||
if (record->event.pressed) {
|
||||
ee_clr_timer = timer_read32();
|
||||
} else {
|
||||
ee_clr_timer = 0;
|
||||
}
|
||||
|
||||
return false;
|
||||
} break;
|
||||
case RM_SPDU: {
|
||||
if (record->event.pressed) {
|
||||
if (rgb_matrix_get_speed() >= (RGB_MATRIX_SPD_STEP * 5)) {
|
||||
rgb_blink_dir();
|
||||
}
|
||||
}
|
||||
} break;
|
||||
case RM_SPDD: {
|
||||
if (record->event.pressed) {
|
||||
if (rgb_matrix_get_speed() <= RGB_MATRIX_SPD_STEP) {
|
||||
rgb_blink_dir();
|
||||
rgb_matrix_set_speed(RGB_MATRIX_SPD_STEP);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} break;
|
||||
case RM_VALU: {
|
||||
if (record->event.pressed) {
|
||||
if (rgb_matrix_get_val() >= (RGB_MATRIX_MAXIMUM_BRIGHTNESS - RGB_MATRIX_VAL_STEP)) {
|
||||
rgb_blink_dir();
|
||||
start_hsv.v = RGB_MATRIX_MAXIMUM_BRIGHTNESS;
|
||||
} else {
|
||||
start_hsv.v = rgb_matrix_get_val() + RGB_MATRIX_VAL_STEP;
|
||||
}
|
||||
}
|
||||
} break;
|
||||
case RM_VALD: {
|
||||
if (record->event.pressed) {
|
||||
if (rgb_matrix_get_val() <= RGB_MATRIX_VAL_STEP) {
|
||||
rgb_blink_dir();
|
||||
|
||||
rgb_matrix_set_color_all(0, 0, 0);
|
||||
start_hsv.v = 0;
|
||||
} else {
|
||||
start_hsv.v = rgb_matrix_get_val() - RGB_MATRIX_VAL_STEP;
|
||||
}
|
||||
}
|
||||
} break;
|
||||
case TO(_BL): {
|
||||
if (record->event.pressed) {
|
||||
rgb_matrix_hs_set_remain_time(HS_RGB_BLINK_INDEX_MAC, 0);
|
||||
rgb_matrix_hs_indicator_set(HS_RGB_BLINK_INDEX_WIN, (RGB){RGB_WHITE}, 250, 3);
|
||||
if (keymap_is_mac_system()) {
|
||||
set_single_persistent_default_layer(_BL);
|
||||
layer_move(0);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
} break;
|
||||
case TO(_MBL): {
|
||||
if (record->event.pressed) {
|
||||
rgb_matrix_hs_set_remain_time(HS_RGB_BLINK_INDEX_WIN, 0);
|
||||
rgb_matrix_hs_indicator_set(HS_RGB_BLINK_INDEX_MAC, (RGB){RGB_WHITE}, 250, 3);
|
||||
if (!keymap_is_mac_system()) {
|
||||
set_single_persistent_default_layer(_MBL);
|
||||
layer_move(0);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
} break;
|
||||
case RP_P0: {
|
||||
if (record->event.pressed) {
|
||||
confinfo.record_channel = 0;
|
||||
rgbrec_read_current_channel(confinfo.record_channel);
|
||||
rgbrec_end(confinfo.record_channel);
|
||||
eeconfig_confinfo_update(confinfo.raw);
|
||||
rgbrec_show(confinfo.record_channel);
|
||||
dprintf("confinfo.record_last_mode = %d\r\n", confinfo.record_last_mode);
|
||||
}
|
||||
|
||||
return false;
|
||||
} break;
|
||||
case RP_P1: {
|
||||
if (record->event.pressed) {
|
||||
confinfo.record_channel = 1;
|
||||
rgbrec_read_current_channel(confinfo.record_channel);
|
||||
rgbrec_end(confinfo.record_channel);
|
||||
eeconfig_confinfo_update(confinfo.raw);
|
||||
rgbrec_show(confinfo.record_channel);
|
||||
}
|
||||
|
||||
return false;
|
||||
} break;
|
||||
case RP_P2: {
|
||||
if (record->event.pressed) {
|
||||
confinfo.record_channel = 2;
|
||||
rgbrec_read_current_channel(confinfo.record_channel);
|
||||
rgbrec_end(confinfo.record_channel);
|
||||
eeconfig_confinfo_update(confinfo.raw);
|
||||
rgbrec_show(confinfo.record_channel);
|
||||
}
|
||||
|
||||
return false;
|
||||
} break;
|
||||
case RP_END: {
|
||||
if (record->event.pressed) {
|
||||
if (rgb_matrix_get_mode() != RGB_MATRIX_CUSTOM_RGBR_PLAY) {
|
||||
|
||||
return false;
|
||||
}
|
||||
if (!rgbrec_is_started()) {
|
||||
rgbrec_start(confinfo.record_channel);
|
||||
no_record_fg = false;
|
||||
rec_time = timer_read32();
|
||||
rgbrec_set_close_all(HSV_BLACK);
|
||||
} else {
|
||||
rec_time = 0;
|
||||
rgbrec_end(confinfo.record_channel);
|
||||
}
|
||||
dprintf("confinfo.record_last_mode = %d\r\n", confinfo.record_last_mode);
|
||||
}
|
||||
|
||||
return false;
|
||||
} break;
|
||||
case RM_NEXT: {
|
||||
if (record->event.pressed) {
|
||||
if (rgb_matrix_get_mode() == RGB_MATRIX_CUSTOM_RGBR_PLAY) {
|
||||
if (rgbrec_is_started()) {
|
||||
rgbrec_read_current_channel(confinfo.record_channel);
|
||||
rgbrec_end(confinfo.record_channel);
|
||||
no_record_fg = false;
|
||||
}
|
||||
if (confinfo.record_last_mode != 0xFF)
|
||||
rgb_matrix_mode(confinfo.record_last_mode);
|
||||
else
|
||||
rgb_matrix_mode(RGB_MATRIX_DEFAULT_MODE);
|
||||
eeconfig_confinfo_update(confinfo.raw);
|
||||
dprintf("confinfo.record_last_mode = %d\r\n", confinfo.record_last_mode);
|
||||
start_hsv = rgb_matrix_get_hsv();
|
||||
return false;
|
||||
}
|
||||
record_rgbmatrix_increase(&(confinfo.record_last_mode));
|
||||
eeconfig_confinfo_update(confinfo.raw);
|
||||
start_hsv = rgb_matrix_get_hsv();
|
||||
}
|
||||
|
||||
return false;
|
||||
} break;
|
||||
case RM_HUEU: {
|
||||
if (record->event.pressed) {
|
||||
record_color_hsv(true);
|
||||
start_hsv = rgb_matrix_get_hsv();
|
||||
}
|
||||
|
||||
return false;
|
||||
} break;
|
||||
case KC_LCMD: {
|
||||
if (keymap_is_mac_system()) {
|
||||
if (keymap_config.no_gui && !rgbrec_is_started()) {
|
||||
if (record->event.pressed) {
|
||||
register_code16(KC_LCMD);
|
||||
} else {
|
||||
unregister_code16(KC_LCMD);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
} break;
|
||||
case KC_RCMD: {
|
||||
if (keymap_is_mac_system()) {
|
||||
if (keymap_config.no_gui && !rgbrec_is_started()) {
|
||||
if (record->event.pressed) {
|
||||
register_code16(KC_RCMD);
|
||||
} else {
|
||||
unregister_code16(KC_RCMD);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
} break;
|
||||
case USE_TASK:{
|
||||
if (record->event.pressed){
|
||||
register_code(KC_LCTL);
|
||||
register_code(KC_LSFT);
|
||||
register_code(KC_ESC);
|
||||
}
|
||||
else{
|
||||
unregister_code(KC_LCTL);
|
||||
unregister_code(KC_LSFT);
|
||||
unregister_code(KC_ESC);
|
||||
}
|
||||
return false;
|
||||
}break;
|
||||
case USE_PRO:{
|
||||
if (record->event.pressed){
|
||||
register_code(KC_LCTL);
|
||||
register_code(KC_LALT);
|
||||
register_code(KC_TAB);
|
||||
}
|
||||
else{
|
||||
unregister_code(KC_LCTL);
|
||||
unregister_code(KC_LALT);
|
||||
unregister_code(KC_TAB);
|
||||
}
|
||||
return false;
|
||||
}break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void housekeeping_task_user(void) {
|
||||
|
||||
charging_state = readPin(HS_BAT_CABLE_PIN);
|
||||
}
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
|
||||
# ifdef WIRELESS_ENABLE
|
||||
bool wls_rgb_indicator_reset = false;
|
||||
uint32_t wls_rgb_indicator_timer = 0x00;
|
||||
uint32_t wls_rgb_indicator_interval = 0;
|
||||
uint32_t wls_rgb_indicator_times = 0;
|
||||
uint32_t wls_rgb_indicator_index = 0;
|
||||
RGB wls_rgb_indicator_rgb = {0};
|
||||
|
||||
void rgb_matrix_wls_indicator_set(uint8_t index, RGB rgb, uint32_t interval, uint8_t times) {
|
||||
|
||||
wls_rgb_indicator_timer = timer_read32();
|
||||
|
||||
wls_rgb_indicator_index = index;
|
||||
wls_rgb_indicator_interval = interval;
|
||||
wls_rgb_indicator_times = times * 2;
|
||||
wls_rgb_indicator_rgb = rgb;
|
||||
}
|
||||
|
||||
void rgb_matrix_wls_indicator(void) {
|
||||
|
||||
if (wls_rgb_indicator_timer) {
|
||||
|
||||
if (timer_elapsed32(wls_rgb_indicator_timer) >= wls_rgb_indicator_interval) {
|
||||
wls_rgb_indicator_timer = timer_read32();
|
||||
|
||||
if (wls_rgb_indicator_times) {
|
||||
wls_rgb_indicator_times--;
|
||||
}
|
||||
|
||||
if (wls_rgb_indicator_times <= 0) {
|
||||
wls_rgb_indicator_timer = 0x00;
|
||||
if (rgb_matrix_wls_indicator_cb() != true) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (wls_rgb_indicator_times % 2) {
|
||||
rgb_matrix_set_color(wls_rgb_indicator_index, wls_rgb_indicator_rgb.r, wls_rgb_indicator_rgb.g, wls_rgb_indicator_rgb.b);
|
||||
} else {
|
||||
rgb_matrix_set_color(wls_rgb_indicator_index, 0x00, 0x00, 0x00);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void rgb_matrix_hs_bat_set(uint8_t index, RGB rgb, uint32_t interval, uint8_t times) {
|
||||
for (int i = 0; i < HS_RGB_BAT_COUNT; i++) {
|
||||
if (!hs_rgb_bat[i].active) {
|
||||
hs_rgb_bat[i].active = true;
|
||||
hs_rgb_bat[i].timer = timer_read32();
|
||||
hs_rgb_bat[i].interval = interval;
|
||||
hs_rgb_bat[i].times = times * 2;
|
||||
hs_rgb_bat[i].index = index;
|
||||
hs_rgb_bat[i].rgb = rgb;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
void rgb_blink_dir(void) {
|
||||
|
||||
rgb_matrix_hs_indicator_set(HS_RGB_BLINK_INDEX_VAI, (RGB){0x20, 0x20, 0x20}, 250, 3);
|
||||
rgb_matrix_hs_indicator_set(HS_RGB_BLINK_INDEX_VAD, (RGB){0x20, 0x20, 0x20}, 250, 3);
|
||||
rgb_matrix_hs_indicator_set(HS_RGB_BLINK_INDEX_SPI, (RGB){0x20, 0x20, 0x20}, 250, 3);
|
||||
rgb_matrix_hs_indicator_set(HS_RGB_BLINK_INDEX_SPD, (RGB){0x20, 0x20, 0x20}, 250, 3);
|
||||
}
|
||||
|
||||
bool hs_reset_settings_user(void) {
|
||||
|
||||
rgb_matrix_hs_indicator_set(0xFF, (RGB){0x10, 0x10, 0x10}, 250, 3);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void nkr_indicators_hook(uint8_t index) {
|
||||
|
||||
if ((hs_rgb_indicators[index].rgb.r == 0x6E) && (hs_rgb_indicators[index].rgb.g == 0x00) && (hs_rgb_indicators[index].rgb.b == 0x00)) {
|
||||
|
||||
rgb_matrix_hs_indicator_set(0xFF, (RGB){0x6E, 0x00, 0x00}, 250, 1);
|
||||
|
||||
} else if ((hs_rgb_indicators[index].rgb.r == 0x00) && (hs_rgb_indicators[index].rgb.g == 0x6E) && (hs_rgb_indicators[index].rgb.b == 0x00)) {
|
||||
|
||||
rgb_matrix_hs_indicator_set(0xFF, (RGB){0x00, 0x00, 0x6F}, 250, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void rgb_matrix_hs_indicator_set(uint8_t index, RGB rgb, uint32_t interval, uint8_t times) {
|
||||
|
||||
for (int i = 0; i < HS_RGB_INDICATOR_COUNT; i++) {
|
||||
if (!hs_rgb_indicators[i].active) {
|
||||
hs_rgb_indicators[i].active = true;
|
||||
hs_rgb_indicators[i].timer = timer_read32();
|
||||
hs_rgb_indicators[i].interval = interval;
|
||||
hs_rgb_indicators[i].times = times * 2;
|
||||
hs_rgb_indicators[i].index = index;
|
||||
hs_rgb_indicators[i].rgb = rgb;
|
||||
if (index != 0xFF)
|
||||
hs_rgb_indicators[i].blink_cb = NULL;
|
||||
else {
|
||||
hs_rgb_indicators[i].blink_cb = nkr_indicators_hook;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void rgb_matrix_hs_set_remain_time(uint8_t index, uint8_t remain_time) {
|
||||
|
||||
for (int i = 0; i < HS_RGB_INDICATOR_COUNT; i++) {
|
||||
if (hs_rgb_indicators[i].index == index) {
|
||||
hs_rgb_indicators[i].times = 0;
|
||||
hs_rgb_indicators[i].active = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void rgb_matrix_hs_indicator(void) {
|
||||
|
||||
for (int i = 0; i < HS_RGB_INDICATOR_COUNT; i++) {
|
||||
if (hs_rgb_indicators[i].active) {
|
||||
if (timer_elapsed32(hs_rgb_indicators[i].timer) >= hs_rgb_indicators[i].interval) {
|
||||
hs_rgb_indicators[i].timer = timer_read32();
|
||||
|
||||
if (hs_rgb_indicators[i].times) {
|
||||
hs_rgb_indicators[i].times--;
|
||||
}
|
||||
|
||||
if (hs_rgb_indicators[i].times <= 0) {
|
||||
hs_rgb_indicators[i].active = false;
|
||||
hs_rgb_indicators[i].timer = 0x00;
|
||||
if (hs_rgb_indicators[i].blink_cb != NULL)
|
||||
hs_rgb_indicators[i].blink_cb(i);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if ((hs_rgb_indicators[i].times % 2)) {
|
||||
if (hs_rgb_indicators[i].index == 0xFF) {
|
||||
rgb_matrix_set_color_all(hs_rgb_indicators[i].rgb.r, hs_rgb_indicators[i].rgb.g, hs_rgb_indicators[i].rgb.b);
|
||||
} else {
|
||||
rgb_matrix_set_color(hs_rgb_indicators[i].index, hs_rgb_indicators[i].rgb.r, hs_rgb_indicators[i].rgb.g, hs_rgb_indicators[i].rgb.b);
|
||||
}
|
||||
} else {
|
||||
if (hs_rgb_indicators[i].index == 0xFF) {
|
||||
rgb_matrix_set_color_all(0x00, 0x00, 0x00);
|
||||
} else {
|
||||
rgb_matrix_set_color(hs_rgb_indicators[i].index, 0x00, 0x00, 0x00);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void rgb_matrix_start_rec(void) {
|
||||
|
||||
if (rgbrec_is_started()) {
|
||||
if (!rec_time || timer_elapsed32(rec_time) > 250) {
|
||||
rec_time = timer_read32();
|
||||
rec_filp = !rec_filp;
|
||||
}
|
||||
if (rec_filp) {
|
||||
rgb_matrix_set_color(0, 0x20, 0x20, 0x20);
|
||||
rgb_matrix_set_color(1, 0x20, 0x20, 0x20);
|
||||
rgb_matrix_set_color(2, 0x20, 0x20, 0x20);
|
||||
} else {
|
||||
rgb_matrix_set_color(0, 0x00, 0x00, 0x00);
|
||||
rgb_matrix_set_color(1, 0x00, 0x00, 0x00);
|
||||
rgb_matrix_set_color(2, 0x00, 0x00, 0x00);
|
||||
}
|
||||
} else {
|
||||
rec_time = 0;
|
||||
rec_filp = false;
|
||||
}
|
||||
}
|
||||
|
||||
bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
|
||||
|
||||
if (test_white_light_flag) {
|
||||
RGB rgb_test_open = hsv_to_rgb((HSV){.h = 0, .s = 0, .v = RGB_MATRIX_VAL_STEP * 5});
|
||||
rgb_matrix_set_color_all(rgb_test_open.r, rgb_test_open.g, rgb_test_open.b);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ee_clr_timer && timer_elapsed32(ee_clr_timer) > 3000) {
|
||||
hs_reset_settings();
|
||||
ee_clr_timer = 0;
|
||||
}
|
||||
|
||||
if (host_keyboard_led_state().caps_lock)
|
||||
rgb_matrix_set_color(HS_RGB_INDEX_CAPS, 0x20, 0x20, 0x20);
|
||||
else
|
||||
rgb_matrix_set_color(HS_RGB_INDEX_CAPS, RGB_BLACK);
|
||||
if (!keymap_is_mac_system() && keymap_config.no_gui)
|
||||
rgb_matrix_set_color(HS_RGB_INDEX_WIN_LOCK, 0x20, 0x20, 0x20);
|
||||
else
|
||||
rgb_matrix_set_color(HS_RGB_INDEX_WIN_LOCK, RGB_BLACK);
|
||||
|
||||
rgb_matrix_hs_indicator();
|
||||
|
||||
rgb_matrix_start_rec();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void hs_reset_settings(void) {
|
||||
enable_bat_indicators = false;
|
||||
eeconfig_init();
|
||||
eeconfig_update_rgb_matrix_default();
|
||||
|
||||
eeconfig_read_keymap(&keymap_config);
|
||||
|
||||
#if defined(NKRO_ENABLE) && defined(FORCE_NKRO)
|
||||
keymap_config.nkro = 0;
|
||||
eeconfig_update_keymap(&keymap_config);
|
||||
#endif
|
||||
|
||||
// #if defined(WIRELESS_ENABLE)
|
||||
// wireless_devs_change(wireless_get_current_devs(), DEVS_USB, false);
|
||||
// #endif
|
||||
|
||||
if (hs_reset_settings_user() != true) {
|
||||
|
||||
return;
|
||||
}
|
||||
keyboard_post_init_kb();
|
||||
}
|
||||
|
||||
void lpwr_wakeup_hook(void) {
|
||||
|
||||
gpio_write_pin_high(LED_POWER_EN_PIN);
|
||||
gpio_write_pin_high(A9);
|
||||
gpio_write_pin_high(HS_LED_BOOSTING_PIN);
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// Copyright 2024 Epomaker (@Epomaker)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_SERIAL TRUE
|
||||
#define HAL_USE_SPI TRUE
|
||||
#define PAL_USE_CALLBACKS TRUE
|
||||
|
||||
#include_next <halconf.h>
|
||||
@@ -1,366 +0,0 @@
|
||||
{
|
||||
"manufacturer": "epomaker",
|
||||
"keyboard_name": "Galaxy QMK",
|
||||
"maintainer": "Epomaker",
|
||||
"bootloader": "wb32-dfu",
|
||||
"bootmagic": {
|
||||
"matrix": [0, 0]
|
||||
},
|
||||
"debounce": 1,
|
||||
"diode_direction": "ROW2COL",
|
||||
"eeprom": {
|
||||
"driver": "wear_leveling",
|
||||
"wear_leveling": {
|
||||
"backing_size": 4096,
|
||||
"driver": "spi_flash"
|
||||
}
|
||||
},
|
||||
"encoder": {
|
||||
"rotary": [{ "pin_a": "B7", "pin_b": "B6" }]
|
||||
},
|
||||
"features": {
|
||||
"command": false,
|
||||
"console": false,
|
||||
"extrakey": true,
|
||||
"mousekey": true,
|
||||
"nkro": true,
|
||||
"rgb_matrix": true,
|
||||
"deferred_exec": true,
|
||||
"rgblight": false,
|
||||
"encoder": true
|
||||
},
|
||||
"keycodes": [
|
||||
{
|
||||
"key": "RP_P0"
|
||||
},
|
||||
{
|
||||
"key": "RP_P1"
|
||||
},
|
||||
{
|
||||
"key": "RP_P2"
|
||||
},
|
||||
{
|
||||
"key": "RP_END"
|
||||
},
|
||||
{
|
||||
"key": "USE_PRO"
|
||||
},
|
||||
{
|
||||
"key": "USE_TASK",
|
||||
"aliases": ["USE_TSK"]
|
||||
}
|
||||
],
|
||||
"dynamic_keymap": {
|
||||
"layer_count": 5
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": [
|
||||
"C0",
|
||||
"C1",
|
||||
"C2",
|
||||
"C3",
|
||||
"A6",
|
||||
"B10",
|
||||
"B11",
|
||||
"B12",
|
||||
"B13",
|
||||
"B14",
|
||||
"A10",
|
||||
"C6",
|
||||
"C7",
|
||||
"C8",
|
||||
"C9",
|
||||
"A8",
|
||||
"C4",
|
||||
"C5",
|
||||
"B0"
|
||||
],
|
||||
"rows": ["A0", "A1", "A2", "A3", "A4", "C13"]
|
||||
},
|
||||
"processor": "WB32FQ95",
|
||||
"rgb_matrix": {
|
||||
"animations": {
|
||||
"alphas_mods": true,
|
||||
"band_pinwheel_sat": true,
|
||||
"band_pinwheel_val": true,
|
||||
"band_sat": true,
|
||||
"band_spiral_sat": true,
|
||||
"band_spiral_val": true,
|
||||
"band_val": true,
|
||||
"breathing": true,
|
||||
"cycle_all": true,
|
||||
"cycle_left_right": true,
|
||||
"cycle_out_in": true,
|
||||
"cycle_out_in_dual": true,
|
||||
"cycle_pinwheel": true,
|
||||
"cycle_spiral": true,
|
||||
"cycle_up_down": true,
|
||||
"digital_rain": true,
|
||||
"dual_beacon": true,
|
||||
"gradient_left_right": true,
|
||||
"gradient_up_down": true,
|
||||
"hue_breathing": true,
|
||||
"hue_pendulum": true,
|
||||
"hue_wave": true,
|
||||
"jellybean_raindrops": true,
|
||||
"multisplash": true,
|
||||
"pixel_flow": true,
|
||||
"pixel_fractal": true,
|
||||
"pixel_rain": true,
|
||||
"rainbow_beacon": true,
|
||||
"rainbow_moving_chevron": true,
|
||||
"rainbow_pinwheels": true,
|
||||
"raindrops": true,
|
||||
"solid_color": true,
|
||||
"solid_multisplash": true,
|
||||
"solid_reactive": true,
|
||||
"solid_reactive_cross": true,
|
||||
"solid_reactive_multicross": true,
|
||||
"solid_reactive_multinexus": true,
|
||||
"solid_reactive_multiwide": true,
|
||||
"solid_reactive_nexus": true,
|
||||
"solid_reactive_simple": true,
|
||||
"solid_reactive_wide": true,
|
||||
"solid_splash": true,
|
||||
"splash": true,
|
||||
"typing_heatmap": true
|
||||
},
|
||||
"driver": "ws2812",
|
||||
"layout": [
|
||||
{ "matrix": [5, 17], "x": 64, "y": 211, "flags": 4 },
|
||||
{ "matrix": [5, 16], "x": 64, "y": 198, "flags": 4 },
|
||||
{ "matrix": [5, 14], "x": 64, "y": 174, "flags": 4 },
|
||||
{ "matrix": [5, 12], "x": 64, "y": 149, "flags": 4 },
|
||||
{ "matrix": [5, 11], "x": 64, "y": 136, "flags": 4 },
|
||||
{ "matrix": [5, 10], "x": 64, "y": 124, "flags": 4 },
|
||||
{ "matrix": [5, 9], "x": 64, "y": 112, "flags": 4 },
|
||||
{ "matrix": [5, 5], "x": 64, "y": 62, "flags": 4 },
|
||||
{ "matrix": [5, 2], "x": 64, "y": 25, "flags": 4 },
|
||||
{ "matrix": [5, 1], "x": 64, "y": 12, "flags": 4 },
|
||||
{ "matrix": [5, 0], "x": 64, "y": 0, "flags": 4 },
|
||||
{ "matrix": [4, 0], "x": 51, "y": 0, "flags": 4 },
|
||||
{ "matrix": [4, 1], "x": 51, "y": 12, "flags": 4 },
|
||||
{ "matrix": [4, 2], "x": 51, "y": 25, "flags": 4 },
|
||||
{ "matrix": [4, 3], "x": 51, "y": 37, "flags": 4 },
|
||||
{ "matrix": [4, 4], "x": 51, "y": 50, "flags": 4 },
|
||||
{ "matrix": [4, 5], "x": 51, "y": 62, "flags": 4 },
|
||||
{ "matrix": [4, 6], "x": 51, "y": 74, "flags": 4 },
|
||||
{ "matrix": [4, 7], "x": 51, "y": 87, "flags": 4 },
|
||||
{ "matrix": [4, 8], "x": 51, "y": 99, "flags": 4 },
|
||||
{ "matrix": [4, 9], "x": 51, "y": 112, "flags": 4 },
|
||||
{ "matrix": [4, 10], "x": 51, "y": 124, "flags": 4 },
|
||||
{ "matrix": [4, 11], "x": 51, "y": 136, "flags": 4 },
|
||||
{ "matrix": [4, 12], "x": 51, "y": 149, "flags": 4 },
|
||||
{ "matrix": [4, 15], "x": 51, "y": 186, "flags": 4 },
|
||||
{ "matrix": [4, 16], "x": 51, "y": 198, "flags": 4 },
|
||||
{ "matrix": [4, 17], "x": 51, "y": 211, "flags": 4 },
|
||||
{ "matrix": [4, 18], "x": 51, "y": 223, "flags": 4 },
|
||||
{ "matrix": [3, 17], "x": 38, "y": 211, "flags": 4 },
|
||||
{ "matrix": [3, 16], "x": 38, "y": 198, "flags": 4 },
|
||||
{ "matrix": [3, 15], "x": 38, "y": 186, "flags": 4 },
|
||||
{ "matrix": [3, 14], "x": 38, "y": 174, "flags": 4 },
|
||||
{ "matrix": [3, 12], "x": 38, "y": 149, "flags": 4 },
|
||||
{ "matrix": [3, 11], "x": 38, "y": 136, "flags": 4 },
|
||||
{ "matrix": [3, 10], "x": 38, "y": 124, "flags": 4 },
|
||||
{ "matrix": [3, 9], "x": 38, "y": 112, "flags": 4 },
|
||||
{ "matrix": [3, 8], "x": 38, "y": 99, "flags": 4 },
|
||||
{ "matrix": [3, 7], "x": 38, "y": 87, "flags": 4 },
|
||||
{ "matrix": [3, 6], "x": 38, "y": 74, "flags": 4 },
|
||||
{ "matrix": [3, 5], "x": 38, "y": 62, "flags": 4 },
|
||||
{ "matrix": [3, 4], "x": 38, "y": 50, "flags": 4 },
|
||||
{ "matrix": [3, 3], "x": 38, "y": 37, "flags": 4 },
|
||||
{ "matrix": [3, 2], "x": 38, "y": 25, "flags": 4 },
|
||||
{ "matrix": [3, 1], "x": 38, "y": 12, "flags": 4 },
|
||||
{ "matrix": [3, 0], "x": 38, "y": 0, "flags": 4 },
|
||||
{ "matrix": [2, 0], "x": 26, "y": 0, "flags": 4 },
|
||||
{ "matrix": [2, 1], "x": 26, "y": 12, "flags": 4 },
|
||||
{ "matrix": [2, 2], "x": 26, "y": 25, "flags": 4 },
|
||||
{ "matrix": [2, 3], "x": 26, "y": 37, "flags": 4 },
|
||||
{ "matrix": [2, 4], "x": 26, "y": 50, "flags": 4 },
|
||||
{ "matrix": [2, 5], "x": 26, "y": 62, "flags": 4 },
|
||||
{ "matrix": [2, 6], "x": 26, "y": 74, "flags": 4 },
|
||||
{ "matrix": [2, 7], "x": 26, "y": 87, "flags": 4 },
|
||||
{ "matrix": [2, 8], "x": 26, "y": 99, "flags": 4 },
|
||||
{ "matrix": [2, 9], "x": 26, "y": 112, "flags": 4 },
|
||||
{ "matrix": [2, 10], "x": 26, "y": 124, "flags": 4 },
|
||||
{ "matrix": [2, 11], "x": 26, "y": 136, "flags": 4 },
|
||||
{ "matrix": [2, 12], "x": 26, "y": 149, "flags": 4 },
|
||||
{ "matrix": [2, 13], "x": 26, "y": 161, "flags": 4 },
|
||||
{ "matrix": [2, 14], "x": 26, "y": 174, "flags": 4 },
|
||||
{ "matrix": [2, 15], "x": 26, "y": 186, "flags": 4 },
|
||||
{ "matrix": [2, 16], "x": 26, "y": 198, "flags": 4 },
|
||||
{ "matrix": [2, 17], "x": 26, "y": 211, "flags": 4 },
|
||||
{ "matrix": [2, 18], "x": 26, "y": 223, "flags": 4 },
|
||||
{ "matrix": [1, 18], "x": 13, "y": 223, "flags": 4 },
|
||||
{ "matrix": [1, 17], "x": 13, "y": 211, "flags": 4 },
|
||||
{ "matrix": [1, 16], "x": 13, "y": 198, "flags": 4 },
|
||||
{ "matrix": [1, 15], "x": 13, "y": 186, "flags": 4 },
|
||||
{ "matrix": [1, 14], "x": 13, "y": 174, "flags": 4 },
|
||||
{ "matrix": [1, 13], "x": 13, "y": 161, "flags": 4 },
|
||||
{ "matrix": [1, 12], "x": 13, "y": 149, "flags": 4 },
|
||||
{ "matrix": [1, 11], "x": 13, "y": 136, "flags": 4 },
|
||||
{ "matrix": [1, 10], "x": 13, "y": 124, "flags": 4 },
|
||||
{ "matrix": [1, 9], "x": 13, "y": 112, "flags": 4 },
|
||||
{ "matrix": [1, 8], "x": 13, "y": 99, "flags": 4 },
|
||||
{ "matrix": [1, 7], "x": 13, "y": 87, "flags": 4 },
|
||||
{ "matrix": [1, 6], "x": 13, "y": 74, "flags": 4 },
|
||||
{ "matrix": [1, 5], "x": 13, "y": 62, "flags": 4 },
|
||||
{ "matrix": [1, 4], "x": 13, "y": 50, "flags": 4 },
|
||||
{ "matrix": [1, 3], "x": 13, "y": 37, "flags": 4 },
|
||||
{ "matrix": [1, 2], "x": 13, "y": 25, "flags": 4 },
|
||||
{ "matrix": [1, 1], "x": 13, "y": 12, "flags": 4 },
|
||||
{ "matrix": [1, 0], "x": 13, "y": 0, "flags": 4 },
|
||||
{ "matrix": [0, 0], "x": 0, "y": 0, "flags": 4 },
|
||||
{ "matrix": [0, 2], "x": 0, "y": 25, "flags": 4 },
|
||||
{ "matrix": [0, 3], "x": 0, "y": 37, "flags": 4 },
|
||||
{ "matrix": [0, 4], "x": 0, "y": 50, "flags": 4 },
|
||||
{ "matrix": [0, 5], "x": 0, "y": 62, "flags": 4 },
|
||||
{ "matrix": [0, 6], "x": 0, "y": 74, "flags": 4 },
|
||||
{ "matrix": [0, 7], "x": 0, "y": 87, "flags": 4 },
|
||||
{ "matrix": [0, 8], "x": 0, "y": 99, "flags": 4 },
|
||||
{ "matrix": [0, 9], "x": 0, "y": 112, "flags": 4 },
|
||||
{ "matrix": [0, 10], "x": 0, "y": 124, "flags": 4 },
|
||||
{ "matrix": [0, 11], "x": 0, "y": 136, "flags": 4 },
|
||||
{ "matrix": [0, 12], "x": 0, "y": 149, "flags": 4 },
|
||||
{ "matrix": [0, 13], "x": 0, "y": 161, "flags": 4 },
|
||||
{ "matrix": [0, 14], "x": 0, "y": 174, "flags": 4 },
|
||||
{ "matrix": [0, 15], "x": 0, "y": 186, "flags": 4 },
|
||||
{ "matrix": [0, 16], "x": 0, "y": 198, "flags": 4 },
|
||||
{ "matrix": [0, 17], "x": 0, "y": 211, "flags": 4 },
|
||||
{ "matrix": [0, 18], "x": 0, "y": 223, "flags": 4 }
|
||||
],
|
||||
"max_brightness": 150,
|
||||
"val_steps": 30,
|
||||
"speed_steps": 51,
|
||||
"default": {
|
||||
"animation": "cycle_left_right",
|
||||
"val": 150,
|
||||
"speed": 204
|
||||
},
|
||||
"sleep": true
|
||||
},
|
||||
"tap_keycode_delay": 10,
|
||||
"url": "http://www.rkgaming.com",
|
||||
"usb": {
|
||||
"device_version": "0.3.0",
|
||||
"pid": "0xE489",
|
||||
"suspend_wakeup_delay": 1000,
|
||||
"vid": "0x342D"
|
||||
},
|
||||
"host": {
|
||||
"default": {
|
||||
"nkro": true
|
||||
}
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "B15",
|
||||
"driver": "spi"
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{ "matrix": [0, 0], "x": 0, "y": 0 },
|
||||
{ "matrix": [0, 2], "x": 2, "y": 0 },
|
||||
{ "matrix": [0, 3], "x": 3, "y": 0 },
|
||||
{ "matrix": [0, 4], "x": 4, "y": 0 },
|
||||
{ "matrix": [0, 5], "x": 5, "y": 0 },
|
||||
{ "matrix": [0, 6], "x": 6.5, "y": 0 },
|
||||
{ "matrix": [0, 7], "x": 7.5, "y": 0 },
|
||||
{ "matrix": [0, 8], "x": 8.5, "y": 0 },
|
||||
{ "matrix": [0, 9], "x": 9.5, "y": 0 },
|
||||
{ "matrix": [0, 10], "x": 11, "y": 0 },
|
||||
{ "matrix": [0, 11], "x": 12, "y": 0 },
|
||||
{ "matrix": [0, 12], "x": 13, "y": 0 },
|
||||
{ "matrix": [0, 13], "x": 14, "y": 0 },
|
||||
{ "matrix": [0, 14], "x": 15.25, "y": 0 },
|
||||
{ "matrix": [0, 15], "x": 16.5, "y": 0 },
|
||||
{ "matrix": [0, 16], "x": 17.5, "y": 0 },
|
||||
{ "matrix": [0, 17], "x": 18.5, "y": 0 },
|
||||
{ "matrix": [0, 18], "x": 19.5, "y": 0 },
|
||||
{ "matrix": [1, 0], "x": 0, "y": 1.25 },
|
||||
{ "matrix": [1, 1], "x": 1, "y": 1.25 },
|
||||
{ "matrix": [1, 2], "x": 2, "y": 1.25 },
|
||||
{ "matrix": [1, 3], "x": 3, "y": 1.25 },
|
||||
{ "matrix": [1, 4], "x": 4, "y": 1.25 },
|
||||
{ "matrix": [1, 5], "x": 5, "y": 1.25 },
|
||||
{ "matrix": [1, 6], "x": 6, "y": 1.25 },
|
||||
{ "matrix": [1, 7], "x": 7, "y": 1.25 },
|
||||
{ "matrix": [1, 8], "x": 8, "y": 1.25 },
|
||||
{ "matrix": [1, 9], "x": 9, "y": 1.25 },
|
||||
{ "matrix": [1, 10], "x": 10, "y": 1.25 },
|
||||
{ "matrix": [1, 11], "x": 11, "y": 1.25 },
|
||||
{ "matrix": [1, 12], "x": 12, "y": 1.25 },
|
||||
{ "matrix": [1, 13], "x": 13, "y": 1.25, "w": 2 },
|
||||
{ "matrix": [1, 14], "x": 15.25, "y": 1.25 },
|
||||
{ "matrix": [1, 15], "x": 16.5, "y": 1.25 },
|
||||
{ "matrix": [1, 16], "x": 17.5, "y": 1.25 },
|
||||
{ "matrix": [1, 17], "x": 18.5, "y": 1.25 },
|
||||
{ "matrix": [1, 18], "x": 19.5, "y": 1.25 },
|
||||
{ "matrix": [2, 0], "x": 0, "y": 2.5, "w": 1.25 },
|
||||
{ "matrix": [2, 1], "x": 1.5, "y": 2.25 },
|
||||
{ "matrix": [2, 2], "x": 2.5, "y": 2.25 },
|
||||
{ "matrix": [2, 3], "x": 3.5, "y": 2.25 },
|
||||
{ "matrix": [2, 4], "x": 4.5, "y": 2.25 },
|
||||
{ "matrix": [2, 5], "x": 5.5, "y": 2.25 },
|
||||
{ "matrix": [2, 6], "x": 6.5, "y": 2.25 },
|
||||
{ "matrix": [2, 7], "x": 7.5, "y": 2.25 },
|
||||
{ "matrix": [2, 8], "x": 8.5, "y": 2.25 },
|
||||
{ "matrix": [2, 9], "x": 9.5, "y": 2.25 },
|
||||
{ "matrix": [2, 10], "x": 10.5, "y": 2.25 },
|
||||
{ "matrix": [2, 11], "x": 11.5, "y": 2.25 },
|
||||
{ "matrix": [2, 12], "x": 12.5, "y": 2.25 },
|
||||
{ "matrix": [2, 13], "x": 13.5, "y": 2.25, "w": 1.5 },
|
||||
{ "matrix": [2, 14], "x": 15.25, "y": 2.25 },
|
||||
{ "matrix": [2, 15], "x": 16.5, "y": 2.25 },
|
||||
{ "matrix": [2, 16], "x": 17.5, "y": 2.25 },
|
||||
{ "matrix": [2, 17], "x": 18.5, "y": 2.25 },
|
||||
{ "matrix": [2, 18], "x": 19.5, "y": 2.25, "h": 2 },
|
||||
{ "matrix": [3, 0], "x": 0, "y": 3.25, "w": 1.75 },
|
||||
{ "matrix": [3, 1], "x": 1.75, "y": 3.25 },
|
||||
{ "matrix": [3, 2], "x": 2.75, "y": 3.25 },
|
||||
{ "matrix": [3, 3], "x": 3.75, "y": 3.25 },
|
||||
{ "matrix": [3, 4], "x": 4.75, "y": 3.25 },
|
||||
{ "matrix": [3, 5], "x": 5.75, "y": 3.25 },
|
||||
{ "matrix": [3, 6], "x": 6.75, "y": 3.25 },
|
||||
{ "matrix": [3, 7], "x": 7.75, "y": 3.25 },
|
||||
{ "matrix": [3, 8], "x": 8.75, "y": 3.25 },
|
||||
{ "matrix": [3, 9], "x": 9.75, "y": 3.25 },
|
||||
{ "matrix": [3, 10], "x": 10.75, "y": 3.25 },
|
||||
{ "matrix": [3, 11], "x": 11.75, "y": 3.25 },
|
||||
{ "matrix": [3, 12], "x": 12.75, "y": 3.25, "w": 2.25 },
|
||||
{ "matrix": [3, 14], "x": 15.25, "y": 3.25 },
|
||||
{ "matrix": [3, 15], "x": 16.5, "y": 3.25 },
|
||||
{ "matrix": [3, 16], "x": 17.5, "y": 3.25 },
|
||||
{ "matrix": [3, 17], "x": 18.5, "y": 3.25 },
|
||||
{ "matrix": [4, 0], "x": 0, "y": 4.25, "w": 2.25 },
|
||||
{ "matrix": [4, 1], "x": 2.25, "y": 4.25 },
|
||||
{ "matrix": [4, 2], "x": 3.25, "y": 4.25 },
|
||||
{ "matrix": [4, 3], "x": 4.25, "y": 4.25 },
|
||||
{ "matrix": [4, 4], "x": 5.25, "y": 4.25 },
|
||||
{ "matrix": [4, 5], "x": 6.25, "y": 4.25 },
|
||||
{ "matrix": [4, 6], "x": 7.25, "y": 4.25 },
|
||||
{ "matrix": [4, 7], "x": 8.25, "y": 4.25 },
|
||||
{ "matrix": [4, 8], "x": 9.25, "y": 4.25 },
|
||||
{ "matrix": [4, 9], "x": 10.25, "y": 4.25 },
|
||||
{ "matrix": [4, 10], "x": 11.25, "y": 4.25 },
|
||||
{ "matrix": [4, 11], "x": 12.25, "y": 4.25, "w": 1.75 },
|
||||
{ "matrix": [4, 12], "x": 14, "y": 4.25 },
|
||||
{ "matrix": [4, 15], "x": 16.5, "y": 4.25 },
|
||||
{ "matrix": [4, 16], "x": 17.5, "y": 4.25 },
|
||||
{ "matrix": [4, 17], "x": 18.5, "y": 4.25 },
|
||||
{ "matrix": [4, 18], "x": 19.5, "y": 4.25, "h": 2 },
|
||||
{ "matrix": [5, 0], "x": 0, "y": 5.25, "w": 1.25 },
|
||||
{ "matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25 },
|
||||
{ "matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25 },
|
||||
{ "matrix": [5, 5], "x": 3.75, "y": 5.25, "w": 6.25 },
|
||||
{ "matrix": [5, 9], "x": 10, "y": 5.25, "w": 1.25 },
|
||||
{ "matrix": [5, 10], "x": 11.25, "y": 5.25, "w": 1.25 },
|
||||
{ "matrix": [5, 11], "x": 13, "y": 5.25 },
|
||||
{ "matrix": [5, 12], "x": 14, "y": 5.25 },
|
||||
{ "matrix": [5, 14], "x": 15, "y": 5.25 },
|
||||
{ "matrix": [5, 16], "x": 16.5, "y": 5.25, "w": 2 },
|
||||
{ "matrix": [5, 17], "x": 18.5, "y": 5.25 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
// Copyright 2024 Epomaker (@Epomaker)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum layers {
|
||||
_BL = 0,
|
||||
_FL,
|
||||
_MBL,
|
||||
_MFL,
|
||||
_FBL,
|
||||
};
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_BL] = LAYOUT( /* Base */
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 , KC_F12, KC_DEL, KC_HOME, KC_END , KC_PSCR, KC_PAUSE,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT , KC_PGDN, KC_P4, KC_P5, KC_P6,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT),
|
||||
|
||||
[_FL] = LAYOUT( /* Base */
|
||||
KC_ESC, KC_MYCM, KC_WHOM, KC_CALC, KC_MAIL, KC_MSEL, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, KC_HOME, KC_END , KC_PSCR, KC_PAUSE,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, EE_CLR, KC_INS, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, RM_TOGG, KC_Y, KC_U, KC_I, MO(_FBL), KC_P, KC_LBRC, KC_RBRC, RM_HUEU, KC_PGUP, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
KC_CAPS, KC_NO, TO(_MBL), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, MO(_FBL), KC_SCLN, KC_QUOT, RM_NEXT, KC_PGDN, KC_P4, KC_P5, KC_P6,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, RM_VALU, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||
KC_LCTL, GU_TOGG, KC_LALT, KC_SPC, KC_RALT, _______, RM_SPDD, RM_VALD, RM_SPDU, KC_P0, KC_PDOT),
|
||||
|
||||
[_MBL] = LAYOUT( /* Base */
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 , KC_F12, KC_DEL, KC_HOME, KC_END , KC_PSCR, KC_PAUSE,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT , KC_PGDN, KC_P4, KC_P5, KC_P6,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(_MFL), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT),
|
||||
|
||||
[_MFL] = LAYOUT( /* Base */
|
||||
KC_ESC, KC_BRID, KC_BRIU, USE_TASK, USE_PRO, KC_F5, KC_F6, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, KC_HOME, KC_END , KC_PSCR, KC_PAUSE,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, EE_CLR, KC_INS, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, RM_TOGG, KC_Y, KC_U, KC_I, MO(_FBL), KC_P, KC_LBRC, KC_RBRC, RM_HUEU, KC_PGUP, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
KC_CAPS, TO(_BL), KC_NO, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, MO(_FBL), KC_SCLN, KC_QUOT, RM_NEXT, KC_PGDN, KC_P4, KC_P5, KC_P6,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, RM_VALU, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, _______, RM_SPDD, RM_VALD, RM_SPDU, KC_P0, KC_PDOT ),
|
||||
[_FBL] = LAYOUT( /* Base */
|
||||
QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)
|
||||
};
|
||||
|
||||
#ifdef ENCODER_MAP_ENABLE
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
||||
[0] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
|
||||
[1] = {ENCODER_CCW_CW(_______, _______)},
|
||||
[2] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
|
||||
[3] = {ENCODER_CCW_CW(_______, _______)},
|
||||
[4] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
|
||||
|
||||
};
|
||||
#endif
|
||||
// clang-format on
|
||||
@@ -1,38 +0,0 @@
|
||||
// Copyright 2024 Epomaker (@Epomaker)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef WB32_USB_HOST_WAKEUP_DURATION
|
||||
#define WB32_USB_HOST_WAKEUP_DURATION 2
|
||||
|
||||
#undef WB32_SERIAL_USE_UART1
|
||||
#define WB32_SERIAL_USE_UART1 TRUE
|
||||
|
||||
#undef WB32_SPI_USE_SPIM2
|
||||
#define WB32_SPI_USE_SPIM2 TRUE
|
||||
|
||||
#undef WB32_SPI_USE_QSPI
|
||||
#define WB32_SPI_USE_QSPI TRUE
|
||||
|
||||
// The interrupt priority of the WS2812 driver must be higher than that of other SPI devices.
|
||||
#undef WB32_SPI_SPIM2_IRQ_PRIORITY
|
||||
#define WB32_SPI_SPIM2_IRQ_PRIORITY 9
|
||||
|
||||
#undef WB32_SPI_QSPI_IRQ_PRIORITY
|
||||
#define WB32_SPI_QSPI_IRQ_PRIORITY 10
|
||||
|
||||
#undef WB32_SERIAL_UART1_PRIORITY
|
||||
#define WB32_SERIAL_UART1_PRIORITY 8
|
||||
|
||||
/* system clock set to 96Mhz */
|
||||
#undef WB32_PLLDIV_VALUE
|
||||
#define WB32_PLLDIV_VALUE 2
|
||||
|
||||
#undef WB32_PLLMUL_VALUE
|
||||
#define WB32_PLLMUL_VALUE 16
|
||||
|
||||
#undef WB32_USBPRE
|
||||
#define WB32_USBPRE WB32_USBPRE_DIV2
|
||||
@@ -1,3 +0,0 @@
|
||||
RGB_MATRIX_CUSTOM_USER = yes
|
||||
include keyboards/epomaker/galaxy100/rgb_record/rgb_record.mk
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
# Galaxy100
|
||||
|
||||
* Keyboard Maintainer: [Epomaker](https://github.com/Epomaker)
|
||||
* Hardware Supported: Galaxy100
|
||||
* Hardware Availability: Galaxy100
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make epomaker/galaxy100:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make epomaker/galaxy100:default:flash
|
||||
|
||||
To reset the board into bootloader mode, do one of the following:
|
||||
|
||||
* Hold the Reset switch mounted on the bottom side of the PCB while connecting the USB cable
|
||||
* Hold the Escape key while connecting the USB cable (also erases persistent settings)
|
||||
* Fn+R_Shift+Esc will reset the board to bootloader mode if you have flashed the default QMK keymap
|
||||
|
||||
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).
|
||||
@@ -1,18 +0,0 @@
|
||||
// Copyright 2024 Epomaker (@Epomaker)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#ifdef ENABLE_RGB_MATRIX_RGBR_PLAY
|
||||
RGB_MATRIX_EFFECT(RGBR_PLAY)
|
||||
# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
|
||||
|
||||
bool RGBR_PLAY(effect_params_t *params) {
|
||||
RGB_MATRIX_USE_LIMITS(led_min, led_max);
|
||||
|
||||
extern void rgbrec_play(uint8_t led_min, uint8_t led_max);
|
||||
rgbrec_play(led_min, led_max);
|
||||
|
||||
return rgb_matrix_check_finished_leds(led_max);
|
||||
}
|
||||
|
||||
# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
|
||||
#endif
|
||||
@@ -1,300 +0,0 @@
|
||||
// Copyright 2024 Epomaker (@Epomaker)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "rgb_record.h"
|
||||
#include "rgb_matrix.h"
|
||||
#include "eeprom.h"
|
||||
#include "nvm_eeprom_eeconfig_internal.h" // expose EECONFIG_USER_DATABLOCK
|
||||
#include "quantum.h" // for MATRIX_ROWS, MATRIX_COLS, HSV, RGB, etc.
|
||||
#include "color.h" // for hsv_to_rgb function
|
||||
|
||||
#define RGBREC_STATE_ON 1
|
||||
#define RGBREC_STATE_OFF 0
|
||||
#define RGBREC_COLOR_NUM (sizeof(rgbrec_hs_lists) / sizeof(rgbrec_hs_lists[0]))
|
||||
#ifndef RGBREC_CHANNEL_NUM
|
||||
#define RGBREC_CHANNEL_NUM 1
|
||||
#endif
|
||||
typedef struct {
|
||||
uint8_t state;
|
||||
uint8_t channel;
|
||||
uint16_t value;
|
||||
} rgbrec_info_t;
|
||||
|
||||
typedef uint16_t (*rgbrec_effects_t)[MATRIX_COLS];
|
||||
|
||||
rgbrec_effects_t p_rgbrec_effects = NULL;
|
||||
|
||||
static uint16_t rgbrec_hs_lists[] = RGB_RECORD_HS_LISTS;
|
||||
static uint8_t rgbrec_buffer[MATRIX_ROWS * MATRIX_COLS * 2];
|
||||
|
||||
//clang-format off
|
||||
static const uint8_t rgbmatrix_buff[] = {13, 15, 16, 24, 25, 26, 29, 37, 33, 34, 35, 43, 2, 5, 6, 9};
|
||||
static const uint8_t sixth_gear_buff[] = {6, 13, 15, 16, 25, 26, 34};
|
||||
static uint8_t rgb_hsvs[RGB_HSV_MAX][2] = {
|
||||
{0, 255},
|
||||
{85, 255},
|
||||
{170, 255},
|
||||
{43, 255},
|
||||
{191, 255},
|
||||
{128, 255},
|
||||
{4, 80 },
|
||||
};
|
||||
|
||||
//clang-format on
|
||||
static rgbrec_info_t rgbrec_info = {
|
||||
.state = RGBREC_STATE_OFF,
|
||||
.channel = 0,
|
||||
.value = 0xFF,
|
||||
};
|
||||
|
||||
static uint8_t rgbrec_buffer[MATRIX_ROWS * MATRIX_COLS * 2];
|
||||
|
||||
static bool find_matrix_row_col(uint8_t index, uint8_t *row, uint8_t *col) {
|
||||
uint8_t i, j;
|
||||
|
||||
for (i = 0; i < MATRIX_ROWS; i++) {
|
||||
for (j = 0; j < MATRIX_COLS; j++) {
|
||||
if (g_led_config.matrix_co[i][j] != NO_LED) {
|
||||
if (g_led_config.matrix_co[i][j] == index) {
|
||||
*row = i;
|
||||
*col = j;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline RGB hs_to_rgb(uint8_t h, uint8_t s) {
|
||||
|
||||
if ((h == 0) && (s == 0)) {
|
||||
return hsv_to_rgb((HSV){0, 0, 0});
|
||||
} else if ((h == 1) && (s == 1)) {
|
||||
return hsv_to_rgb((HSV){0, 0, rgbrec_info.value});
|
||||
} else {
|
||||
return hsv_to_rgb((HSV){h, s, rgbrec_info.value});
|
||||
}
|
||||
}
|
||||
|
||||
void rgbrec_init(uint8_t channel) {
|
||||
|
||||
p_rgbrec_effects = (rgbrec_effects_t)rgbrec_buffer;
|
||||
rgbrec_info.state = RGBREC_STATE_OFF;
|
||||
rgbrec_info.channel = channel;
|
||||
rgbrec_info.value = rgb_matrix_get_val();
|
||||
|
||||
rgbrec_read_current_channel(rgbrec_info.channel);
|
||||
}
|
||||
|
||||
bool rgbrec_show(uint8_t channel) {
|
||||
|
||||
if (channel >= RGBREC_CHANNEL_NUM) {
|
||||
return false;
|
||||
}
|
||||
|
||||
rgbrec_info.channel = channel;
|
||||
rgbrec_read_current_channel(rgbrec_info.channel);
|
||||
|
||||
if (rgb_matrix_get_mode() != RGB_MATRIX_CUSTOM_RGBR_PLAY) {
|
||||
rgb_matrix_mode(RGB_MATRIX_CUSTOM_RGBR_PLAY);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool rgbrec_start(uint8_t channel) {
|
||||
|
||||
if (channel >= RGBREC_CHANNEL_NUM) {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (rgbrec_info.state == RGBREC_STATE_OFF) {
|
||||
rgbrec_info.state = RGBREC_STATE_ON;
|
||||
rgbrec_info.channel = channel;
|
||||
rgbrec_read_current_channel(rgbrec_info.channel);
|
||||
if (rgb_matrix_get_mode() != RGB_MATRIX_CUSTOM_RGBR_PLAY) {
|
||||
rgb_matrix_mode(RGB_MATRIX_CUSTOM_RGBR_PLAY);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void rgbrec_update_current_channel(uint8_t channel) {
|
||||
uint32_t addr = 0;
|
||||
|
||||
if (channel >= RGBREC_CHANNEL_NUM) {
|
||||
return;
|
||||
}
|
||||
|
||||
addr = (uint32_t)(RGBREC_EECONFIG_ADDR) + (channel * sizeof(rgbrec_buffer));
|
||||
eeprom_update_block(rgbrec_buffer, (void *)addr, sizeof(rgbrec_buffer));
|
||||
}
|
||||
|
||||
bool rgbrec_end(uint8_t channel) {
|
||||
|
||||
if (channel >= RGBREC_CHANNEL_NUM) {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((rgbrec_info.state == RGBREC_STATE_ON) && (channel == rgbrec_info.channel)) {
|
||||
rgbrec_info.state = RGBREC_STATE_OFF;
|
||||
rgbrec_update_current_channel(rgbrec_info.channel);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline void rgb_matrix_set_hs(int index, uint16_t hs) {
|
||||
|
||||
RGB rgb = hs_to_rgb(HS_GET_H(hs), HS_GET_S(hs));
|
||||
rgb_matrix_set_color(index, rgb.r, rgb.g, rgb.b);
|
||||
}
|
||||
|
||||
void rgbrec_play(uint8_t led_min, uint8_t led_max) {
|
||||
uint8_t row = 0xFF, col = 0xFF;
|
||||
uint16_t hs_color;
|
||||
|
||||
rgbrec_info.value = rgb_matrix_get_val();
|
||||
|
||||
for (uint8_t i = led_min; i < led_max; i++) {
|
||||
if (find_matrix_row_col(i, &row, &col)) {
|
||||
if (p_rgbrec_effects != NULL) {
|
||||
hs_color = p_rgbrec_effects[row][col];
|
||||
rgb_matrix_set_hs(i, hs_color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void rgbrec_set_close_all(uint8_t h, uint8_t s, uint8_t v) {
|
||||
|
||||
if (!h && !s && !v) {
|
||||
memset(rgbrec_buffer, 0, sizeof(rgbrec_buffer));
|
||||
} else {
|
||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
|
||||
rgbrec_buffer[row * MATRIX_COLS * col * 2] = s;
|
||||
rgbrec_buffer[(row * MATRIX_COLS * col * 2) + 1] = v;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void rgbrec_read_current_channel(uint8_t channel) {
|
||||
uint32_t addr = 0;
|
||||
|
||||
if (channel >= RGBREC_CHANNEL_NUM) {
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
addr = (uint32_t)(RGBREC_EECONFIG_ADDR) + (channel * sizeof(rgbrec_buffer));
|
||||
eeprom_read_block(rgbrec_buffer, (void *)addr, sizeof(rgbrec_buffer));
|
||||
}
|
||||
|
||||
bool rgbrec_is_started(void) {
|
||||
|
||||
return (rgbrec_info.state == RGBREC_STATE_ON);
|
||||
}
|
||||
|
||||
static inline void cycle_rgb_next_color(uint8_t row, uint8_t col) {
|
||||
|
||||
if (p_rgbrec_effects == NULL) {
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
for (uint8_t index = 0; index < RGBREC_COLOR_NUM; index++) {
|
||||
if (rgbrec_hs_lists[index] == p_rgbrec_effects[row][col]) {
|
||||
index = ((index + 1) % RGBREC_COLOR_NUM);
|
||||
p_rgbrec_effects[row][col] = rgbrec_hs_lists[index];
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
p_rgbrec_effects[row][col] = rgbrec_hs_lists[0];
|
||||
}
|
||||
|
||||
bool rgbrec_register_record(uint16_t keycode, keyrecord_t *record) {
|
||||
(void)keycode;
|
||||
|
||||
if (rgbrec_info.state == RGBREC_STATE_ON) {
|
||||
cycle_rgb_next_color(record->event.key.row, record->event.key.col);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void eeconfig_init_user_datablock(void) {
|
||||
|
||||
}
|
||||
|
||||
uint8_t find_index(void) {
|
||||
|
||||
for (uint8_t index = 0; index < (sizeof(rgbmatrix_buff) / sizeof(rgbmatrix_buff[0])); index++) {
|
||||
if (rgb_matrix_get_mode() == rgbmatrix_buff[index]) {
|
||||
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void record_rgbmatrix_increase(uint8_t *last_mode) {
|
||||
uint8_t index;
|
||||
|
||||
index = find_index();
|
||||
if (rgbrec_info.state != RGBREC_STATE_ON) {
|
||||
index = (index + 1) % (sizeof(rgbmatrix_buff) / sizeof(rgbmatrix_buff[0]));
|
||||
}
|
||||
*last_mode = rgbmatrix_buff[index];
|
||||
rgb_matrix_mode(rgbmatrix_buff[index]);
|
||||
record_color_hsv(false);
|
||||
}
|
||||
|
||||
uint8_t record_color_read_data(void) {
|
||||
uint8_t hs_mode = find_index();
|
||||
const uint8_t *ptr = (const uint8_t *)(((uint32_t)CONFINFO_EECONFIG_ADDR + 4) + hs_mode);
|
||||
uint8_t hs_c = eeprom_read_byte(ptr);
|
||||
|
||||
if (hs_c > RGB_HSV_MAX) {
|
||||
return 0;
|
||||
} else {
|
||||
return hs_c;
|
||||
}
|
||||
}
|
||||
|
||||
void record_color_hsv(bool status) {
|
||||
uint8_t temp;
|
||||
uint8_t rgb_hsv_index = record_color_read_data();
|
||||
|
||||
for (uint8_t i = 0; i < (sizeof(sixth_gear_buff) / sizeof(sixth_gear_buff[0])); i++) {
|
||||
if (rgb_matrix_get_mode() == sixth_gear_buff[i]) {
|
||||
temp = RGB_HSV_MAX - 1;
|
||||
break;
|
||||
} else if (i == (sizeof(sixth_gear_buff) / sizeof(sixth_gear_buff[0]) - 1)) {
|
||||
temp = RGB_HSV_MAX;
|
||||
}
|
||||
}
|
||||
|
||||
if (status) rgb_hsv_index = (rgb_hsv_index + 1) % temp;
|
||||
|
||||
rgb_matrix_sethsv(rgb_hsvs[rgb_hsv_index][0], rgb_hsvs[rgb_hsv_index][1], rgb_matrix_get_val());
|
||||
|
||||
uint8_t *ptr = (uint8_t *)(((uint32_t)CONFINFO_EECONFIG_ADDR + 4) + find_index());
|
||||
eeprom_write_byte(ptr, rgb_hsv_index);
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
/* Copyright (C) 2023 Westberry Technology Corp., Ltd
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <math.h>
|
||||
#include "color.h"
|
||||
#include "eeprom.h"
|
||||
#include "quantum.h"
|
||||
|
||||
#define HS_GET_H(value) ((uint8_t)(value >> 8))
|
||||
#define HS_GET_S(value) ((uint8_t)(value & 0xFF))
|
||||
|
||||
/* HSV Color bit[15:8] H bit[7:0] S */
|
||||
#define HS_AZURE 0x8466
|
||||
#define HS_BLACK 0x0000
|
||||
#define HS_BLUE 0xAAFF
|
||||
#define HS_CHARTREUSE 0x40FF
|
||||
#define HS_CORAL 0x0BB0
|
||||
#define HS_GOLD 0x24FF
|
||||
#define HS_GOLDENROD 0x1EDA
|
||||
#define HS_GREEN 0x55FF
|
||||
#define HS_MAGENTA 0xD5FF
|
||||
#define HS_ORANGE 0x15FF
|
||||
#define HS_PINK 0xEA80
|
||||
#define HS_PURPLE 0xBFFF
|
||||
#define HS_RED 0x00FF
|
||||
#define HS_CYAN 0x6AFF
|
||||
#define HS_TEAL 0x80FF
|
||||
#define HS_TURQUOISE 0x7B5A
|
||||
#define HS_WHITE 0x0101
|
||||
#define HS_YELLOW 0x2BFF
|
||||
|
||||
#define LASET_MOD_NO 0xFF
|
||||
#define RGB_HSV_MAX 7
|
||||
#define ________ HS_BLACK
|
||||
|
||||
#ifndef RGB_RECORD_HS_LISTS
|
||||
# define RGB_RECORD_HS_LISTS \
|
||||
{HS_BLACK, HS_RED, HS_GREEN, HS_BLUE, HS_YELLOW, HS_PURPLE, HS_CYAN, HS_WHITE}
|
||||
#endif
|
||||
|
||||
#define RGB_MATRIX_BAT_VAL 150
|
||||
|
||||
#define IM_BAT_REQ_LEVEL1_VAL 50
|
||||
#define IM_BAT_REQ_LEVEL1_COLOR 0x00, RGB_MATRIX_BAT_VAL, 0x00
|
||||
|
||||
#define IM_BAT_REQ_LEVEL2_VAL 30
|
||||
#define IM_BAT_REQ_LEVEL2_COLOR 0x00, RGB_MATRIX_BAT_VAL, 0x00
|
||||
|
||||
#define IM_BAT_REQ_LEVEL3_COLOR RGB_MATRIX_BAT_VAL, 0x00, 0x00
|
||||
|
||||
void rgbrec_read_current_channel(uint8_t channel);
|
||||
void rgbrec_set_close_all(uint8_t h, uint8_t s, uint8_t v);
|
||||
void rgbrec_play(uint8_t led_min, uint8_t led_max);
|
||||
bool rgbrec_end(uint8_t channel);
|
||||
bool rgbrec_start(uint8_t channel);
|
||||
bool rgbrec_show(uint8_t channel);
|
||||
void rgbrec_init(uint8_t channel);
|
||||
bool rgbrec_is_started(void);
|
||||
void eeconfig_init_user_datablock(void);
|
||||
bool rgbrec_register_record(uint16_t keycode, keyrecord_t *record);
|
||||
void record_rgbmatrix_increase(uint8_t *last_mode);
|
||||
void record_color_hsv(bool status);
|
||||
void query(void);
|
||||
@@ -1,3 +0,0 @@
|
||||
SRC += rgb_record/rgb_record.c
|
||||
|
||||
|
||||
Reference in New Issue
Block a user