Mercurial > hg > beaglert
comparison core/I2c_Codec.cpp @ 171:e63563507edd
Added command-line options for the PGA
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Mon, 28 Dec 2015 03:53:36 +0100 |
parents | 94751ad27fd6 |
children | 5f4408705eed |
comparison
equal
deleted
inserted
replaced
170:e80340fe527a | 171:e63563507edd |
---|---|
88 return 1; | 88 return 1; |
89 if(writeRegister(0x0D, 0x00)) // Headset / button press register A: disabled | 89 if(writeRegister(0x0D, 0x00)) // Headset / button press register A: disabled |
90 return 1; | 90 return 1; |
91 if(writeRegister(0x0E, 0x00)) // Headset / button press register B: disabled | 91 if(writeRegister(0x0E, 0x00)) // Headset / button press register B: disabled |
92 return 1; | 92 return 1; |
93 if(setPga(16, 0)) // Left ADC PGA gain control: not muted; 16dB | 93 //TODO: why are the next four lines, if uncommented, executed AFTER this method has returned? |
94 return 1; | 94 // if(setPga(16, 0)) // Left ADC PGA gain control: not muted; 16dB |
95 if(setPga(16, 1)) // Right ADC PGA gain control: not muted; 16dB | 95 // return 1; |
96 return 1; | 96 // if(setPga(16, 1)) // Right ADC PGA gain control: not muted; 16dB |
97 // return 1; | |
97 // if(writeRegister(0x0F, 0b01000000)) // Left ADC PGA gain control: not muted; 0x20 = 16dB | 98 // if(writeRegister(0x0F, 0b01000000)) // Left ADC PGA gain control: not muted; 0x20 = 16dB |
98 // return 1; | 99 // return 1; |
99 // if(writeRegister(0x10, 0b0)) // Right ADC PGA gain control: not muted; 0x20 = 16dB | 100 // if(writeRegister(0x10, 0b0)) // Right ADC PGA gain control: not muted; 0x20 = 16dB |
100 // return 1; | 101 // return 1; |
101 if(writeRegister(0x25, 0xC0)) // DAC power/driver register: DAC power on (left and right) | 102 if(writeRegister(0x25, 0xC0)) // DAC power/driver register: DAC power on (left and right) |