An interface to read a PWM input signal, using InterruptIn
Dependents: PwmIn_HelloWorld PwmIn_ModSerial CHR6dm_reading tugboat ... more
PwmIn Class Reference
PwmIn class to read PWM inputs. More...
#include <PwmIn.h>
Public Member Functions | |
PwmIn (PinName p) | |
Create a PwmIn. | |
float | period () |
Read the current period. | |
float | pulsewidth () |
Read the current pulsewidth. | |
float | dutycycle () |
Read the current dutycycle. |
Detailed Description
PwmIn class to read PWM inputs.
Uses InterruptIn to measure the changes on the input and record the time they occur
- Note:
- uses InterruptIn, so not available on p19/p20
Definition at line 35 of file PwmIn.h.
Constructor & Destructor Documentation
PwmIn | ( | PinName | p ) |
Member Function Documentation
float dutycycle | ( | ) |
float period | ( | ) |
Generated on Tue Jul 12 2022 18:31:58 by 1.7.2