add: PwmOut::read_pulsewitdth_us() for compatibility

pull/15302/head
yutotnh 2022-06-23 21:59:03 +09:00
parent 7fe679c72e
commit 236194f7c3
No known key found for this signature in database
GPG Key ID: 4337BC8A24CA3BDC
2 changed files with 12 additions and 0 deletions

View File

@ -137,6 +137,13 @@ public:
*/
int read_pulsewidth_us();
/** Read the PWM pulsewidth
* @returns
* The PWM pulsewith, specified in microseconds (int)
*/
MBED_DEPRECATED("use read_pulsewidth_us() instead")
int read_pulsewitdth_us();
/** Suspend PWM operation
*
* Control the PWM state. This is primarily intended

View File

@ -121,6 +121,11 @@ int PwmOut::read_pulsewidth_us()
return val;
}
int PwmOut::read_pulsewitdth_us()
{
return read_pulsewidth_us();
}
void PwmOut::suspend()
{
core_util_critical_section_enter();