haptic: Add API explanation for memory handling 89/311489/1
authorYunhee Seo <yuni.seo@samsung.com>
Wed, 22 May 2024 01:48:08 +0000 (10:48 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Wed, 22 May 2024 01:48:08 +0000 (10:48 +0900)
The explanation was insufficient in the haptic APIs.
Thus, how to handle the memory of the parameter explanation is added.
Also, unncessary duplicated variable explanation is removed.

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

index 58bd052..e1985a6 100644 (file)
@@ -71,6 +71,7 @@ int device_haptic_get_count(int *device_number);
  * @privlevel public
  * @privilege %http://tizen.org/privilege/haptic
  * @remarks You must close the Haptic API using device_haptic_close().
+ * @remarks The @a device_handle should be released using device_haptic_close().
  * @param[in] device_index The index of device what you want to vibrate \n
  *                         The index starts from @c 0
  * @param[out] device_handle The handle of vibrator
@@ -81,6 +82,14 @@ int device_haptic_get_count(int *device_number);
  * @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied
  * @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed
  * @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device
+ * @code
+ * #include <device/haptic.h>
+ * ...
+ * haptic_device_h haptic_device;
+ * int ret = device_haptic_open(0, &haptic_device);
+ * ...
+ * ret = device_haptic_close(haptic_device);
+ * @endcode
  * @see device_haptic_close()
  */
 int device_haptic_open(int device_index, haptic_device_h *device_handle);
@@ -112,7 +121,7 @@ int device_haptic_close(haptic_device_h device_handle);
  * @privlevel public
  * @privilege %http://tizen.org/privilege/haptic
  * @remarks @a feedback level is reserved for auto changing to save variable in the settings.
- * @remarks @a effect_handle effect_handle value can be @c 0(zero).
+ * @remarks @a effect_handle value can be @c 0(zero).
  * @remarks To prevent unexpected sleep (suspend) during vibration, please use @ref CAPI_SYSTEM_DEVICE_POWER_MODULE.
  * @param[in] device_handle The device handle from device_haptic_open()
  * @param[in] duration The play duration in milliseconds