commit | 905d4268e336ff1469f2ab5ca5fea31eeccb87bc | [log] [tgz] |
---|---|---|
author | Christoph Klee <chklee@google.com> | Mon May 20 22:55:15 2024 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon May 20 22:55:15 2024 +0000 |
tree | 28fc77b13100215f2983b170ec8bb24408743c07 | |
parent | de0813bee2778fe28f61a0ec3ff22ae2e44599dc [diff] |
pw_clock_tree: Generic clock tree management This change introduces a module to implement clock management of individual clock tree elements, such as clocks, clock selectors or clock dividers. The `ClockManager` controls the state of individual clock tree elements and ensures that access to them is serialized. Four main abstract class templates implement the different clock tree elements to represent the clock tree of an embedded system. The `Element` abstract class implements the reference counting to ensure that a clock tree element can only get enabled when all its dependent clock tree elements have been enabled. Similarly, the different clock tree elements ensure that a clock tree element gets disabled before the clock tree element it was depending on can get disabled. If enabling or disabling a clock tree element might require the operation to block, the `ElementBlocking` class needs to be used. Otherwise, the `ElementNonBlockingCannotFail` or `ElementNonBlockingMightFail` class should be used depening on whether enabling and disabling will always succeed, or whether it might fail. Change-Id: Ic4205ba8eb552b2558983c2b19b1b9e47a5d9687 Bug: 331672574 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/204310 Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com> Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> Commit-Queue: Christoph Klee <chklee@google.com> Reviewed-by: Keir Mierle <keir@google.com> Reviewed-by: Austin Foxley <afoxley@google.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/.