Zephyr API Documentation 4.0.0-rc2
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
onoff_sync_service Struct Reference

State used when a driver uses the on-off service API for synchronous operations. More...

#include <onoff.h>

Data Fields

struct k_spinlock lock
 Mutex protection for other fields.
 
int32_t count
 Negative is error, non-negative is reference count.
 

Detailed Description

State used when a driver uses the on-off service API for synchronous operations.

This is useful when a subsystem API uses the on-off API to support asynchronous operations but the transitions required by a particular driver are isr-ok and not sleep. It serves as a substitute for onoff_manager, with locking and persisted state updates supported by onoff_sync_lock() and onoff_sync_finalize().

Field Documentation

◆ count

int32_t onoff_sync_service::count

Negative is error, non-negative is reference count.

◆ lock

struct k_spinlock onoff_sync_service::lock

Mutex protection for other fields.


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