mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-07 21:17:45 +00:00
The on-off manager infrastructure is designed to robust asynchronous transition between binary states where multiple clients may be initiating a transition from any context. The actual transition is performed using a manager that tracks the current state and pending operations. Requests are initiated by passing a reference to an onoff_client object that holds client state including the notification mechanism. This API may be used in subsystems where the transitions for a particular driver are always synchronous and isr-ok, e.g. setting a SoC-controlled GPIO. In this situation the full on-off manager infrastructure is wasteful. All we need is a record of the service state: off, active count, or error. Add a data structure and an API that can be used to replace the onoff manager functionality in a situation where all transitions are isr-ok and synchronous while retaining compatible behavior from the client perspective. Signed-off-by: Peter A. Bigot <pab@pabigot.com> |
||
---|---|---|
.. | ||
index.rst |