Skip to content

Commit 236194f

Browse files
committed
add: PwmOut::read_pulsewitdth_us() for compatibility
1 parent 7fe679c commit 236194f

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

drivers/include/drivers/PwmOut.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ class PwmOut {
137137
*/
138138
int read_pulsewidth_us();
139139

140+
/** Read the PWM pulsewidth
141+
* @returns
142+
* The PWM pulsewith, specified in microseconds (int)
143+
*/
144+
MBED_DEPRECATED("use read_pulsewidth_us() instead")
145+
int read_pulsewitdth_us();
146+
140147
/** Suspend PWM operation
141148
*
142149
* Control the PWM state. This is primarily intended

drivers/source/PwmOut.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ int PwmOut::read_pulsewidth_us()
121121
return val;
122122
}
123123

124+
int PwmOut::read_pulsewitdth_us()
125+
{
126+
return read_pulsewidth_us();
127+
}
128+
124129
void PwmOut::suspend()
125130
{
126131
core_util_critical_section_enter();

0 commit comments

Comments
 (0)