Skip to content

Commit 1de5f31

Browse files
committed
DM: samd51 pwm fix for rebase
1 parent bcc44cc commit 1de5f31

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cores/arduino/wiring_analog.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,9 @@ void analogWrite(uint32_t pin, uint32_t value)
424424

425425
if ((attr & PIN_ATTR_PWM) == PIN_ATTR_PWM)
426426
{
427+
#ifndef __SAMD51__
427428
value = mapResolution(value, _writeResolution, 16);
429+
#endif
428430

429431
uint32_t tcNum = GetTCNumber(pinDesc.ulPWMChannel);
430432
uint8_t tcChannel = GetTCChannelNumber(pinDesc.ulPWMChannel);

0 commit comments

Comments
 (0)