diff options
author | tmk <hasu@tmk-kbd.com> | 2014-12-02 22:47:59 +0900 |
---|---|---|
committer | tmk <hasu@tmk-kbd.com> | 2015-01-15 17:08:48 +0900 |
commit | 825be9d121a9c698bf60bbdc384f2eeaf66f60d0 (patch) | |
tree | 57408c614d911d0862b5d10b838beab5243a2389 /keyboard/hhkb_rn42/rn42 | |
parent | de29f986a73860abfa930cd1b91cec60b02ee7a7 (diff) | |
download | firmware-825be9d121a9c698bf60bbdc384f2eeaf66f60d0.tar.gz firmware-825be9d121a9c698bf60bbdc384f2eeaf66f60d0.tar.bz2 firmware-825be9d121a9c698bf60bbdc384f2eeaf66f60d0.zip |
Disable input buffer for ADC
Diffstat (limited to 'keyboard/hhkb_rn42/rn42')
-rw-r--r-- | keyboard/hhkb_rn42/rn42/battery.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/keyboard/hhkb_rn42/rn42/battery.c b/keyboard/hhkb_rn42/rn42/battery.c index 0320e1baf..720d63beb 100644 --- a/keyboard/hhkb_rn42/rn42/battery.c +++ b/keyboard/hhkb_rn42/rn42/battery.c @@ -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); |