C++ DevKit
C++ set of OOP library
|
the PWM function used to measure time during which the signal on the channel B as input is HI. More...
#include <hw_pwm.h>
Public Member Functions | |
PWMgatedMeasure (uint pin_gate, uint resolution_ns, uint measure_duration_us) | |
Construct a new PWMgatedMeasure object. | |
float | measure_duty_cycle () |
compute the time the channel B is HI over the time of observation | |
uint16_t | count_cycles () |
gives the number of step while the signal on channel B is HI | |
the PWM function used to measure time during which the signal on the channel B as input is HI.
PWMgatedMeasure::PWMgatedMeasure | ( | uint | pin_gate, |
uint | resolution_ns, | ||
uint | measure_duration_us ) |
Construct a new PWMgatedMeasure object.
pin_gate | must be the channel B of a slice |
resolution_ns | the minimum time slot as measure LSB. min = 8ns < step_ns < max = 256 * 8ns = ca 2us |
measure_duration_us | the observation duration |
uint16_t PWMgatedMeasure::count_cycles | ( | ) |
gives the number of step while the signal on channel B is HI
float PWMgatedMeasure::measure_duty_cycle | ( | ) |
compute the time the channel B is HI over the time of observation