mirror of
https://github.com/firewalkwithm3/qmk_firmware.git
synced 2024-11-22 11:30:30 +08:00
Add some helpers to tidy up XAP (#20235)
This commit is contained in:
parent
9c3c159286
commit
6540b31d71
|
@ -112,6 +112,10 @@ static bool audio_initialized = false;
|
||||||
static bool audio_driver_stopped = true;
|
static bool audio_driver_stopped = true;
|
||||||
audio_config_t audio_config;
|
audio_config_t audio_config;
|
||||||
|
|
||||||
|
void eeconfig_update_audio_current(void) {
|
||||||
|
eeconfig_update_audio(audio_config.raw);
|
||||||
|
}
|
||||||
|
|
||||||
void audio_init(void) {
|
void audio_init(void) {
|
||||||
if (audio_initialized) {
|
if (audio_initialized) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -63,6 +63,11 @@ typedef struct {
|
||||||
|
|
||||||
// public interface
|
// 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
|
* @brief one-time initialization called by quantum/quantum.c
|
||||||
* @details usually done lazy, when some tones are to be played
|
* @details usually done lazy, when some tones are to be played
|
||||||
|
|
|
@ -422,6 +422,10 @@ void rgblight_disable_noeeprom(void) {
|
||||||
rgblight_set();
|
rgblight_set();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void rgblight_enabled_noeeprom(bool state) {
|
||||||
|
state ? rgblight_enable_noeeprom() : rgblight_disable_noeeprom();
|
||||||
|
}
|
||||||
|
|
||||||
bool rgblight_is_enabled(void) {
|
bool rgblight_is_enabled(void) {
|
||||||
return rgblight_config.enable;
|
return rgblight_config.enable;
|
||||||
}
|
}
|
||||||
|
|
|
@ -321,6 +321,7 @@ void rgblight_enable(void);
|
||||||
void rgblight_enable_noeeprom(void);
|
void rgblight_enable_noeeprom(void);
|
||||||
void rgblight_disable(void);
|
void rgblight_disable(void);
|
||||||
void rgblight_disable_noeeprom(void);
|
void rgblight_disable_noeeprom(void);
|
||||||
|
void rgblight_enabled_noeeprom(bool state);
|
||||||
|
|
||||||
/* hue, sat, val change */
|
/* hue, sat, val change */
|
||||||
void rgblight_increase_hue(void);
|
void rgblight_increase_hue(void);
|
||||||
|
|
Loading…
Reference in a new issue