summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChanwoo Choi <cw00.choi@samsung.com>2024-06-20 15:42:20 +0900
committerChanwoo Choi <cw00.choi@samsung.com>2024-06-20 15:42:20 +0900
commit7bbea53ca07cde62683bd824683e666cba741d26 (patch)
tree4289a5b1dfc800766ee1058139d3a426fb4adb5d /include
parent80fe0de8e6ed6d13e480372a77275786fc8d056f (diff)
downloadradio-7bbea53ca07cde62683bd824683e666cba741d26.tar.gz
radio-7bbea53ca07cde62683bd824683e666cba741d26.tar.bz2
radio-7bbea53ca07cde62683bd824683e666cba741d26.zip
HAL_MODULE_RADIO will support the multiple version of HAL interface. So that v1.0 is first supported version of HAL_MODULE_RADIO. hal-radio-interface-1.h contains the v1.0 HAL interface. Change-Id: I3a4d3e75599c79439f3f4c4a624ba8ed18770cf6 Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'include')
-rw-r--r--include/hal-radio-interface-1.h75
-rw-r--r--include/hal-radio-interface.h53
2 files changed, 76 insertions, 52 deletions
diff --git a/include/hal-radio-interface-1.h b/include/hal-radio-interface-1.h
new file mode 100644
index 0000000..eee1318
--- /dev/null
+++ b/include/hal-radio-interface-1.h
@@ -0,0 +1,75 @@
+/*
+ * HAL (Hardware Abstract Layer) Radio API
+ *
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __HAL_RADIO_INTERFACE_1__
+#define __HAL_RADIO_INTERFACE_1__
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+/**
+ * @brief Enumeration for the radio error.
+ * @since_tizen 6.5
+ */
+typedef enum hal_radio_error {
+ HAL_RADIO_ERROR_NONE,
+ HAL_RADIO_ERROR_INVALID_PARAMETER,
+ HAL_RADIO_ERROR_INVALID_OPERATION,
+ HAL_RADIO_ERROR_PERMISSION_DENIED,
+ HAL_RADIO_ERROR_NOT_SUPPORTED,
+ HAL_RADIO_ERROR_OUT_OF_MEMORY,
+ HAL_RADIO_ERROR_DEVICE_NOT_PREPARED,
+ HAL_RADIO_ERROR_DEVICE_NOT_OPENED,
+ HAL_RADIO_ERROR_DEVICE_NOT_FOUND,
+ HAL_RADIO_ERROR_NO_ANTENNA,
+ HAL_RADIO_ERROR_INTERNAL,
+ HAL_RADIO_ERROR_NOT_IMPLEMENTED,
+ HAL_RADIO_ERROR_UNKNOWN
+} hal_radio_error_t;
+
+/**
+ * @brief Enumeration for the radio seek direction.
+ * @since_tizen 6.5
+ */
+typedef enum hal_radio_seek_direction_type {
+ RADIO_SEEK_DIRECTION_UP, /**< Seek upward */
+ RADIO_SEEK_DIRECTION_DOWN, /**< Seek downward */
+ RADIO_SEEK_NUM
+} hal_radio_seek_direction_type_t;
+
+typedef struct _hal_backend_radio_funcs {
+ hal_radio_error_t (*init)(void **radio_handle);
+ hal_radio_error_t (*deinit)(void *radio_handle);
+ hal_radio_error_t (*prepare)(void *radio_handle);
+ hal_radio_error_t (*unprepare)(void *radio_handle);
+ hal_radio_error_t (*open)(void *radio_handle);
+ hal_radio_error_t (*close)(void *radio_handle);
+ hal_radio_error_t (*start)(void *radio_handle);
+ hal_radio_error_t (*stop)(void *radio_handle);
+ hal_radio_error_t (*seek)(void *radio_handle, hal_radio_seek_direction_type_t direction);
+ hal_radio_error_t (*get_frequency)(void *radio_handle, uint32_t *frequency);
+ hal_radio_error_t (*set_frequency)(void *radio_handle, uint32_t frequency);
+ hal_radio_error_t (*get_signal_strength)(void *radio_handle, int32_t *strength);
+} hal_backend_radio_funcs;
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __HAL_RADIO_INTERFACE_1__ */
diff --git a/include/hal-radio-interface.h b/include/hal-radio-interface.h
index 7ce0412..362bf8e 100644
--- a/include/hal-radio-interface.h
+++ b/include/hal-radio-interface.h
@@ -19,57 +19,6 @@
#ifndef __HAL_RADIO_INTERFACE__
#define __HAL_RADIO_INTERFACE__
-#include <stdint.h>
+#include <hal-radio-interface-1.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-/**
- * @brief Enumeration for the radio error.
- * @since_tizen 6.5
- */
-typedef enum hal_radio_error {
- HAL_RADIO_ERROR_NONE,
- HAL_RADIO_ERROR_INVALID_PARAMETER,
- HAL_RADIO_ERROR_INVALID_OPERATION,
- HAL_RADIO_ERROR_PERMISSION_DENIED,
- HAL_RADIO_ERROR_NOT_SUPPORTED,
- HAL_RADIO_ERROR_OUT_OF_MEMORY,
- HAL_RADIO_ERROR_DEVICE_NOT_PREPARED,
- HAL_RADIO_ERROR_DEVICE_NOT_OPENED,
- HAL_RADIO_ERROR_DEVICE_NOT_FOUND,
- HAL_RADIO_ERROR_NO_ANTENNA,
- HAL_RADIO_ERROR_INTERNAL,
- HAL_RADIO_ERROR_NOT_IMPLEMENTED,
- HAL_RADIO_ERROR_UNKNOWN
-} hal_radio_error_t;
-
-/**
- * @brief Enumeration for the radio seek direction.
- * @since_tizen 6.5
- */
-typedef enum hal_radio_seek_direction_type {
- RADIO_SEEK_DIRECTION_UP, /**< Seek upward */
- RADIO_SEEK_DIRECTION_DOWN, /**< Seek downward */
- RADIO_SEEK_NUM
-} hal_radio_seek_direction_type_t;
-
-typedef struct _hal_backend_radio_funcs {
- hal_radio_error_t (*init)(void **radio_handle);
- hal_radio_error_t (*deinit)(void *radio_handle);
- hal_radio_error_t (*prepare)(void *radio_handle);
- hal_radio_error_t (*unprepare)(void *radio_handle);
- hal_radio_error_t (*open)(void *radio_handle);
- hal_radio_error_t (*close)(void *radio_handle);
- hal_radio_error_t (*start)(void *radio_handle);
- hal_radio_error_t (*stop)(void *radio_handle);
- hal_radio_error_t (*seek)(void *radio_handle, hal_radio_seek_direction_type_t direction);
- hal_radio_error_t (*get_frequency)(void *radio_handle, uint32_t *frequency);
- hal_radio_error_t (*set_frequency)(void *radio_handle, uint32_t frequency);
- hal_radio_error_t (*get_signal_strength)(void *radio_handle, int32_t *strength);
-} hal_backend_radio_funcs;
-
-#ifdef __cplusplus
-}
-#endif
#endif /* __HAL_RADIO_INTERFACE__ */