#include <clock_tree.h>
Public Member Functions | |
constexpr | ClockDividerElement (ElementType &source, uint32_t divider) |
Status | Set (uint32_t divider) override |
![]() | |
constexpr | DependentElement (ElementType &source) |
Create a dependent clock tree element that depends on source . | |
![]() | |
constexpr | ClockDivider (Element &element) |
virtual Status | Set (uint32_t divider)=0 |
Element & | element () const |
Return the element implementing this interface. | |
Protected Member Functions | |
uint32_t | divider () const |
Get current divider value. | |
![]() | |
Status | UpdateSource (ElementType &new_source, bool permit_change_if_in_use) |
Abstract class template of a clock divider element.
A ClockDivider
clock tree element depends on another clock tree element and has a divider value that gets configured when the clock divider gets enabled.
Class implementations of ClockDivider
must override the DoEnable
function.
Template argument ElementType
can be of class ElementBlocking
, ElementNonBlockingCannotFail
or ElementNonBlockingMightFail.
|
inlineconstexpr |
Create a clock divider element that depends on source
and gets configured with divider
value when enabled.
|
inlineoverridevirtual |
Set divider
value.
The divider
value will get updated as part of this method if the clock divider is currently active, otherwise the new divider value will be configured when the clock divider gets enabled next.
Implements pw::clock_tree::ClockDivider.