summaryrefslogtreecommitdiffstats
path: root/include/hardware_legacy/vibrator.h
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-11-04 11:40:08 -0700
committerDianne Hackborn <hackbod@google.com>2010-11-04 12:05:45 -0700
commit7314fe03b6cc7c16d49aacbe59840d8724f6852e (patch)
tree48fc9aebef6bc1d304cd584050a24e336ca05676 /include/hardware_legacy/vibrator.h
parent1cb1728b1870a5e37360f65864a3642d5a37b21c (diff)
downloadhardware_libhardware_legacy-7314fe03b6cc7c16d49aacbe59840d8724f6852e.zip
hardware_libhardware_legacy-7314fe03b6cc7c16d49aacbe59840d8724f6852e.tar.gz
hardware_libhardware_legacy-7314fe03b6cc7c16d49aacbe59840d8724f6852e.tar.bz2
Add an API to find out whether there is a vibrator.
Change-Id: Ic0d967bc72c542fc6a97331c9197114f3f571c08
Diffstat (limited to 'include/hardware_legacy/vibrator.h')
-rw-r--r--include/hardware_legacy/vibrator.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/hardware_legacy/vibrator.h b/include/hardware_legacy/vibrator.h
index 15fd942..7994f62 100644
--- a/include/hardware_legacy/vibrator.h
+++ b/include/hardware_legacy/vibrator.h
@@ -22,6 +22,13 @@ extern "C" {
#endif
/**
+ * Return whether the device has a vibrator.
+ *
+ * @return 1 if a vibrator exists, 0 if it doesn't.
+ */
+int vibrator_exists();
+
+/**
* Turn on vibrator
*
* @param timeout_ms number of milliseconds to vibrate