int nDeviceIndex = nDeviceCount - 1;
+ int nDuration = 20;
+ int nFeedback = 50; // 0~100
+ haptic_effect_h pHapticEffect;
+
// Target API
nRet = device_haptic_open(nDeviceIndex, &hHapticDevice);
PRINT_RESULT(DEVICE_ERROR_NONE, nRet, "device_haptic_open", DeviceGetError(nRet));
CHECK_HANDLE(hHapticDevice, "device_haptic_open");
+ nRet = device_haptic_vibrate(hHapticDevice, nDuration, nFeedback, &pHapticEffect);
+
// Target API
nRet = device_haptic_close(hHapticDevice);
PRINT_RESULT(DEVICE_ERROR_NONE, nRet, "device_haptic_close", DeviceGetError(nRet));
}
#endif //COMMON_IOT
/** @} */
-/** @} */
\ No newline at end of file
+/** @} */