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.
1 parent 0ea975e commit a95d23eCopy full SHA for a95d23e
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
@@ -94,6 +94,9 @@ class HardwarePWM
94
// Remove a pin from PWM module
95
bool removePin (uint8_t pin);
96
97
+ // Remove all pins from PWM module
98
+ bool removeAllPins (void);
99
100
// Get the mapped channel of a pin
101
int pin2channel(uint8_t pin) const
102
0 commit comments