From 3718286edea49d09793f9f289e535857db20710a Mon Sep 17 00:00:00 2001 From: Yunhee Seo Date: Wed, 22 May 2024 10:48:08 +0900 Subject: [PATCH] haptic: Add API explanation for memory handling 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 --- include/haptic.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/haptic.h b/include/haptic.h index 58bd052..e1985a6 100644 --- a/include/haptic.h +++ b/include/haptic.h @@ -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 + * ... + * 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 -- 2.7.4