mirror of
https://github.com/qmk/qmk_firmware
synced 2024-11-11 06:29:15 +00:00
Disable input buffer for ADC
This commit is contained in:
parent
de29f986a7
commit
825be9d121
1 changed files with 4 additions and 0 deletions
|
@ -21,6 +21,10 @@ void battery_init(void)
|
|||
ADMUX = (1<<REFS1) | (1<<REFS0);
|
||||
ADCSRA = (1<<ADPS2) | (1<<ADPS1) | (1<<ADPS0);
|
||||
ADCSRA |= (1<<ADEN);
|
||||
// digital input buffer disable(24.9.5)
|
||||
DIDR0 = (1<<ADC0D) | (1<<ADC4D) | (1<<ADC5D) | (1<<ADC7D);
|
||||
DIDR1 = (1<<AIN0D);
|
||||
DIDR2 = (1<<ADC8D) | (1<<ADC9D) | (1<<ADC11D) | (1<<ADC12D) | (1<<ADC13D);
|
||||
|
||||
// ADC disable voltate divider(PF4)
|
||||
DDRF |= (1<<4);
|
||||
|
|
Loading…
Reference in a new issue