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 0a3fa54 commit acc62cfCopy full SHA for acc62cf
cores/arduino/wiring_analog.c
@@ -119,8 +119,8 @@ void analogWriteResolution(int res)
119
{
120
if ((res > 0) && (res <= 32)) {
121
_writeResolution = res;
122
- if (_writeResolution > MAX_ADC_RESOLUTION) {
123
- _internalWriteResolution = MAX_ADC_RESOLUTION;
+ if (_writeResolution > MAX_PWM_RESOLUTION) {
+ _internalWriteResolution = MAX_PWM_RESOLUTION;
124
} else {
125
_internalWriteResolution = _writeResolution;
126
}
0 commit comments