Skip to content

Commit

Permalink
[User] Move eeconfig_read_user to pre_init
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonschlack committed Jan 8, 2020
1 parent 169abea commit a80f883
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions users/brandonschlack/brandonschlack.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ void eeconfig_init_user(void) {
eeconfig_update_user(user_config.raw);
}

__attribute__((weak)) void keyboard_pre_init_keymap(void) {}

void keyboard_pre_init_user(void) {
// Read the user config from EEPROM
user_config.raw = eeconfig_read_user();
keyboard_pre_init_keymap();
}

__attribute__((weak))
void matrix_init_keymap(void){ }

Expand All @@ -29,8 +37,6 @@ void keyboard_post_init_keymap(void){ }
* calls RGB init if RGBs enabled
*/
void keyboard_post_init_user(void){
// Read the user config from EEPROM
user_config.raw = eeconfig_read_user();
// Do RGB things if RGBs enabled
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
keyboard_post_init_rgb();
Expand Down
1 change: 1 addition & 0 deletions users/brandonschlack/brandonschlack.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ typedef union {
} user_config_t;
extern user_config_t user_config;

void keyboard_pre_init_keymap(void);
void matrix_init_keymap(void);
void keyboard_post_init_keymap(void);
void shutdown_keymap(void);
Expand Down

0 comments on commit a80f883

Please sign in to comment.