Skip to content

Commit b88052e

Browse files
Laurent MEUNIERLaurent MEUNIER
Laurent MEUNIER
authored and
Laurent MEUNIER
committed
Add desctructor to PwmOut
Issue ARMmbed#2017
1 parent 8d36877 commit b88052e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

hal/api/PwmOut.h

+8
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ class PwmOut {
6767
core_util_critical_section_exit();
6868
}
6969

70+
/** To Free up pwm pin.
71+
*/
72+
~PwmOut() {
73+
core_util_critical_section_enter();
74+
pwmout_free(&_pwm);
75+
core_util_critical_section_exit();
76+
}
77+
7078
/** Set the ouput duty-cycle, specified as a percentage (float)
7179
*
7280
* @param value A floating-point value representing the output duty-cycle,

0 commit comments

Comments
 (0)