XWOS API
4.0
XWOS C/C++ API参考手册
|
SOC间点对点通讯协议:用户应用接口层 更多...
#include <xwos/standard.h>
#define | XWSSC_VERSION ("1.0.0") |
#define | XWSSC_VERSION_MAJOR 1U |
#define | XWSSC_VERSION_MINOR 0U |
#define | XWSSC_VERSION_REVISION 0U |
#define | XWSSC_PRI_NUM (XWMDCFG_isc_xwssc_PRI_NUM) |
#define | XWSSC_INVALID_PRI (0xFFU) |
#define | XWSSC_MAX_PRI (XWSSC_PRI_NUM - 1U) |
#define | XWSSC_PORT_NUM (XWMDCFG_isc_xwssc_PORT_NUM) |
#define | XWSSC_RETRY_PERIOD (XWMDCFG_isc_xwssc_RETRY_PERIOD) |
#define | XWSSC_RETRY_NUM (XWMDCFG_isc_xwssc_RETRY_NUM) |
#define | XWSSC_MEMBLK_SIZE (XWMDCFG_isc_xwssc_MEMBLK_SIZE) |
#define | XWSSC_MEMBLK_ODR (XWMDCFG_isc_xwssc_MEMBLK_ODR) |
#define | XWSSC_MEMBLK_NUM (1U << XWSSC_MEMBLK_ODR) |
#define | XWSSC_MEMPOOL_SIZE (XWSSC_MEMBLK_SIZE * XWSSC_MEMBLK_NUM) |
#define | XWSSC_DEF_MEMPOOL(name) __xwcc_alignl1cache xwu8_t name[XWSSC_MEMPOOL_SIZE] |
定义内存池 | |
enum | xwssc_carrier_state_em { XWSSC_CRS_IDLE = 0U , XWSSC_CRS_READY = 1U , XWSSC_CRS_INPROGRESS = 2U , XWSSC_CRS_ABORT = 3U , XWSSC_CRS_FINISH = 4U } |
发送状态枚举 更多... | |
enum | xwssc_msg_qos_em { XWSSC_MSG_QOS_0 = 0U , XWSSC_MSG_QOS_1 = 1U , XWSSC_MSG_QOS_2 = 2U , XWSSC_MSG_QOS_3 = 3U , XWSSC_MSG_QOS_NUM , XWSSC_MSG_QOS_CHKSUM_MSK = (1U) , XWSSC_MSG_QOS_RELIABLE_MSK = (2U) , XWSSC_MSG_QOS_MSK } |
服务质量枚举 更多... | |
typedef struct xwssc_carrier * | xwssc_txh_t |
发送句柄 | |
typedef void(* | xwssc_ntf_f) (struct xwssc *, xwssc_txh_t, xwer_t, void *) |
通知发送结果的回调函数 | |
xwer_t | xwssc_start (struct xwssc *xwssc, const char *name, const struct xwssc_hwifal_operation *hwifops, void *hwifcb, xwu8_t *mem, xwsz_t memsize) |
XWSSC API: 启动XWSSC | |
xwer_t | xwssc_stop (struct xwssc *xwssc) |
XWSSC API: 停止XWSSC | |
bool | xwssc_tst_connected (struct xwssc *xwssc) |
XWSSC API: 测试XWSSC是否已经连接 | |
xwer_t | xwssc_tx (struct xwssc *xwssc, const xwu8_t data[], xwsz_t *size, xwu8_t pri, xwu8_t port, xwu8_t qos, xwtm_t to) |
XWSSC API: 将用户数据加入到XWSSC的发送队列中,并在限定的时间内等待发送结果 | |
xwer_t | xwssc_eq (struct xwssc *xwssc, const xwu8_t data[], xwsz_t *size, xwu8_t pri, xwu8_t port, xwu8_t qos, xwssc_ntf_f ntfcb, void *cbarg, xwssc_txh_t *txhbuf) |
XWSSC API: 将一条用户数据加入到XWSSC的发送队列中 | |
xwer_t | xwssc_abort (struct xwssc *xwssc, xwssc_txh_t txh) |
XWSSC API: 中断发送 | |
xwsq_t | xwssc_get_txstate (xwssc_txh_t txh) |
XWSSC API: 获取发送状态 | |
xwer_t | xwssc_rx (struct xwssc *xwssc, xwu8_t port, xwu8_t rxbuf[], xwsz_t *size, xwu8_t *qos, xwtm_t to) |
XWSSC API: 接收消息,若接收队列为空,就限时等待 | |
xwer_t | xwssc_try_rx (struct xwssc *xwssc, xwu8_t port, xwu8_t rxbuf[], xwsz_t *size, xwu8_t *qos) |
XWSSC API: 尝试接收消息,若接收队列为空,立即返回错误码 | |
SOC间点对点通讯协议:用户应用接口层
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
在文件 mif.h 中定义.