Hi Paul,
I was testing some CS42448 functions and found that some of the functions for .output() and .input() were blank!
Here is the missing code:
I was testing some CS42448 functions and found that some of the functions for .output() and .input() were blank!
Here is the missing code:
Code:
// Output channels defined as [1..8]
bool AudioControlCS42448::volumeInteger(int channel, uint32_t n)
{
write(CS42448_DAC_Channel_Mute, 0); // unmute all channels
return write(CS42448_DAC_Channel_Mute + channel -1, n); // set this channel
}
// Input channels defined as [1..6] - no volume control on EXT inputs 7/8
bool AudioControlCS42448::inputLevelInteger(int32_t n)
{
uint8_t data[6];
for (int i = 0; i < 6; i++)
data[i] = n;
return write(CS42448_AIN1_Volume_Control, data, 6); // set all channels (not 7 & 8)
}
bool AudioControlCS42448::inputLevelInteger(int channel, int32_t n)
{
return write(CS42448_AIN1_Volume_Control + channel -1, n); // set just this channel
}
Last edited: