Zephyr API Documentation 4.0.0-rc2
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
shmem.h File Reference

SCMI SHMEM API. More...

#include <zephyr/device.h>
#include <zephyr/arch/cpu.h>
#include <errno.h>

Go to the source code of this file.

Macros

#define SCMI_SHMEM_CHAN_STATUS_BUSY_BIT   BIT(0)
 
#define SCMI_SHMEM_CHAN_FLAG_IRQ_BIT   BIT(0)
 

Functions

int scmi_shmem_write_message (const struct device *shmem, struct scmi_message *msg)
 Write a message in the SHMEM area.
 
int scmi_shmem_read_message (const struct device *shmem, struct scmi_message *msg)
 Read a message from a SHMEM area.
 
void scmi_shmem_update_flags (const struct device *shmem, uint32_t mask, uint32_t val)
 Update the channel flags.
 
uint32_t scmi_shmem_channel_status (const struct device *shmem)
 Read a channel's status.
 

Detailed Description

SCMI SHMEM API.

Macro Definition Documentation

◆ SCMI_SHMEM_CHAN_FLAG_IRQ_BIT

#define SCMI_SHMEM_CHAN_FLAG_IRQ_BIT   BIT(0)

◆ SCMI_SHMEM_CHAN_STATUS_BUSY_BIT

#define SCMI_SHMEM_CHAN_STATUS_BUSY_BIT   BIT(0)

Function Documentation

◆ scmi_shmem_channel_status()

uint32_t scmi_shmem_channel_status ( const struct device * shmem)

Read a channel's status.

Parameters
shmempointer to shmem device

◆ scmi_shmem_read_message()

int scmi_shmem_read_message ( const struct device * shmem,
struct scmi_message * msg )

Read a message from a SHMEM area.

Parameters
shmempointer to shmem device
msgmessage to write the data into
Return values
0if successful
negativeerrno if failure

◆ scmi_shmem_update_flags()

void scmi_shmem_update_flags ( const struct device * shmem,
uint32_t mask,
uint32_t val )

Update the channel flags.

Parameters
shmempointer to shmem device
maskvalue to negate and bitwise-and the old channel flags value
valvalue to bitwise and with the mask and bitwise-or with the masked old value

◆ scmi_shmem_write_message()

int scmi_shmem_write_message ( const struct device * shmem,
struct scmi_message * msg )

Write a message in the SHMEM area.

Parameters
shmempointer to shmem device
msgmessage to write
Return values
0if successful
negativeerrno if failure