2 * HAL (Hardware Abstract Layer) Common API
4 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the License);
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
19 #ifndef __HAL_COMMON__
20 #define __HAL_COMMON__
26 enum hal_abi_version {
27 HAL_ABI_VERSION_UNKNOWN = 0,
28 HAL_ABI_VERSION_TIZEN_6_5,
33 HAL_LICENSE_UNKNOWN = 0,
34 HAL_LICENSE_APACHE_2_0,
41 HAL_GROUP_UNKNOWN = 0,
44 HAL_GROUP_CONNECTIVITY,
48 HAL_GROUP_MISCELLANEOUS,
53 HAL_MODULE_UNKNOWN = 0,
55 /* HAL_GROUP_GRAPHICS */
61 /* HAL_GROUP_MULTIMEDIA */
62 HAL_MODULE_AUDIO = 15,
69 /* HAL_GROUP_CONNECTIVITY */
70 HAL_MODULE_BLUETOOTH = 30,
78 /* HAL_GROUP_TELEPHONY */
79 HAL_MODULE_TELPEPHONY = 45,
81 /* HAL_GROUP_LOCATION */
82 HAL_MODULE_LOCATION = 50,
84 /* HAL_GROUP_SYSTEM */
85 HAL_MODULE_COMMON = 55,
88 HAL_MODULE_PERIPHERAL,
89 HAL_MODULE_DEVICE_BATTERY,
90 HAL_MODULE_DEVICE_BEZEL,
91 HAL_MODULE_DEVICE_DISPLAY,
93 HAL_MODULE_DEVICE_TOUCHSCREEN,
94 HAL_MODULE_DEVICE_LED,
95 HAL_MODULE_DEVICE_BOARD,
96 HAL_MODULE_DEVICE_EXTERNAL_CONNECTION,
97 HAL_MODULE_DEVICE_THERMAL,
98 HAL_MODULE_DEVICE_USB_GADGET,
99 HAL_MODULE_DEVICE_HAPTIC,
101 /* HAL_GROUP_MISCELLANEOUS */
102 HAL_MODULE_FOO, /* FIXME: Add for test and will be removed */
107 * @brief Get the backend library name according to the type of HAL module
108 * @param[in] HAL module id among enum hal_moudle
109 * @return @c backend library name on success and don't need to be freed
110 * due to the global variable, otherwise NULL.
112 const char *hal_common_get_backend_library_name(enum hal_module handle);
115 * @brief Get the backend symbol name according to the type of HAL module
116 * @param[in] HAL module id among enum hal_moudle
117 * @return @c backend library name on success and don't need to be freed
118 * due to the global variable, otherwise NULL.
120 const char *hal_common_get_backend_symbol_name(enum hal_module handle);
123 * @brief Check HAL ABI version whehter is suppored or not on current platform
124 * @param[in] HAL module id among enum hal_moudle
125 * @param[in] HAL ABI version of backend module among enum hal_abi_version
126 * @return @c 0 on success, otherwise a negative error value
128 int hal_common_check_backend_abi_version(enum hal_module handle,
129 enum hal_abi_version abi_version);
134 #endif /* __HAL_COMMON__ */