temperature: Enhance API description 67/318567/2
authorYunhee Seo <yuni.seo@samsung.com>
Wed, 2 Oct 2024 00:59:40 +0000 (09:59 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Wed, 2 Oct 2024 10:04:58 +0000 (19:04 +0900)
To improve readability and facilitate comprehension,
more detailed API descriptions are added.

Change-Id: I17ba0ccc3c7fd996c07341c1e5d1d7cd18ecd3bf
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
include/temperature.h

index 91fea6da55b56324f584cac57fe20abe0027d1e7..2ec287492237a9707011b94d83512213750707e7 100644 (file)
@@ -47,16 +47,33 @@ typedef enum
 
 
 /**
- * @brief Gets the temperature value.
+ * @brief Gets the temperature value based on the specified device type.
+ * @details Retrieves the current temperature value of a specified device.
  * @since_tizen 5.5
+ * @remarks Ensure that the provided @a temp pointer is valid and has enough memory allocated.
  * @param[in] type The index of the device
+ *                 DEVICE_THERMAL_AP \n
+ *                 DEVICE_THERMAL_CP \n
+ *                 DEVICE_THERMAL_BATTERY
  * @param[out] temp The temperature value in degrees Celsius
- * @return @c 0 on success,
- *         otherwise a negative error value
+ * @return @c 0 on success, otherwise a negative error value
  * @retval #DEVICE_ERROR_NONE Successful
  * @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device
  * @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed
+ * @code
+ * #include <device/temperature.h>
+ * ...
+ * int temperature = 0;
+ * int ret = 0;
+ * ...
+ * ret = device_thermal_get_temperature(DEVICE_THERMAL_AP, &temperature);
+ * if (ret == DEVICE_ERROR_NONE) {
+ *     ...
+ * }
+ * ...
+ * @endcode
+ * @see device_thermal_e
  */
 int device_thermal_get_temperature(device_thermal_e type, int *temp);