20#define SDRV_MBOX_CHN_NUM 8U
22#define SDRV_MBOX_ANY_ADDR -1
24#define SDRV_MBOX_SHORT_BUF_LEN 4U
26#define SDRV_MBOX_NO_WAIT 0U
27#define SDRV_MBOX_WAIT_FOREVER 0xffffffffU
SemiDrive driver common header file.
@ SDRV_STATUS_GROUP_MBOX
Definition: sdrv_common.h:57
int32_t status_t
Type used for all status and error return values.
Definition: sdrv_common.h:82
#define SDRV_ERROR_STATUS(group, code)
Construct a status code value from a group and code number. All the error statuses are negetive numbe...
Definition: sdrv_common.h:17
int(* sdrv_mbox_rxcallback)(void *arg, uint8_t *data, uint32_t len)
Definition: sdrv_mbox.h:92
struct sdrv_mbox_dev sdrv_mbox_t
int sdrv_mbox_received(sdrv_mbox_chan_t *chan, uint8_t *data, uint32_t len)
sdrv mbox receive message
sdrv_mbox_rproc_t
sdrv mbox remote processor bitmap
Definition: sdrv_mbox.h:67
@ MBOX_RPROC_SX1
Definition: sdrv_mbox.h:72
@ MBOX_RPROC_SX0
Definition: sdrv_mbox.h:71
@ MBOX_RPROC_SF
Definition: sdrv_mbox.h:68
@ MBOX_RPROC_SP1
Definition: sdrv_mbox.h:70
@ MBOX_RPROC_SP0
Definition: sdrv_mbox.h:69
status_t sdrv_mbox_set_callback(sdrv_mbox_chan_t *chan, sdrv_mbox_rxcallback callback, void *arg)
sdrv mbox set callback
status_t sdrv_mbox_release_channel(sdrv_mbox_chan_t *chan)
sdrv mbox release channel
struct sdrv_mbox_config sdrv_mbox_config_t
struct sdrv_mbox_chan_req sdrv_mbox_chan_req_t
status_t sdrv_mbox_init(sdrv_mbox_t *dev, const sdrv_mbox_config_t *cfg)
sdrv mbox init
sdrv_mbox_addr_t
sdrv mbox address id
Definition: sdrv_mbox.h:83
@ MBOX_ADDR_IPCC
Definition: sdrv_mbox.h:86
@ MBOX_ADDR_RPMSG
Definition: sdrv_mbox.h:87
@ MBOX_ADDR_PM
Definition: sdrv_mbox.h:88
@ MBOX_ADDR_RAW
Definition: sdrv_mbox.h:85
@ MBOX_ADDR_INVALID
Definition: sdrv_mbox.h:84
status_t sdrv_mbox_send_nocopy(sdrv_mbox_chan_t *chan, uint8_t *data, uint32_t len, uint32_t timeout)
sdrv mbox channel send data no copy
uint32_t sdrv_mbox_mtu(sdrv_mbox_t *dev)
sdrv mbox get mtu
uint8_t * sdrv_mbox_alloc_buffer(sdrv_mbox_chan_t *sdrv_chan, uint32_t len)
sdrv mbox channel allocate buffer
sdrv_mbox_error
mbox status error code.
Definition: sdrv_mbox.h:37
@ SDRV_MBOX_STATUS_NO_CHANNEL
Definition: sdrv_mbox.h:43
@ SDRV_MBOX_STATUS_INVALID_MASTERID
Definition: sdrv_mbox.h:39
@ SDRV_MBOX_STATUS_TIMEOUT
Definition: sdrv_mbox.h:47
@ SDRV_MBOX_STATUS_NO_MSG_BUFFER
Definition: sdrv_mbox.h:45
@ SDRV_MBOX_STATUS_LENGTH_ERROR
Definition: sdrv_mbox.h:41
sdrv_mbox_chan_t * sdrv_mbox_request_channel(sdrv_mbox_t *dev, sdrv_mbox_chan_req_t *chan_req)
sdrv mbox client request channel
status_t sdrv_mbox_send(sdrv_mbox_chan_t *sdrv_chan, uint8_t *data, uint32_t len, uint32_t timeout)
sdrv mbox channel send data use message buf
#define SDRV_MBOX_CHN_NUM
Definition: sdrv_mbox.h:20
struct sdrv_mbox_chan sdrv_mbox_chan_t
status_t sdrv_mbox_send_nobuf(sdrv_mbox_chan_t *sdrv_chan, uint8_t *data, uint32_t len, uint32_t timeout)
sdrv mbox channel send short data
sdrv_mbox_proc_id_t
Definition: sdrv_mbox.h:51
@ MBOX_PROC_ID_SX1
Definition: sdrv_mbox.h:56
@ MBOX_PROC_ID_SP0
Definition: sdrv_mbox.h:53
@ MBOX_PROC_ID_SP1
Definition: sdrv_mbox.h:54
@ MBOX_PROC_ID_SF
Definition: sdrv_mbox.h:52
@ MBOX_PROC_ID_SX0
Definition: sdrv_mbox.h:55
@ MBOX_PROC_ID_NUM
Definition: sdrv_mbox.h:57
Definition: sdrv_mbox.h:95
int16_t src_addr
Definition: sdrv_mbox.h:97
int16_t dest_addr
Definition: sdrv_mbox.h:98
uint32_t rproc
Definition: sdrv_mbox.h:96
Definition: sdrv_mbox.h:113
struct sdrv_mbox_dev * dev
Definition: sdrv_mbox.h:114
int16_t src_addr
Definition: sdrv_mbox.h:119
uint8_t mb_mask
Definition: sdrv_mbox.h:117
uint8_t used
Definition: sdrv_mbox.h:115
int16_t dest_addr
Definition: sdrv_mbox.h:120
uint32_t rproc
Definition: sdrv_mbox.h:118
uint8_t msg_id
Definition: sdrv_mbox.h:116
void * arg
Definition: sdrv_mbox.h:122
sdrv_mbox_rxcallback callback
Definition: sdrv_mbox.h:121
Definition: sdrv_mbox.h:105
paddr_t mem_base
Definition: sdrv_mbox.h:107
uint8_t set_masterid_num
Definition: sdrv_mbox.h:109
paddr_t base
Definition: sdrv_mbox.h:106
int irq
Definition: sdrv_mbox.h:108
Definition: sdrv_mbox.h:126
uint32_t mb_bitmap
Definition: sdrv_mbox.h:134
paddr_t mem_base
Definition: sdrv_mbox.h:128
uint32_t mtu
Definition: sdrv_mbox.h:135
uint8_t set_masterid_num
Definition: sdrv_mbox.h:130
uint8_t chan_num
Definition: sdrv_mbox.h:131
sdrv_mbox_chan_t chan[SDRV_MBOX_CHN_NUM]
Definition: sdrv_mbox.h:132
uint32_t msg_bitmap
Definition: sdrv_mbox.h:133
paddr_t base
Definition: sdrv_mbox.h:127
int irq
Definition: sdrv_mbox.h:129