• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  * Description: hcc product configuration.
15  * Author:
16  * Create: 2023-02-13
17  */
18 
19 #ifndef __HCC_CFG_H__
20 #define __HCC_CFG_H__
21 
22 #include "td_type.h"
23 #include "hcc_types.h"
24 #include "hcc_bus_types.h"
25 #include "hcc_cfg_comm.h"
26 
27 #ifdef __cplusplus
28 #if __cplusplus
29 extern "C" {
30 #endif
31 #endif
32 
33 #define HCC_TASK_PRIORITY 5
34 #define HCC_FLOWCTRL_DEFAULT_LO_WATER_LINE 4
35 #define HCC_FLOWCTRL_DEFAULT_HI_WATER_LINE 8
36 #define HCC_FLOWCTRL_DEFAULT_CREDIT_BOTTOM_VALUE 12
37 #define HCC_DEFAULT_QUEUE_TRANSFER_BURST_LIMIT 8
38 #define HCC_MAX_QUEUE_TRANSFER_BURST_LIMIT 8
39 #define HCC_DATA_QUEUE_BUF_LEN 1680
40 #define HCC_UNC_POOL_SIZE_CCORE 48
41 #define HCC_UNC_POOL_SIZE_ACORE 96
42 #define HCC_UNC_POOL_SIZE_LOW_LIMIT 8
43 #define HCC_IPC_RX_SCH_WATER_LINE 4
44 
45 #define HCC_TX_PROC_FAILED_MAX_NUM 100
46 
47 typedef enum _d2h_srv_msg_type {
48     D2H_MSG_WLAN_WAKEUP_SUCC = D2H_MSG_PLAT_END,       /* wlan device唤醒成功 */
49     D2H_MSG_WLAN_ALLOW_SLEEP = 11,       /* wlan device回复host允许睡眠 */
50     D2H_MSG_WLAN_DISALLOW_SLEEP = 12,    /* wlan device回复host不允许睡眠 */
51     D2H_MSG_WLAN_WAKEUP_REQ = 13,        /* wlan device请求唤醒host */
52     D2H_MSG_HCC_RX_MAX = HCC_RX_MAX_MESSAGE, /* max support msg count */
53 } d2h_srv_msg_type;
54 
55 /* Host to device sdio message type */
56 typedef enum _h2d_srv_msg_type {
57     H2D_MSG_WLAN_WAKE_UP_REQ = H2D_MSG_PLAT_END,  /* wlan host唤醒devcie请求 */
58     H2D_MSG_WLAN_SLEEP_REQ = 11,    /* wlan host请求device睡眠 */
59     H2D_MSG_HCC_HCC_TX_MAX = HCC_TX_MAX_MESSAGE, /* max support msg count */
60 } h2d_srv_msg_type;
61 
62 hcc_queue_cfg *hcc_get_queue_cfg(uint8_t *arr_len);
63 bool hcc_check_bt_queue(uint8_t queue_id);
64 
65 #ifdef __cplusplus
66 #if __cplusplus
67 }
68 #endif
69 #endif
70 
71 #endif /* __HCC_CFG_H__ */
72