mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-06-26 01:42:34 +00:00
feat(eckhart): Add new Button 'is_pressed' function
This commit is contained in:
parent
a72000a7e4
commit
c3fb5d706d
@ -135,6 +135,10 @@ impl Button {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn is_pressed(&self) -> bool {
|
||||||
|
matches!(self.state, State::Pressed)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn long_press(&self) -> Option<Duration> {
|
pub fn long_press(&self) -> Option<Duration> {
|
||||||
self.long_press
|
self.long_press
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user