Add description for the declaration of the hal api functions 71/273371/6 submit/tizen/20220408.012128
authorSangYoun Kwak <sy.kwak@samsung.com>
Tue, 5 Apr 2022 04:59:48 +0000 (13:59 +0900)
committerSangYoun Kwak <sy.kwak@samsung.com>
Tue, 5 Apr 2022 07:40:11 +0000 (07:40 +0000)
Change-Id: Ic8c97770f793c145302e9e943a14e66f65b7f4b2
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
include/hal-board.h

index 735180690598fc0fe09374eed73c89f193dcb50e..7f70fc939a1196695343b309d12940455b798ac8 100644 (file)
 extern "C" {
 #endif
 
+/**
+ * @brief Initialize hal_board_funcs, which contains hal backend board functions
+ *
+ * @return 0 on success, otherwise a negative error value
+ */
 int hal_device_board_get_backend(void);
+
+/**
+ * @brief Release hal_board_funcs and set it to NULL
+ *
+ * @return 0 if it is successful or hal_board_funcs is NULL, else negative error value
+ */
 int hal_device_board_put_backend(void);
 
+/**
+ * @brief Get device serial number and save it to a buffer
+ *
+ * @param[in] len Buffer size
+ * @param[out] buffer Serial number
+ *
+ * @return 0 on success, otherwise a negative error value
+ */
 int hal_device_board_get_device_serial_number(char *buffer, int len);
+
+/**
+ * @brief Get device revision (not in use, no hal backend function)
+ *
+ * @param[out] revision Revision number
+ *
+ * @return 0 on success, otherwise a negative error value
+ */
 int hal_device_board_get_device_revision(int *revision);
 
+
+/**
+ * @brief Set the BOOT_SUCCESS flag
+ *
+ * @return 0 on success, otherwise a negative error value
+ */
 int hal_device_board_set_boot_success(void);
+
+/**
+ * @brief Clear the BOOT_SUCCESS flag
+ *
+ * @return 0 on success, otherwise a negative error value
+ */
 int hal_device_board_clear_boot_mode(void);
+
+/**
+ * @brief Get the boot mode ("fota", "recovery", "normal")
+ *
+ * @param[in] len Buffer size
+ * @param[out] buffer boot mode
+ *
+ * @return 0 on success, otherwise a negative error value
+ */
 int hal_device_board_get_boot_mode(char *buffer, int len);
-int hal_device_board_get_boot_reason(char *buffer, int len);
 
+/**
+ * @brief Get the boot reason (not in use)
+ *
+ * @param[in] len Buffer size
+ * @param[out] buffer boot mode
+ *
+ * @return 0 on success, otherwise a negative error value
+ */
+int hal_device_board_get_boot_reason(char *buffer, int len);// not in use
+
+
+/**
+ * @brief Switch partition to partition_ab ('a' or 'b')
+ *
+ * @param[in] partition_ab Partition name to switch to ('a' or 'b')
+ *
+ * @return 0 on success, otherwise a negative error value
+ */
 int hal_device_board_switch_partition(char partition_ab);
+
+/**
+ * @brief Set ithe cloned flag (for partition a, b)
+ *
+ * @return 0 on success, otherwise a negative error value
+ */
 int hal_device_board_set_partition_ab_cloned(void);
+
+/**
+ * @brief Clear the cloned flag (for partition a, b)
+ *
+ * @return 0 on success, otherwise a negative error value
+ */
 int hal_device_board_clear_partition_ab_cloned(void);
+
+/**
+ * @brief Get the cloned flag (for partition a, b)
+ *
+ * @param[out] cloned Flag if partition a, b are cloned(1) or not(0)
+ *
+ * @return 0 on success, otherwise a negative error value
+ */
 int hal_device_board_get_partition_ab_cloned(int *cloned);
 
+
+/**
+ * @brief Set upgrade status
+ *
+ * @param[in] status Upgrade status
+ *
+ * @return 0 on success, otherwise a negative error value
+ */
 int hal_device_board_set_upgrade_status(int status);
+
+/**
+ * @brief Get upgrade status
+ *
+ * @param[out] status Upgrade status (-1 if upgrade fail, otherwise 0~100)
+ *
+ * @return 0 on success, otherwise a negative error value
+ */
 int hal_device_board_get_upgrade_status(int *status);
 
 #ifdef __cplusplus