mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-12-15 06:10:53 +00:00
34 lines
826 B
C
34 lines
826 B
C
// Copyright 2022 QMK
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#include "quantum.h"
|
|
#include "xap.h"
|
|
|
|
#if ((defined(AUDIO_ENABLE)))
|
|
# include "audio.h"
|
|
|
|
extern audio_config_t audio_config;
|
|
|
|
bool xap_execute_get_audio_config(xap_token_t token) {
|
|
xap_route_audio_get_config_t ret;
|
|
|
|
ret.enable = audio_config.enable;
|
|
ret.clicky_enable = audio_config.clicky_enable;
|
|
|
|
return xap_respond_data(token, &ret, sizeof(ret));
|
|
}
|
|
|
|
bool xap_execute_set_audio_config(xap_token_t token, xap_route_audio_set_config_arg_t* arg) {
|
|
audio_config.enable = arg->enable;
|
|
audio_config.clicky_enable = arg->clicky_enable;
|
|
|
|
return xap_respond_success(token);
|
|
}
|
|
|
|
bool xap_execute_save_audio_config(xap_token_t token) {
|
|
eeconfig_update_audio_current();
|
|
|
|
return xap_respond_success(token);
|
|
}
|
|
#endif
|