You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/core/embed/rust/src/trezorhal/haptic.rs

20 lines
427 B

use super::ffi;
#[derive(PartialEq, Debug, Eq, FromPrimitive, Clone, Copy)]
pub enum HapticEffect {
ButtonPress = ffi::haptic_effect_t_HAPTIC_BUTTON_PRESS as _,
HoldToConfirm = ffi::haptic_effect_t_HAPTIC_HOLD_TO_CONFIRM as _,
}
pub fn play(effect: HapticEffect) {
unsafe {
//ffi::haptic_play(effect as _);
}
}
pub fn play_raw(effect: u8) {
unsafe {
ffi::haptic_play_raw(effect);
}
}