Pigweed
C/C++ API Reference
|
Private Member Functions | |
Status | Acquire () final |
Status | Release () final |
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.
|
inlinefinalprivate |
Acquire a reference to the clock source.
When the first reference gets acquired, the clock source gets enabled.
|
inlinefinalprivate |
Release a reference to the clock source.
When the last reference gets released, the clock source gets disabled.