Skip to content

Commit 8a1dff3

Browse files
authored
Merge pull request #468 from henrygab/FIX__458
Fix #458
2 parents 768be05 + c91bed1 commit 8a1dff3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cores/nRF5/wiring_analog.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ extern "C"
5050
*/
5151
void analogWriteResolution( uint8_t res )
5252
{
53-
HwPWM0.setResolution(res);
54-
HwPWM1.setResolution(res);
55-
HwPWM2.setResolution(res);
53+
for (int i = 0; i<HWPWM_MODULE_NUM; i++)
54+
{
55+
HwPWMx[i]->setResolution(res);
56+
}
5657
}
5758

5859
/**

0 commit comments

Comments
 (0)