From c91bed14486974c78bdacf8f2014870ab6dba52e Mon Sep 17 00:00:00 2001 From: Henry Gabryjelski Date: Thu, 12 Mar 2020 22:50:41 -0700 Subject: [PATCH] Fix #458 Update HwPWM3 when it exists --- cores/nRF5/wiring_analog.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cores/nRF5/wiring_analog.cpp b/cores/nRF5/wiring_analog.cpp index a462fba2..570be9eb 100644 --- a/cores/nRF5/wiring_analog.cpp +++ b/cores/nRF5/wiring_analog.cpp @@ -50,9 +50,10 @@ extern "C" */ void analogWriteResolution( uint8_t res ) { - HwPWM0.setResolution(res); - HwPWM1.setResolution(res); - HwPWM2.setResolution(res); + for (int i = 0; isetResolution(res); + } } /**