Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: DtPWM.h
- Revision:
- 3:d7b9697768d8
- Parent:
- 2:1ef7ff2f120e
- Child:
- 4:a490a36f1cb1
--- a/DtPWM.h Wed Mar 29 12:34:52 2017 +0000
+++ b/DtPWM.h Tue Apr 04 22:20:38 2017 +0000
@@ -40,16 +40,19 @@
/**
* Create a dtPWM object connected to channel 2 and 4, optionally to LED 2&4
*
- * @param led - false does not connect LEDs (default)
+ * @param ebaled - start pwm enabled, output as soon as object is created (default)
*/
- DtPWM(bool led = false);
- ~DtPWM();
-
+ DtPWM(bool enable = true);
/**
* enable pin outputs and start the timer
+ *
+ * @channel - determines which channels are enabled.
+ * 'h' for high (PWM1.2)
+ * 'l' for low (PWM1.4)
+ * 'a' for both (PWM1.2 & 1.4) (default)
*/
- void enable();
+ void enable(char channel = 'a');
/**
* set output pins to low as fast as possible and stop the timer