We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 357fa90 + 27b0c34 commit fb4eb52Copy full SHA for fb4eb52
cores/nRF5/HardwarePWM.cpp
@@ -205,6 +205,15 @@ bool HardwarePWM::removePin(uint8_t pin)
205
return true;
206
}
207
208
+bool HardwarePWM::removeAllPins(void)
209
+{
210
+ for(int ch=0; ch<MAX_CHANNELS; ch++)
211
+ {
212
+ _set_psel(ch, 0xFFFFFFFFUL);
213
+ }
214
+ return true;
215
+}
216
+
217
bool HardwarePWM::writeChannel(uint8_t ch, uint16_t value, bool inverted)
218
{
219
VERIFY( ch < MAX_CHANNELS );
cores/nRF5/HardwarePWM.h
@@ -88,6 +88,9 @@ class HardwarePWM
88
// Remove a pin from PWM module
89
bool removePin (uint8_t pin);
90
91
+ // Remove all pins from PWM module
92
+ bool removeAllPins (void);
93
94
// Get the mapped channel of a pin
95
int pin2channel(uint8_t pin) const
96
0 commit comments