|
SatCat5
|
Driver for the PPS output block (ptp_pps_out.vhd).
The VHDL output block accepts a PTP time reference and synthesizes a PPS signal. This software driver allows configuration of that block, setting its phase offset and polarity.
Definition at line 95 of file cfgbus_pps.h.
#include <cfgbus_pps.h>
Public Member Functions | |
| PpsOutput (satcat5::cfg::Register reg, bool rising=true) | |
| Link this driver to the hardware control register. More... | |
| s64 | get_offset () const |
| Query the phase-offset for this output. More... | |
| void | set_offset (s64 offset) |
| Adjust the phase-offset for this output. More... | |
| bool | get_polarity () const |
| Query the polarity of this output. More... | |
| void | set_polarity (bool rising) |
| Set the rising- or falling-edge polarity of this output. | |
Protected Member Functions | |
| void | configure () |
| void | timer_event () override |
| Child class MUST override this method. | |
| void | timer_once (unsigned msec) |
| Configure a one-time notification after X milliseconds. | |
| void | timer_every (unsigned msec) |
| Configure a repeating notification every X milliseconds. | |
| void | timer_stop () |
| Stop all future notifications. | |
| unsigned | timer_interval () const |
| Accessor for recurring timer interval, if one is set. | |
| unsigned | timer_remaining () const |
| Accessor for time to next event, if one is set. | |
Static Protected Member Functions | |
| static unsigned | count_timer () |
| Count all objects of this type, including idle timers. | |
Protected Attributes | |
| satcat5::cfg::Register | m_reg |
| s64 | m_offset |
| bool | m_rising |
Private Member Functions | |
| void | query (unsigned elapsed_msec) |
Private Attributes | |
| satcat5::poll::Timer * | m_next |
| unsigned | m_trem |
| unsigned | m_tnext |
|
explicit |
Link this driver to the hardware control register.
| reg | Sets ConfigBus control register. |
| rising | Sets the default output polarity. |
Definition at line 91 of file cfgbus_pps.cc.
|
inline |
Query the phase-offset for this output.
Units are subnanoseconds,
Definition at line 104 of file cfgbus_pps.h.
|
inline |
Query the polarity of this output.
Definition at line 113 of file cfgbus_pps.h.
| void PpsOutput::set_offset | ( | s64 | offset | ) |
Adjust the phase-offset for this output.
Units are subnanoseconds,
Definition at line 103 of file cfgbus_pps.cc.