/* Sets higher or lower the codec volume level.  */
static uint32_t Codec_VolumeCtrl(uint8_t Volume)
/* Sets higher or lower the codec volume level.  */
static uint32_t Codec_VolumeCtrl(uint8_t Volume)
{
  uint32_t counter = 0;
  if (Volume > 0xE6)
  {
    counter += Codec_WriteRegister(0x20, Volume - 0xE7); 
    counter += Codec_WriteRegister(0x21, Volume - 0xE7);     
  }
  else
  {
    counter += Codec_WriteRegister(0x20, Volume + 0x19); 
    counter += Codec_WriteRegister(0x21, Volume + 0x19); 
  }
  return counter;  
}