WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
los_rpqueue.h
浏览该文件的文档.
1/* ----------------------------------------------------------------------------
2 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
3 * Description: LiteOS Remote Processor Queue Module HeaderFile
4 * Author: Huawei LiteOS Team
5 * Create: 2022-11-11
6 * Redistribution and use in source and binary forms, with or without modification,
7 * are permitted provided that the following conditions are met:
8 * 1. Redistributions of source code must retain the above copyright notice, this list of
9 * conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, this list
11 * of conditions and the following disclaimer in the documentation and/or other materials
12 * provided with the distribution.
13 * 3. Neither the name of the copyright holder nor the names of its contributors may be used
14 * to endorse or promote products derived from this software without specific prior written
15 * permission.
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
20 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
23 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
25 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
26 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 * --------------------------------------------------------------------------- */
28
34#ifndef LOS_RPQUEUE_H
35#define LOS_RPQUEUE_H
36
37#ifdef LOS_CONFIG_WITHOUT_OS
38#include "los_typedef.h"
39#include "los_toolchain.h"
40#include "los_errno.h"
41#include "los_rpqueue_bsp.h"
42#else
43#include "los_typedef.h"
44#include "los_hwi.h"
45#include "los_task.h"
46#endif
47
48#ifdef __cplusplus
49extern "C" {
50#endif /* __cplusplus */
51
52#define LOS_RPQUEUE_OPTION_SYNC_MSG_SEND 0x0001U
53#define LOS_RPQUEUE_ALIGN_SIZE 8U
54
63#define LOS_ERRNO_RPQUEUE_PTR_NULL LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x01)
64
74#define LOS_ERRNO_RPQUEUE_CB_DAMAGED LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x02)
75
84#define LOS_ERRNO_RPQUEUE_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x03)
85
94#define LOS_ERRNO_RPQUEUE_WRITE_BUSY LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x04)
95
104#define LOS_ERRNO_RPQUEUE_BUF_EMPTY LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x05)
105
114#define LOS_ERRNO_RPQUEUE_BUF_NOT_ENOUGH LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x06)
115
124#define LOS_ERRNO_RPQUEUE_WRITE_ERROR LOS_ERRNO_OS_FATAL(LOS_MOD_RPQUEUE, 0x07)
125
134#define LOS_ERRNO_RPQUEUE_SIZE_TOO_SMALL LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x08)
135
144#define LOS_ERRNO_RPQUEUE_READ_LOCK LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x09)
145
154#define LOS_ERRNO_RPQUEUE_HEADER_DAMAGED LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x0A)
155
164#define LOS_ERRNO_RPQUEUE_INITED LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x0B)
165
174#define LOS_ERRNO_RPQUEUE_SIZE_TOO_LARGE LOS_ERRNO_OS_ERROR(LOS_MOD_RPQUEUE, 0x0C)
175
181
183
206
227
252
276
277#ifdef __cplusplus
278}
279#endif /* __cplusplus */
280
281#endif /* LOS_RPQUEUE_H */
UINT32 LOS_RpqueueRecv(void *queue, LosRpqueueCallback recvDataCb)
Rpqueue data receive.
UINT32 LOS_RpqueueMaxSendSizeGet(void *queue, UINT16 *maxSendSize)
get Rpqueue current max send size.
UINT32 LOS_RpqueueInit(void *queue, UINT32 size, UINT32 option)
Rpqueue init.
UINT32 LOS_RpqueueSend(void *queue, const UINT8 *data, UINT16 len, const LosRpqueueSendCfg *cfg)
Rpqueue send message.
void(* LosRpqueueCallback)(UINT8 cmd, UINT8 *data, UINT16 len)
Definition los_rpqueue.h:182
unsigned short UINT16
Definition los_typedef.h:51
#define VOID
Definition los_typedef.h:88
unsigned char UINT8
Definition los_typedef.h:50
unsigned int UINT32
Definition los_typedef.h:52
Definition los_rpqueue.h:176
UINT8 cmd
Definition los_rpqueue.h:179
UINT8 option
Definition los_rpqueue.h:178
UINT32 timeout
Definition los_rpqueue.h:177
Definition hal_uart_v151_regs_def.h:38