Browse Source

Add adc_hpf() to allow control of ADC high pass filter.

unsigned short .adc_hpf(uint8_t bypass, uint8_t freeze);
unsigned short .adc_hpf(uint8_t bypass);
bypass & freeze as defined on page 34 of the SGTL5000 datasheet.
dds
robsoles 11 years ago
parent
commit
27ed288398
2 changed files with 13 additions and 0 deletions
  1. +11
    -0
      control_sgtl5000.cpp
  2. +2
    -0
      control_sgtl5000.h

+ 11
- 0
control_sgtl5000.cpp View File

return modify(CHIP_DAC_VOL,m,65535); return modify(CHIP_DAC_VOL,m,65535);
} }


unsigned short AudioControlSGTL5000::adc_hpf(uint8_t bypass, uint8_t freeze)
{
return modify(CHIP_ADCDAC_CTRL, (freeze&1)<<1|bypass&1,3);
}

unsigned short AudioControlSGTL5000::adc_hpf(uint8_t bypass)
{
return modify(CHIP_ADCDAC_CTRL, bypass&1,1);
}


// DAP_CONTROL // DAP_CONTROL
unsigned short AudioControlSGTL5000::dap_mix_enable(uint8_t n) unsigned short AudioControlSGTL5000::dap_mix_enable(uint8_t n)
{ {

+ 2
- 0
control_sgtl5000.h View File

unsigned short lo_lvl(uint8_t left, uint8_t right); unsigned short lo_lvl(uint8_t left, uint8_t right);
unsigned short dac_vol(float n); unsigned short dac_vol(float n);
unsigned short dac_vol(float left, float right); unsigned short dac_vol(float left, float right);
unsigned short adc_hpf(uint8_t bypass, uint8_t freeze);
unsigned short adc_hpf(uint8_t bypass);
unsigned short dap_mix_enable(uint8_t n); unsigned short dap_mix_enable(uint8_t n);
unsigned short dap_enable(uint8_t n); unsigned short dap_enable(uint8_t n);
unsigned short dap_enable(void); unsigned short dap_enable(void);

Loading…
Cancel
Save