vibrator_device Struct Reference

vibrator_device Struct Reference

#include < vibrator.h >

Data Fields

struct hw_device_t   common
 
int(*  vibrator_on )(struct vibrator_device *vibradev, unsigned int timeout_ms)
 
int(*  vibrator_off )(struct vibrator_device *vibradev)
 

Detailed Description

Definition at line 37 of file vibrator.h .

Field Documentation

struct hw_device_t common

Common methods of the vibrator device. This must be the first member of vibrator_device as users of this structure will cast a hw_device_t to vibrator_device pointer in contexts where it's known the hw_device_t references a vibrator_device .

Definition at line 44 of file vibrator.h .

int(* vibrator_off)(struct vibrator_device *vibradev)

Turn off vibrator

Cancel a previously-started vibration, if any.

Returns
0 in case of success, negative errno code else

Definition at line 63 of file vibrator.h .

int(* vibrator_on)(struct vibrator_device *vibradev, unsigned int timeout_ms)

Turn on vibrator

This function must only be called after the previous timeout has expired or was canceled (through vibrator_off() ).

Parameters
timeout_ms number of milliseconds to vibrate
Returns
0 in case of success, negative errno code else

Definition at line 55 of file vibrator.h .


The documentation for this struct was generated from the following file: