SatCat5
satcat5::cfg::RefOutput Class Reference

Detailed Description

Variant of PpsOutput with frequency-control enabled.

Definition at line 131 of file cfgbus_pps.h.

#include <cfgbus_pps.h>

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

Public Member Functions

 RefOutput (satcat5::cfg::Register reg_phase, satcat5::cfg::Register reg_period, bool rising=true)
 Link this driver to the hardware control register. More...
 
u32 get_frequency () const
 Query the frequency for this output.
 
void set_frequency (u32 freq_hz)
 Adjust the frequency for this output. 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_period
 
u32 m_freq_hz
 
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

◆ RefOutput()

RefOutput::RefOutput ( satcat5::cfg::Register  reg_phase,
satcat5::cfg::Register  reg_period,
bool  rising = true 
)
explicit

Link this driver to the hardware control register.

Parameters
reg_phaseSets ConfigBus phase-offset register.
reg_periodSets ConfigBus period register.
risingSets the default output polarity.

Definition at line 133 of file cfgbus_pps.cc.

Member Function Documentation

◆ get_offset()

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

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
inlineinherited

Query the polarity of this output.

See also
set_polarity.

Definition at line 113 of file cfgbus_pps.h.

◆ set_frequency()

void RefOutput::set_frequency ( u32  freq_hz)

Adjust the frequency for this output.

e.g., 1 = 1 Hz = 1 pulse-per-second.

Definition at line 141 of file cfgbus_pps.cc.

◆ set_offset()

void PpsOutput::set_offset ( s64  offset)
inherited

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: