Skip to content

Commit c7fa463

Browse files
committed
DM: fix pwm?
1 parent c629896 commit c7fa463

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cores/arduino/wiring_analog.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy