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: oal type head file. 15 */ 16 17 /***************************************************************************** 18 1 其他头文件包含 19 *****************************************************************************/ 20 21 #ifndef __OAL_TYPES_HCM_H__ 22 #define __OAL_TYPES_HCM_H__ 23 24 #include <osal_types.h> 25 #include "td_base.h" 26 #include "oal_types_device.h" 27 #include "oal_plat_type.h" 28 29 #ifdef __cplusplus 30 #if __cplusplus 31 extern "C" { 32 #endif 33 #endif 34 35 /***************************************************************************** 36 3 宏定义 37 *****************************************************************************/ 38 #ifndef OAL_INLINE 39 #ifdef INLINE_TO_FORCEINLINE 40 #define OAL_INLINE __forceinline 41 #else 42 #define OAL_INLINE inline 43 #endif 44 #endif 45 #undef OAL_STATIC 46 #define OAL_STATIC static 47 48 #if defined(_PRE_PC_LINT) /* 仅适用于PC_LINT工程时 */ 49 #define OAL_VOLATILE 50 #else 51 #define OAL_VOLATILE volatile 52 #endif 53 54 #define oal_reference(data) ((void)(data)) 55 56 #define OAL_CONST const 57 58 #ifndef unref_param 59 #define unref_param(P) ((P) = (P)) 60 #endif 61 62 #ifndef unref_param_prv 63 #define unref_param_prv(P) ((P) = (P)) 64 #endif 65 66 /* linux错误码 */ 67 #define OAL_ETIMEDOUT 110 /* Connection timed out */ 68 69 /* MAC ADDR 移位定义 */ 70 #define MAC_ADDR_0 0 71 #define MAC_ADDR_1 1 72 #define MAC_ADDR_2 2 73 #define MAC_ADDR_3 3 74 #define MAC_ADDR_4 4 75 #define MAC_ADDR_5 5 76 77 /***************************************************************************** 78 4 枚举定义 79 *****************************************************************************/ 80 81 /* 定义功能开关 */ 82 typedef enum { 83 OAL_SWITCH_OFF = 0, 84 OAL_SWITCH_ON = 1, 85 86 OAL_SWITCH_BUTT 87 } oal_switch_enum; 88 typedef osal_u8 oal_switch_enum_uint8; 89 90 /***************************************************************************** 91 5 全局变量声明 92 *****************************************************************************/ 93 94 95 /***************************************************************************** 96 6 消息头定义 97 *****************************************************************************/ 98 99 100 /***************************************************************************** 101 7 消息定义 102 *****************************************************************************/ 103 104 105 /***************************************************************************** 106 8 STRUCT定义 107 *****************************************************************************/ 108 109 110 /***************************************************************************** 111 9 UNION定义 112 *****************************************************************************/ 113 114 115 /***************************************************************************** 116 10 函数声明 117 *****************************************************************************/ 118 119 120 #ifdef __cplusplus 121 #if __cplusplus 122 } 123 #endif 124 #endif 125 126 #endif /* end of file */ 127 128