1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-04-21 01:29:02 +00:00

feat(eckhart): Add new Button 'is_pressed' function

This commit is contained in:
Lukas Bielesch 2025-02-16 11:41:15 +01:00 committed by obrusvit
parent 6a44af5c8c
commit fdb2f1542b

View File

@ -135,6 +135,10 @@ impl Button {
)
}
pub fn is_pressed(&self) -> bool {
matches!(self.state, State::Pressed)
}
pub fn long_press(&self) -> Option<Duration> {
self.long_press
}