mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-24 05:12:02 +00:00
feat(eckhart): Add new Button 'is_pressed' function
This commit is contained in:
parent
cc58661aac
commit
f2cffa5d50
@ -135,6 +135,10 @@ impl Button {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn is_pressed(&self) -> bool {
|
||||||
|
matches!(self.state, State::Pressed)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn is_long_press(&self) -> bool {
|
pub fn is_long_press(&self) -> bool {
|
||||||
self.long_press.is_some()
|
self.long_press.is_some()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user