Commit 101e4a48 authored by Sandeep Mistry's avatar Sandeep Mistry Committed by GitHub

Merge pull request #188 from dsanders11/pwm-polarity

Use falling edge polarity for PWM to match standard Arduino
parents d21e2d4c b619597a
...@@ -222,7 +222,7 @@ void analogWrite( uint32_t ulPin, uint32_t ulValue ) ...@@ -222,7 +222,7 @@ void analogWrite( uint32_t ulPin, uint32_t ulValue )
for (int i = 0; i < PWM_COUNT; i++) { for (int i = 0; i < PWM_COUNT; i++) {
if (pwmChannelPins[i] == 0xFFFFFFFF || pwmChannelPins[i] == ulPin) { if (pwmChannelPins[i] == 0xFFFFFFFF || pwmChannelPins[i] == ulPin) {
pwmChannelPins[i] = ulPin; pwmChannelPins[i] = ulPin;
pwmChannelSequence[i] = ulValue; pwmChannelSequence[i] = ulValue | bit(15);
NRF_PWM_Type* pwm = pwms[i]; NRF_PWM_Type* pwm = pwms[i];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment