mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-27 09:58:27 +00:00
0e70fcdc6f
[no changelog]
27 lines
505 B
C
27 lines
505 B
C
|
|
#ifndef TREZORHAL_HAPTIC_H
|
|
#define TREZORHAL_HAPTIC_H
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
|
|
typedef enum {
|
|
HAPTIC_BUTTON_PRESS = 0,
|
|
HAPTIC_ALERT = 1,
|
|
HAPTIC_HOLD_TO_CONFIRM = 2,
|
|
} haptic_effect_t;
|
|
|
|
// Initialize haptic driver
|
|
void haptic_init(void);
|
|
|
|
// Calibrate haptic driver
|
|
void haptic_calibrate(void);
|
|
|
|
// Test haptic driver, plays a maximum amplitude for the given duration
|
|
bool haptic_test(uint16_t duration_ms);
|
|
|
|
// Play haptic effect
|
|
void haptic_play(haptic_effect_t effect);
|
|
|
|
#endif
|