diff options
author | tmk <hasu@tmk-kbd.com> | 2014-12-03 14:22:10 +0900 |
---|---|---|
committer | tmk <hasu@tmk-kbd.com> | 2015-01-15 17:08:48 +0900 |
commit | 86f82dd02db577cd658ca4284cae15e9664db0f2 (patch) | |
tree | 644c507981cc1e81f7f453bf9adca32fc94b894f /keyboard | |
parent | 2d7973fc3fa27b74379ba08392e2487e208b770a (diff) | |
download | qmk_firmware-86f82dd02db577cd658ca4284cae15e9664db0f2.tar.gz qmk_firmware-86f82dd02db577cd658ca4284cae15e9664db0f2.zip |
Add wait for charging capacitance of ADC S/H
Diffstat (limited to 'keyboard')
-rw-r--r-- | keyboard/hhkb_rn42/rn42/battery.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/keyboard/hhkb_rn42/rn42/battery.c b/keyboard/hhkb_rn42/rn42/battery.c index 34aa18446c..7e868c9646 100644 --- a/keyboard/hhkb_rn42/rn42/battery.c +++ b/keyboard/hhkb_rn42/rn42/battery.c @@ -92,6 +92,7 @@ uint16_t battery_voltage(void) volatile uint16_t bat; ADCSRA |= (1<<ADEN); + _delay_ms(1); // wait for charging S/H capacitance ADCSRA |= (1<<ADSC); while (ADCSRA & (1<<ADSC)) ; |