SatCat5
satcat5::cfg::PpsOutput Class Reference

Detailed Description

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.

See also
satcat5::ptp::PpsInput

Definition at line 95 of file cfgbus_pps.h.

#include <cfgbus_pps.h>

Inheritance diagram for satcat5::cfg::PpsOutput:
[legend]
Collaboration diagram for satcat5::cfg::PpsOutput:
[legend]

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::Timerm_next
 
unsigned m_trem
 
unsigned m_tnext
 

Constructor & Destructor Documentation

◆ PpsOutput()

PpsOutput::PpsOutput ( satcat5::cfg::Register  reg,
bool  rising = true 
)
explicit

Link this driver to the hardware control register.

Parameters
regSets ConfigBus control register.
risingSets the default output polarity.

Definition at line 91 of file cfgbus_pps.cc.

Member Function Documentation

◆ get_offset()

s64 satcat5::cfg::PpsOutput::get_offset ( ) const
inline

Query the phase-offset for this output.

Units are subnanoseconds,

See also
satcat5::ptp::Time.

Definition at line 104 of file cfgbus_pps.h.

◆ get_polarity()

bool satcat5::cfg::PpsOutput::get_polarity ( ) const
inline

Query the polarity of this output.

See also
set_polarity.

Definition at line 113 of file cfgbus_pps.h.

◆ set_offset()

void PpsOutput::set_offset ( s64  offset)

Adjust the phase-offset for this output.

Units are subnanoseconds,

See also
satcat5::ptp::Time. Positive offsets increase delay of the synthesized output.

Definition at line 103 of file cfgbus_pps.cc.


The documentation for this class was generated from the following files: