WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
hcc_flow_ctrl.h
浏览该文件的文档.
1/*
2 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2021-2023. All rights reserved.
3 * Description: hcc flow ctrl module completion.
4 */
5
6#ifndef HCC_FLOW_CTRL_HEADER
7#define HCC_FLOW_CTRL_HEADER
8
9#include "td_type.h"
10#include "hcc.h"
11#include "hcc_queue.h"
12
13#ifdef __cplusplus
14#if __cplusplus
15extern "C" {
16#endif
17#endif
18
19#define HCC_FC_PRE_PROC_WAIT_TIME 1000
20
21typedef enum _hcc_flowctrl_type_ {
22 HCC_FLOWCTRL_DATA, // 被动接收 接收端的状态,(msg方式)
23 HCC_FLOWCTRL_CREDIT, // 发送前主动获取接收端的剩余包数量
27
32
33#ifdef CONFIG_HCC_SUPPORT_FLOW_CONTRL
34td_bool hcc_flow_ctrl_sched_check(hcc_handler *hcc, hcc_trans_queue *queue);
35ext_errno hcc_flow_ctrl_process(hcc_handler *hcc, hcc_trans_queue *queue);
36td_u32 hcc_flowctrl_on_proc(td_u8 *data);
37td_u32 hcc_flowctrl_off_proc(td_u8 *data);
38td_u32 hcc_flowctrl_check_proc(td_u8 *data);
39#if (defined(_PRE_OS_VERSION_LINUX) && defined(_PRE_OS_VERSION) && (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION))
40ext_errno hcc_flow_ctrl_pre_proc(hcc_handler *hcc, hcc_transfer_param *param, hcc_trans_queue *hcc_queue);
41#else
42ext_errno hcc_flow_ctrl_pre_proc(hcc_handler *hcc, TD_CONST hcc_transfer_param *param,
43 hcc_trans_queue *hcc_queue);
44#endif
45td_void hcc_adapt_tx_start_subq(hcc_handler *hcc, hcc_trans_queue *hcc_queue);
46ext_errno hcc_flow_ctrl_module_init(hcc_handler *hcc);
47td_void hcc_flow_ctrl_module_deinit(hcc_handler *hcc);
48td_void fc_msg_init(td_u8 chl);
49#endif
51
52#ifdef __cplusplus
53#if __cplusplus
54}
55#endif
56#endif
57
58#endif /* HCC_FLOW_CTRL_HEADER */
td_bool fc_below_low_waterline(hcc_trans_queue *hcc_queue)
enum _hcc_flowctrl_flag_ hcc_flowctrl_flag
enum _hcc_flowctrl_type_ hcc_flowctrl_type
_hcc_flowctrl_type_
Definition hcc_flow_ctrl.h:21
@ HCC_FLOWCTRL_TYPE_INVALID
Definition hcc_flow_ctrl.h:25
@ HCC_FLOWCTRL_CREDIT
Definition hcc_flow_ctrl.h:23
@ HCC_FLOWCTRL_DATA
Definition hcc_flow_ctrl.h:22
@ HCC_FLOWCTRL_BUTT
Definition hcc_flow_ctrl.h:24
_hcc_flowctrl_flag_
Definition hcc_flow_ctrl.h:28
@ HCC_FLOWCTRL_FLAG_OFF
Definition hcc_flow_ctrl.h:29
@ HCC_FLOWCTRL_FLAG_ON
Definition hcc_flow_ctrl.h:30
ext_errno
Definition soc_errno.h:9
Definition hcc.h:81
Definition hcc_queue.h:41
Definition hcc_types.h:30
#define TD_CONST
Definition td_base.h:18
unsigned char td_u8
Definition td_type.h:36
td_u8 td_bool
Definition td_type.h:50
void td_void
Definition td_type.h:49
unsigned int td_u32
Definition td_type.h:38
Definition hal_uart_v151_regs_def.h:38