firmware: swap left and right channel

This commit is contained in:
Julian Daube 2019-10-22 00:09:51 +02:00
parent 7498016107
commit 6bf50707c4

View File

@ -65,7 +65,10 @@ uint8_t bd_set_attenuation(I2C_HandleTypeDef * handle, uint8_t right_channel, ui
if ((attenuation_in_db&0x7F) > 87)
attenuation_in_db = BD_INF_ATTENUATION;
bd_write_reg(handle, 0x21 + right_channel, attenuation_in_db | 0x80);
if (right_channel)
right_channel = 1;
bd_write_reg(handle, 0x22 - right_channel, attenuation_in_db | 0x80);
return attenuation_in_db;
}