• 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  *
15  * Description: hilink function mapping \n
16  *
17  * History: \n
18  * 2024-01-27, Create file. \n
19  */
20 #ifndef HILINK_CALL_H
21 #define HILINK_CALL_H
22 
23 #include "func_call_list.h"
24 #include "app_function_mapping.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 #define HILINK_TBL get_hilink_tbl()
31 #define hilink_call0(nr, t) \
32     ((t (*)(void))(HILINK_TBL[nr]))()
33 #define hilink_call1(nr, t, t1, p1) \
34     ((t (*)(t1))(HILINK_TBL[nr]))(p1)
35 #define hilink_call2(nr, t, t1, p1, t2, p2) \
36     ((t (*)(t1, t2))(HILINK_TBL[nr]))(p1, p2)
37 #define hilink_call3(nr, t, t1, p1, t2, p2, t3, p3) \
38     ((t (*)(t1, t2, t3))(HILINK_TBL[nr]))(p1, p2, p3)
39 #define hilink_call4(nr, t, t1, p1, t2, p2, t3, p3, t4, p4) \
40     ((t (*)(t1, t2, t3, t4))(HILINK_TBL[nr]))(p1, p2, p3, p4)
41 #define hilink_call5(nr, t, t1, p1, t2, p2, t3, p3, t4, p4, t5, p5) \
42     ((t (*)(t1, t2, t3, t4, t5))(HILINK_TBL[nr]))(p1, p2, p3, p4, p5)
43 #define hilink_call6(nr, t, t1, p1, t2, p2, t3, p3, t4, p4, t5, p5, t6, p6) \
44     ((t (*)(t1, t2, t3, t4, t5, t6))(HILINK_TBL[nr]))(p1, p2, p3, p4, p5, p6)
45 #define hilink_call7(nr, t, t1, p1, t2, p2, t3, p3, t4, p4, t5, p5, t6, p6, t7, p7) \
46     ((t (*)(t1, t2, t3, t4, t5, t6, t7))(HILINK_TBL[nr]))(p1, p2, p3, p4, p5, p6, p7)
47 
48 #ifdef __cplusplus
49 }
50 #endif
51 #endif
52