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.
pulse_decoder.h File Reference
This library provides a simple PWM decoder class. More...
Go to the source code of this file.
Detailed Description
This library provides a simple PWM decoder class.
The approach is based on installing two interrupt routines for the rising and falling edges of an input pin and measuring the time between the two events.
Example:
#include "mbed.h" void main() { pulse_decoder pulse(D7); while(true) { printf("Pulse high = %5d low = %5d (us) Period = %5d\n", pulse.get_high_period(), pulse.get_low_period(), pulse.get_high_period() + pulse.get_low_period()); wait(.2); } }
Definition in file pulse_decoder.h.
Generated on Tue Jul 12 2022 21:48:04 by
1.7.2