Improved init methods
parent
7523a79169
commit
2eca61c761
|
@ -165,6 +165,8 @@ const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
|
||||||
void suspend_power_down_kb(void) {
|
void suspend_power_down_kb(void) {
|
||||||
|
@ -178,11 +180,8 @@ void suspend_wakeup_init_kb(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||||
/* driver
|
//{driver, R location, G location, B location}
|
||||||
* | R location
|
|
||||||
* | | G location
|
|
||||||
* | | | B location
|
|
||||||
* | | | | */
|
|
||||||
{0, C3_1, C2_1, C4_1}, // LED1 on right
|
{0, C3_1, C2_1, C4_1}, // LED1 on right
|
||||||
{0, C6_1, C5_1, C7_1}, // LED2
|
{0, C6_1, C5_1, C7_1}, // LED2
|
||||||
{0, C4_2, C3_2, C5_2}, // LED3
|
{0, C4_2, C3_2, C5_2}, // LED3
|
||||||
|
@ -271,12 +270,22 @@ led_config_t g_led_config = { {
|
||||||
4, 4, 4, 4, 4, 4,
|
4, 4, 4, 4, 4, 4,
|
||||||
4, 4, 1, 1, 1, 1
|
4, 4, 1, 1, 1, 1
|
||||||
} };
|
} };
|
||||||
|
#endif
|
||||||
|
|
||||||
void keyboard_post_init_kb(void) {
|
void keyboard_post_init_kb(void) {
|
||||||
|
|
||||||
|
// Start with matrix enabled
|
||||||
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
rgb_matrix_enable_noeeprom();
|
rgb_matrix_enable_noeeprom();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Start with backlight disabled
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
rgblight_disable_noeeprom();
|
||||||
|
#endif
|
||||||
|
|
||||||
keyboard_post_init_user();
|
keyboard_post_init_user();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
@ -326,7 +335,9 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
return process_record_user(keycode, record);
|
return process_record_user(keycode, record);
|
||||||
}
|
}
|
||||||
|
|
||||||
void eeconfig_init_kb(void) { // EEPROM is getting reset!
|
|
||||||
|
// EEPROM is getting reset!
|
||||||
|
void eeconfig_init_kb(void) {
|
||||||
keyboard_config.raw = 0;
|
keyboard_config.raw = 0;
|
||||||
keyboard_config.led_level = 4;
|
keyboard_config.led_level = 4;
|
||||||
keyboard_config.rgb_matrix_enable = true;
|
keyboard_config.rgb_matrix_enable = true;
|
||||||
|
|
|
@ -89,17 +89,6 @@ const uint8_t PROGMEM ledmap[][DRIVER_LED_TOTAL][3] = {
|
||||||
int current_lang = LANG_EN;
|
int current_lang = LANG_EN;
|
||||||
|
|
||||||
void keyboard_post_init_user(void) {
|
void keyboard_post_init_user(void) {
|
||||||
// Enable RGB key lights
|
|
||||||
rgb_matrix_enable_noeeprom();
|
|
||||||
|
|
||||||
// Set indicator LEDs to min brightness
|
|
||||||
ergodox_led_all_set(15);
|
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
|
||||||
// Disable RGB backlight
|
|
||||||
rgblight_disable_noeeprom();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//set_lang(LANG_EN);
|
//set_lang(LANG_EN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue