Reads the pulse width of the 16-bit timer RDn.
This API function can only be called when the 16-bit timer RDn is being used for input capture function. |
If there is an overflow (2 pulses or more) during pulse-width measurement, then the pulse width will not be read correctly. |
#include "r_cg_macrodriver.h" #include "r_cg_timer.h" MD_STATUS R_TMRDn_Get_PulseWidth ( uint32_t * const active_width, uint32_t * const inactive_width, timer_channel_t channel ); |