WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
Los_rpqueue
Los_rpqueue 的协作图:

宏定义

#define LOS_ERRNO_RPQUEUE_PTR_NULL   LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x01)
 
#define LOS_ERRNO_RPQUEUE_CB_DAMAGED   LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x02)
 
#define LOS_ERRNO_RPQUEUE_INVALID   LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x03)
 
#define LOS_ERRNO_RPQUEUE_WRITE_BUSY   LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x04)
 
#define LOS_ERRNO_RPQUEUE_BUF_EMPTY   LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x05)
 
#define LOS_ERRNO_RPQUEUE_BUF_NOT_ENOUGH   LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x06)
 
#define LOS_ERRNO_RPQUEUE_WRITE_ERROR   LOS_ERRNO_OS_FATAL(LOS_MOD_RPQUEUE, 0x07)
 
#define LOS_ERRNO_RPQUEUE_SIZE_TOO_SMALL   LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x08)
 
#define LOS_ERRNO_RPQUEUE_READ_LOCK   LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x09)
 
#define LOS_ERRNO_RPQUEUE_HEADER_DAMAGED   LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x0A)
 
#define LOS_ERRNO_RPQUEUE_INITED   LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x0B)
 
#define LOS_ERRNO_RPQUEUE_SIZE_TOO_LARGE   LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x0C)
 

函数

UINT32 LOS_RpqueueInit (void *queue, UINT32 size, UINT32 option)
 Rpqueue init.
 
UINT32 LOS_RpqueueMaxSendSizeGet (void *queue, UINT16 *maxSendSize)
 get Rpqueue current max send size.
 
UINT32 LOS_RpqueueSend (void *queue, const UINT8 *data, UINT16 len, const LosRpqueueSendCfg *cfg)
 Rpqueue send message.
 
UINT32 LOS_RpqueueRecv (void *queue, LosRpqueueCallback recvDataCb)
 Rpqueue data receive.
 

详细描述

宏定义说明

◆ LOS_ERRNO_RPQUEUE_BUF_EMPTY

#define LOS_ERRNO_RPQUEUE_BUF_EMPTY   LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x05)

Task error code: The Rpqueue is empty.

Value: 0x02002505.

Solution: None.

◆ LOS_ERRNO_RPQUEUE_BUF_NOT_ENOUGH

#define LOS_ERRNO_RPQUEUE_BUF_NOT_ENOUGH   LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x06)

Task error code: The Rpqueue is not enough to write data.

Value: 0x02002506.

Solution: Wait for the receiver to read the data.

◆ LOS_ERRNO_RPQUEUE_CB_DAMAGED

#define LOS_ERRNO_RPQUEUE_CB_DAMAGED   LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x02)

Task error code: The rpqueue is damaged.

Value: 0x02002502.

Solution: Receiver: Wait for transmitter to re-initialize this queue. Transmitter: Call LOS_RpqueueInit to re-initialize this queue.

◆ LOS_ERRNO_RPQUEUE_HEADER_DAMAGED

#define LOS_ERRNO_RPQUEUE_HEADER_DAMAGED   LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x0A)

Task error code: The header data is damaged.

Value: 0x0200250A.

Solution: Waiting for transmitter to re-initialize this queue.

◆ LOS_ERRNO_RPQUEUE_INITED

#define LOS_ERRNO_RPQUEUE_INITED   LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x0B)

Task error code: This queue has been initialized.

Value: 0x0200250B.

Solution: Process the return value according to the actual situation.

◆ LOS_ERRNO_RPQUEUE_INVALID

#define LOS_ERRNO_RPQUEUE_INVALID   LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x03)

Task error code: The Rpqueue is invalid.

Value: 0x02002503.

Solution: Check the queue and initialize it.

◆ LOS_ERRNO_RPQUEUE_PTR_NULL

#define LOS_ERRNO_RPQUEUE_PTR_NULL   LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x01)

Task error code: Null parameter.

Value: 0x02002501.

Solution: Check the parameter.

◆ LOS_ERRNO_RPQUEUE_READ_LOCK

#define LOS_ERRNO_RPQUEUE_READ_LOCK   LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x09)

Task error code: The Rpqueue is in read lock.

Value: 0x02002509.

Solution: Try again.

◆ LOS_ERRNO_RPQUEUE_SIZE_TOO_LARGE

#define LOS_ERRNO_RPQUEUE_SIZE_TOO_LARGE   LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x0C)

Task error code: The Rpqueue buffer size is too large to init.

Value: 0x0200250C.

Solution: Use smaller size.

◆ LOS_ERRNO_RPQUEUE_SIZE_TOO_SMALL

#define LOS_ERRNO_RPQUEUE_SIZE_TOO_SMALL   LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x08)

Task error code: The Rpqueue buffer size is too small to init.

Value: 0x02002508.

Solution: Use bigger size.

◆ LOS_ERRNO_RPQUEUE_WRITE_BUSY

#define LOS_ERRNO_RPQUEUE_WRITE_BUSY   LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x04)

Task error code: The Rpqueue is writing.

Value: 0x02002504.

Solution: Waiting for queue release.

◆ LOS_ERRNO_RPQUEUE_WRITE_ERROR

#define LOS_ERRNO_RPQUEUE_WRITE_ERROR   LOS_ERRNO_OS_FATAL(LOS_MOD_RPQUEUE, 0x07)

Task error code: Systemic failure has occurred.

Value: 0x03002507.

Solution: This is a major failure and requires the highest level of security checks.

函数说明

◆ LOS_RpqueueInit()

UINT32 LOS_RpqueueInit ( void *  queue,
UINT32  size,
UINT32  option 
)

Rpqueue init.

Description:
Initializing the Remote Processor Queue. Initialize at the transmit end.
注意
Non-reentrant.
参数
queue[IN] Rpqueue address.
size[IN] Rpqueue buffer size, size range is 24 - 65543 bytes.
option[IN] Rpqueue option.
返回值
LOS_ERRNO_RPQUEUE_PTR_NULLQueue address is NULL.
LOS_ERRNO_RPQUEUE_INITEDThis queue has been initialized.
LOS_ERRNO_RPQUEUE_SIZE_TOO_SMALLThe Rpqueue buffer size is too small to init.
LOS_ERRNO_RPQUEUE_SIZE_TOO_LARGEThe Rpqueue buffer size is too large to init.
LOS_OKInitialization is successful.
Dependency:
  • los_rpqueue.h: the header file that contains the API declaration.

◆ LOS_RpqueueMaxSendSizeGet()

UINT32 LOS_RpqueueMaxSendSizeGet ( void *  queue,
UINT16 maxSendSize 
)

get Rpqueue current max send size.

Description:
get Rpqueue current max send size.
注意
Non-reentrant.
参数
queue[IN] Remote Processor address.
maxSendSize[OUT] Max send size, the value of 0 also is useful.
返回值
LOS_ERRNO_RPQUEUE_PTR_NULLPointer is NULL.
LOS_ERRNO_RPQUEUE_INVALIDQueue address is invalid.
LOS_ERRNO_RPQUEUE_BUF_NOT_ENOUGHRpqueue remaining space is not enough to send.
LOS_OKGet max send size successfully.
Dependency:
  • los_rpqueue.h: the header file that contains the API declaration.

◆ LOS_RpqueueRecv()

UINT32 LOS_RpqueueRecv ( void *  queue,
LosRpqueueCallback  recvDataCb 
)

Rpqueue data receive.

Description:
Rpqueue data receive, when data is received, the callback function will be called.
注意
Non-reentrant.
参数
queue[IN] Rpqueue address.
recvDataCb[IN] Receive data callback.
返回值
LOS_ERRNO_RPQUEUE_READ_LOCKRpqueue is in read lock.
LOS_ERRNO_RPQUEUE_PTR_NULLRpqueue address is NULL.
LOS_ERRNO_RPQUEUE_INVALIDRpqueue address is invalid.
LOS_ERRNO_RPQUEUE_HEADER_DAMAGEDThe header data is damaged.
LOS_ERRNO_RPQUEUE_BUF_EMPTYThe Rpqueue is empty.
LOS_ERRNO_RPQUEUE_CB_DAMAGEDThe rpqueue is damaged.
LOS_OKInitialization is successful.
Dependency:
  • los_rpqueue.h: the header file that contains the API declaration.

◆ LOS_RpqueueSend()

UINT32 LOS_RpqueueSend ( void *  queue,
const UINT8 data,
UINT16  len,
const LosRpqueueSendCfg cfg 
)

Rpqueue send message.

Description:
Rpqueue send message.
注意
Non-reentrant.
参数
queue[IN] Rpqueue address.
data[IN] Send data buffer.
len[IN] Send data size.
cfg[IN] The config of sending.
返回值
LOS_ERRNO_RPQUEUE_PTR_NULLRpqueue address is NULL.
LOS_ERRNO_RPQUEUE_INVALIDRpqueue address is invalid.
LOS_ERRNO_RPQUEUE_WRITE_BUSYRpqueue write busy.
LOS_ERRNO_RPQUEUE_BUF_NOT_ENOUGHRpqueue remaining space is not enough to send.
LOS_ERRNO_RPQUEUE_CB_DAMAGEDThe rpqueue is damaged.
LOS_OKSending success.
Dependency:
  • los_rpqueue.h: the header file that contains the API declaration.