device-board: Separate device-board header files 30/309330/4
authorYunhee Seo <yuni.seo@samsung.com>
Mon, 8 Apr 2024 09:44:25 +0000 (18:44 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 15 Apr 2024 07:27:48 +0000 (07:27 +0000)
To apply HAL ABI Versioning, existing interface file is devided.
Below is a description of the purpose of header files.

hal-device-board-types.h
 -> Common data types like structures or enums used between the device-board
    HAL-API and HAL-BACKEND
hal-device-board-interface-1.h
 -> Declaration of functions to be implemented in the device-board HAL-BACKEND(Major version 1),
    as well as definitions of data structures used between the HAL-API and HAL-BACKEND(Major version 1)
hal-device-board-interface.h
 -> Includes the hal-device-board-interface-[major].h files for each supported
    major version.
hal-device-board.h
 -> Declaration of the device-board HAL-API functions

Change-Id: Ic225f2fbf6a13fbef24a1ef9ccc05e7ff816db97
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
include/hal-device-board-interface-1.h [new file with mode: 0644]
include/hal-device-board-interface.h

diff --git a/include/hal-device-board-interface-1.h b/include/hal-device-board-interface-1.h
new file mode 100644 (file)
index 0000000..f295c37
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * 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_DEVICE_BOARD_INTERFACE_1_H__
+#define __HAL_DEVICE_BOARD_INTERFACE_1_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _hal_backend_device_board_funcs {
+       /* Serial number of this device */
+       int (*get_device_serial_number)(char *buffer, const int max_len);
+       int (*get_device_revision)(int *revision);
+
+       int (*set_boot_success)(void);
+       int (*clear_boot_mode)(void);
+       int (*get_boot_mode)(char *buffer, const int max_len);
+       int (*get_boot_reason)(char *buffer, const int max_len);
+
+       int (*get_current_partition)(char *partition_ab);
+       int (*switch_partition)(char partition_ab);
+       int (*set_partition_ab_cloned)(void);
+       int (*clear_partition_ab_cloned)(void);
+       int (*get_partition_ab_cloned)(int *cloned);
+       int (*set_partition_status)(char partition_ab, const char *status);
+       int (*get_partition_status)(char partition_ab, char *buffer, const int max_len);
+
+       int (*set_upgrade_status)(int status);
+       int (*get_upgrade_status)(int *status);
+} hal_backend_device_board_funcs;
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __HAL_DEVICE_BOARD_INTERFACE_1_H__ */
index c083ae0cac71ca6fe8a13d34bd0c4ccf05f4f6a6..7b90c5b25c165e883e3c3c23a03cafad7f9a19ea 100644 (file)
  */
 
 
-#ifndef __HAL_BOARD_INTERFACE_H__
-#define __HAL_BOARD_INTERFACE_H__
+#ifndef __HAL_DEVICE_BOARD_INTERFACE_H__
+#define __HAL_DEVICE_BOARD_INTERFACE_H__
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include "hal-device-board-interface-1.h"
 
-typedef struct _hal_backend_device_board_funcs {
-       /* Serial number of this device */
-       int (*get_device_serial_number)(char *buffer, const int max_len);
-       int (*get_device_revision)(int *revision);
-
-       int (*set_boot_success)(void);
-       int (*clear_boot_mode)(void);
-       int (*get_boot_mode)(char *buffer, const int max_len);
-       int (*get_boot_reason)(char *buffer, const int max_len);
-
-       int (*get_current_partition)(char *partition_ab);
-       int (*switch_partition)(char partition_ab);
-       int (*set_partition_ab_cloned)(void);
-       int (*clear_partition_ab_cloned)(void);
-       int (*get_partition_ab_cloned)(int *cloned);
-       int (*set_partition_status)(char partition_ab, const char *status);
-       int (*get_partition_status)(char partition_ab, char *buffer, const int max_len);
-
-       int (*set_upgrade_status)(int status);
-       int (*get_upgrade_status)(int *status);
-
-} hal_backend_device_board_funcs;
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* __HAL_BOARD_INTERFACE_H__ */
+#endif /* __HAL_DEVICE_BOARD_INTERFACE_H__ */