Zephyr API Documentation 4.4.0-rc1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Hardware Spinlock Driver Backend API

Data Structures

struct  hwspinlock_driver_api
  Driver Operations Hardware Spinlock driver operations More...

Typedefs

typedef int(* hwspinlock_api_trylock) (const struct device *dev, uint32_t id)
 Callback API to try to lock an HW spinlock.
typedef void(* hwspinlock_api_lock) (const struct device *dev, uint32_t id)
 Callback API to lock an HW spinlock.
typedef void(* hwspinlock_api_unlock) (const struct device *dev, uint32_t id)
 Callback API to unlock an HW spinlock.
typedef uint32_t(* hwspinlock_api_get_max_id) (const struct device *dev)
 Callback API to get the maximum HW spinlock ID.

Detailed Description

This group contains the API type definitions, callback signatures, and other helpers required to implement a Hardware Spinlock driver.

Typedef Documentation

◆ hwspinlock_api_get_max_id

typedef uint32_t(* hwspinlock_api_get_max_id) (const struct device *dev)

#include <zephyr/drivers/hwspinlock.h>

Callback API to get the maximum HW spinlock ID.

See hw_spinlock_get_max_id() for argument description.

◆ hwspinlock_api_lock

typedef void(* hwspinlock_api_lock) (const struct device *dev, uint32_t id)

#include <zephyr/drivers/hwspinlock.h>

Callback API to lock an HW spinlock.

See hw_spin_lock() for argument description.

◆ hwspinlock_api_trylock

typedef int(* hwspinlock_api_trylock) (const struct device *dev, uint32_t id)

#include <zephyr/drivers/hwspinlock.h>

Callback API to try to lock an HW spinlock.

See hw_spin_trylock() for argument description.

◆ hwspinlock_api_unlock

typedef void(* hwspinlock_api_unlock) (const struct device *dev, uint32_t id)

#include <zephyr/drivers/hwspinlock.h>

Callback API to unlock an HW spinlock.

See hw_spin_unlock() for argument description.