vibrator_device 結構體參考資料
   vibrator_device 結構體參考資料
 
  
   #include <
   
    vibrator.h
   
   >
  
 
| 資料欄位 | |
| struct hw_device_t | 通用 | 
| int(* | vibrator_on )(struct vibrator_device *vibradev, unsigned int timeout_ms) | 
| int(* | vibrator_off )(struct vibrator_device *vibradev) | 
詳細說明
定義位於檔案 vibrator.h 的第 37 行。
欄位說明文件
| struct hw_device_t common | 
震動器裝置的常用方法。這個 必須是 vibrator_device 的首位成員,因為這個結構的使用者會在已知 hw_device_t 參照 vibrator_device 的情況下,將 hw_device_t 指派給 vibrator_device 指標。
定義位於檔案 vibrator.h 的 44 行。
| int(* vibrator_off)(struct vibrator_device *vibradev) | 
| int(* vibrator_on)(struct vibrator_device *vibradev, unsigned int timeout_ms) | 
開啟震動器
此函式只能在先前的逾時期限到期或已取消 (透過 vibrator_off() ) 後呼叫。
- 參數
- 
     timeout_ms 震動的毫秒數 
- 退貨
- 成功則為 0,否則為負 errno 代碼
定義位於檔案 vibrator.h 的 55 行。
這個結構體的說明文件是由下列檔案產生:
- hardware/libhardware/include/hardware/ vibrator.h
