Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some helpers to tidy up XAP #20235

Merged
merged 1 commit into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions quantum/audio/audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ static bool audio_initialized = false;
static bool audio_driver_stopped = true;
audio_config_t audio_config;

void eeconfig_update_audio_current(void) {
eeconfig_update_audio(audio_config.raw);
}

void audio_init(void) {
if (audio_initialized) {
return;
Expand Down
5 changes: 5 additions & 0 deletions quantum/audio/audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ typedef struct {

// public interface

/**
* @brief Save the current choices to the eeprom
*/
void eeconfig_update_audio_current(void);

/**
* @brief one-time initialization called by quantum/quantum.c
* @details usually done lazy, when some tones are to be played
Expand Down
4 changes: 4 additions & 0 deletions quantum/rgblight/rgblight.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,10 @@ void rgblight_disable_noeeprom(void) {
rgblight_set();
}

void rgblight_enabled_noeeprom(bool state) {
state ? rgblight_enable_noeeprom() : rgblight_disable_noeeprom();
}

bool rgblight_is_enabled(void) {
return rgblight_config.enable;
}
Expand Down
1 change: 1 addition & 0 deletions quantum/rgblight/rgblight.h
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ void rgblight_enable(void);
void rgblight_enable_noeeprom(void);
void rgblight_disable(void);
void rgblight_disable_noeeprom(void);
void rgblight_enabled_noeeprom(bool state);

/* hue, sat, val change */
void rgblight_increase_hue(void);
Expand Down