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.
Dependents: Interference_Simple
PulseTrain Class Reference
Pulse Train Model More...
#include <PulseTrain.h>
Public Member Functions | |
| PulseTrain (uint32_t const arg_freq_init=4000, float const arg_duty_init=0.5, uint32_t const arg_freq_max=8000) | |
| Constractor. | |
| void | incrementClock () |
| Increment the clock to let go ahead the wave state. | |
| void | attachCallback_asClock (Callback< void(bool)> arg_callback) |
| Executes a callback fanction called as clock is incremented. | |
| void | attachCallback_asPulseEdge (Callback< void(bool)> arg_callback) |
Detailed Description
Pulse Train Model
Pulse Train Model which clock is defined in scale of [us]; You can define the carrier pulse train's freq and duty cycle like PWM. Kinds of Frequency is dealed as unsigned 32bit int For the other int vars, allocated is 32bit.
Definition at line 20 of file PulseTrain.h.
Constructor & Destructor Documentation
| PulseTrain | ( | uint32_t const | arg_freq_init = 4000, |
| float const | arg_duty_init = 0.5, |
||
| uint32_t const | arg_freq_max = 8000 |
||
| ) |
Constractor.
- Parameters:
-
arg_freq_init Initial carrier pulse frequency arg_duty_init Initial carrier pulse duty cycle arg_freq_max Initialize FREQ_MAX
Definition at line 3 of file PulseTrain.cpp.
Member Function Documentation
| void attachCallback_asClock | ( | Callback< void(bool)> | arg_callback ) |
Executes a callback fanction called as clock is incremented.
If callback as rising/falling is also called, this "asClock" is called at the last.
- Parameters:
-
arg_callback Called back as clock incremented
- <pulsestate> indicate whther pulse (not clock pulse but one of pulse train) has risen/fallen
Definition at line 19 of file PulseTrain.cpp.
| void attachCallback_asPulseEdge | ( | Callback< void(bool)> | arg_callback ) |
- Parameters:
-
arg_callback Called back as a pulse rising/falling
- <pulsestate> indicate whther pulse has risen/fallen
Definition at line 24 of file PulseTrain.cpp.
| void incrementClock | ( | ) |
Increment the clock to let go ahead the wave state.
If callback as rising/falling is also called, this "asClock" is called earlier
Definition at line 67 of file PulseTrain.cpp.
Generated on Tue Jul 12 2022 22:17:22 by
1.7.2