Pigweed
C/C++ API Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
Private Member Functions | List of all members
pw::clock_tree::ClockSource< ElementType > Class Template Reference
Inheritance diagram for pw::clock_tree::ClockSource< ElementType >:

Private Member Functions

Status Acquire () final
 
Status Release () final
 

Detailed Description

template<typename ElementType>
class pw::clock_tree::ClockSource< ElementType >

Abstract class template of a clock tree element that provides a clock source.

A ClockSource clock tree element does not depend on any other clock tree element, but provides a clock to the system that is not derived from another clock.

Class implementations of ClockSource must implement Acquire and Release functions. For clock sources that only get enabled / configured, it is sufficient to only override the DoEnable function, otherwise it is required to override the DoDisable function to disable the clock source.

Template argument ElementType can be of class ElementBlocking, ElementNonBlockingCannotFail or ElementNonBlockingMightFail.

Member Function Documentation

◆ Acquire()

template<typename ElementType >
Status pw::clock_tree::ClockSource< ElementType >::Acquire ( )
inlinefinalprivate

Acquire a reference to the clock source.

When the first reference gets acquired, the clock source gets enabled.

◆ Release()

template<typename ElementType >
Status pw::clock_tree::ClockSource< ElementType >::Release ( )
inlinefinalprivate

Release a reference to the clock source.

When the last reference gets released, the clock source gets disabled.


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