We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3912d9d commit 806c330Copy full SHA for 806c330
cores/arduino/wiring_analog.c
@@ -1,5 +1,5 @@
1
/*
2
- Copyright (c) 2014 Arduino. All right reserved.
+ Copyright (c) 2014 Arduino LLC. All right reserved.
3
4
This library is free software; you can redistribute it and/or
5
modify it under the terms of the GNU Lesser General Public
@@ -57,7 +57,6 @@ static void syncTCC(Tcc* TCCx) {
57
void analogReadResolution( int res )
58
{
59
_readResolution = res ;
60
- syncADC();
61
if (res > 10)
62
63
ADC->CTRLB.bit.RESSEL = ADC_CTRLB_RESSEL_12BIT_Val;
@@ -73,6 +72,7 @@ void analogReadResolution( int res )
73
72
ADC->CTRLB.bit.RESSEL = ADC_CTRLB_RESSEL_8BIT_Val;
74
_ADCResolution = 8;
75
}
+ syncADC();
76
77
78
void analogWriteResolution( int res )
0 commit comments