(value: u8)
| 62 | } |
| 63 | |
| 64 | pub fn set_haptic_intensity(value: u8) -> Result<(), HidError> { |
| 65 | if !HAPTIC_INTENSITY_LEVELS.contains(&value) { |
| 66 | return Err(hid_err(format!( |
| 67 | "Haptic intensity must be one of: {:?}", |
| 68 | HAPTIC_INTENSITY_LEVELS |
| 69 | ))); |
| 70 | } |
| 71 | let device = |
| 72 | open_haptic_touchpad().ok_or_else(|| hid_err("Could not find a haptic touchpad"))?; |
| 73 | let buf = [HAPTIC_INTENSITY_REPORT_ID, value]; |
| 74 | debug!(" send_feature_report (haptic intensity) {:X?}", buf); |
| 75 | device.send_feature_report(&buf) |
| 76 | } |
| 77 | |
| 78 | pub fn set_click_force(force: ClickForce) -> Result<(), HidError> { |
| 79 | let device = |
no test coverage detected