File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -368,10 +368,11 @@ void analogWrite(uint32_t pin, uint32_t value)
368368 if (pin == PIN_A0 ) { // Only 1 DAC on A0 (PA02)
369369#endif
370370
371- value = mapResolution (value , _writeResolution , _dacResolution );
372-
373371#if defined(__SAMD51__ )
374372
373+ value = mapResolution (value , _writeResolution , _dacResolution );
374+
375+
375376 uint8_t channel = (pin == PIN_A0 ? 0 : 1 );
376377
377378 pinPeripheral (pin , PIO_ANALOG );
@@ -557,7 +558,6 @@ void analogWrite(uint32_t pin, uint32_t value)
557558
558559 if (!tcEnabled [tcNum ]) {
559560 tcEnabled [tcNum ] = true;
560- value = mapResolution (value , _writeResolution , 16 );
561561 uint16_t GCLK_CLKCTRL_IDs [] = {
562562 GCLK_CLKCTRL_ID (GCM_TCC0_TCC1 ), // TCC0
563563 GCLK_CLKCTRL_ID (GCM_TCC0_TCC1 ), // TCC1
You can’t perform that action at this time.
0 commit comments