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 4bb465d commit f9b9223Copy full SHA for f9b9223
cores/arduino/sdk/core-implement/CommonAnalog.cpp
@@ -213,10 +213,11 @@ ap3_err_t analogWriteFrameWidth(uint32_t width){
213
214
ap3_err_t analogWriteFrequency(float freq){
215
uint32_t new_width = (uint32_t)(AP3_ANALOG_CLK_FREQ / freq);
216
+
217
if (new_width > AP3_MAX_ANALOG_WRITE_WIDTH){
218
return AP3_ERR;
219
}
- if (new_width < AP3_MAX_ANALOG_WRITE_WIDTH){
220
+ if (new_width < AP3_MIN_ANALOG_WRITE_WIDTH){
221
222
223
_analogWriteWidth = new_width;
0 commit comments