gatt-service/aics: move index to audio_input_control_service_server_t

This commit is contained in:
Milanka Ringwald 2022-01-18 15:33:51 +01:00
parent 847bcf468a
commit 1a8039c1e1
2 changed files with 4 additions and 5 deletions

View File

@ -136,7 +136,7 @@ static void aics_emit_mute_mode(audio_input_control_service_server_t * aics){
event[pos++] = GATTSERVICE_SUBEVENT_AICS_MUTE_MODE;
little_endian_store_16(event, pos, aics->con_handle);
pos += 2;
event[pos++] = aics->info.index;
event[pos++] = aics->index;
event[pos++] = aics->info.audio_input_state.mute_mode == AICS_MUTE_MODE_MUTED ? 1 : 0;
(*aics->info.packet_handler)(HCI_EVENT_PACKET, 0, event, sizeof(event));
}
@ -151,7 +151,7 @@ static void aics_emit_gain_mode(audio_input_control_service_server_t * aics){
event[pos++] = GATTSERVICE_SUBEVENT_AICS_GAIN_MODE;
little_endian_store_16(event, pos, aics->con_handle);
pos += 2;
event[pos++] = aics->info.index;
event[pos++] = aics->index;
event[pos++] = aics->info.audio_input_state.gain_mode == AICS_GAIN_MODE_MANUAL ? 1 : 0;
(*aics->info.packet_handler)(HCI_EVENT_PACKET, 0, event, sizeof(event));
}
@ -166,7 +166,7 @@ static void aics_emit_gain(audio_input_control_service_server_t * aics){
event[pos++] = GATTSERVICE_SUBEVENT_AICS_GAIN_CHANGED;
little_endian_store_16(event, pos, aics->con_handle);
pos += 2;
event[pos++] = aics->info.index;
event[pos++] = aics->index;
event[pos++] = (uint8_t)aics->info.audio_input_state.gain_setting_db;
(*aics->info.packet_handler)(HCI_EVENT_PACKET, 0, event, sizeof(event));
}

View File

@ -104,8 +104,6 @@ typedef struct {
} aics_gain_settings_properties_t;
typedef struct {
uint8_t index;
aics_audio_input_state_t audio_input_state;
aics_gain_settings_properties_t gain_settings_properties;
@ -125,6 +123,7 @@ typedef struct {
// service
uint16_t start_handle;
uint16_t end_handle;
uint8_t index;
aics_info_t info;