mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-15 20:19:23 +00:00
chore(core/rust): add uDebug capability to more places
This commit is contained in:
parent
ef90546324
commit
0be96cb70b
@ -26,6 +26,7 @@ use super::Paginate;
|
|||||||
/// Type used by components that do not return any messages.
|
/// Type used by components that do not return any messages.
|
||||||
///
|
///
|
||||||
/// Alternative to the yet-unstable `!`-type.
|
/// Alternative to the yet-unstable `!`-type.
|
||||||
|
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||||
pub enum Never {}
|
pub enum Never {}
|
||||||
|
|
||||||
/// User interface is composed of components that can react to `Event`s through
|
/// User interface is composed of components that can react to `Event`s through
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/// Common message type for pagination components.
|
/// Common message type for pagination components.
|
||||||
|
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||||
pub enum PageMsg<T> {
|
pub enum PageMsg<T> {
|
||||||
/// Pass-through from paged component.
|
/// Pass-through from paged component.
|
||||||
Content(T),
|
Content(T),
|
||||||
|
@ -579,6 +579,7 @@ impl Alignment2D {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, PartialEq, Eq)]
|
#[derive(Copy, Clone, PartialEq, Eq)]
|
||||||
|
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||||
pub enum Axis {
|
pub enum Axis {
|
||||||
Horizontal,
|
Horizontal,
|
||||||
Vertical,
|
Vertical,
|
||||||
|
@ -32,6 +32,7 @@ const CONTENT_AREA: Rect = Rect::new(
|
|||||||
);
|
);
|
||||||
|
|
||||||
#[derive(Copy, Clone, ToPrimitive)]
|
#[derive(Copy, Clone, ToPrimitive)]
|
||||||
|
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||||
pub enum ConfirmMsg {
|
pub enum ConfirmMsg {
|
||||||
Cancel = 1,
|
Cancel = 1,
|
||||||
Confirm = 2,
|
Confirm = 2,
|
||||||
|
@ -16,6 +16,7 @@ use crate::{
|
|||||||
|
|
||||||
use super::theme;
|
use super::theme;
|
||||||
|
|
||||||
|
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||||
pub enum ButtonMsg {
|
pub enum ButtonMsg {
|
||||||
Pressed,
|
Pressed,
|
||||||
Released,
|
Released,
|
||||||
@ -551,6 +552,7 @@ impl Button {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||||
pub enum CancelConfirmMsg {
|
pub enum CancelConfirmMsg {
|
||||||
Cancelled,
|
Cancelled,
|
||||||
Confirmed,
|
Confirmed,
|
||||||
@ -562,12 +564,14 @@ type CancelInfoConfirm<F0, F1, F2> =
|
|||||||
type CancelConfirm<F0, F1> = FixedHeightBar<Split<MsgMap<Button, F0>, MsgMap<Button, F1>>>;
|
type CancelConfirm<F0, F1> = FixedHeightBar<Split<MsgMap<Button, F0>, MsgMap<Button, F1>>>;
|
||||||
|
|
||||||
#[derive(Clone, Copy)]
|
#[derive(Clone, Copy)]
|
||||||
|
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||||
pub enum CancelInfoConfirmMsg {
|
pub enum CancelInfoConfirmMsg {
|
||||||
Cancelled,
|
Cancelled,
|
||||||
Info,
|
Info,
|
||||||
Confirmed,
|
Confirmed,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||||
pub enum SelectWordMsg {
|
pub enum SelectWordMsg {
|
||||||
Selected(usize),
|
Selected(usize),
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@ use crate::{
|
|||||||
|
|
||||||
use super::theme;
|
use super::theme;
|
||||||
|
|
||||||
|
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||||
pub enum DialogMsg<T, U> {
|
pub enum DialogMsg<T, U> {
|
||||||
Content(T),
|
Content(T),
|
||||||
Controls(U),
|
Controls(U),
|
||||||
|
@ -23,6 +23,7 @@ const SCROLLBAR_HEIGHT: i16 = 10;
|
|||||||
const APP_NAME_PADDING: i16 = 12;
|
const APP_NAME_PADDING: i16 = 12;
|
||||||
const APP_NAME_HEIGHT: i16 = 30;
|
const APP_NAME_HEIGHT: i16 = 30;
|
||||||
|
|
||||||
|
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||||
pub enum FidoMsg {
|
pub enum FidoMsg {
|
||||||
Confirmed(usize),
|
Confirmed(usize),
|
||||||
Cancelled,
|
Cancelled,
|
||||||
|
@ -21,6 +21,7 @@ pub struct Frame<T> {
|
|||||||
content: Child<T>,
|
content: Child<T>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||||
pub enum FrameMsg<T> {
|
pub enum FrameMsg<T> {
|
||||||
Content(T),
|
Content(T),
|
||||||
Button(CancelInfoConfirmMsg),
|
Button(CancelInfoConfirmMsg),
|
||||||
|
@ -61,6 +61,7 @@ pub struct Homescreen {
|
|||||||
delay: Timer,
|
delay: Timer,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||||
pub enum HomescreenMsg {
|
pub enum HomescreenMsg {
|
||||||
Dismissed,
|
Dismissed,
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ use crate::{
|
|||||||
|
|
||||||
pub const MNEMONIC_KEY_COUNT: usize = 9;
|
pub const MNEMONIC_KEY_COUNT: usize = 9;
|
||||||
|
|
||||||
|
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||||
pub enum MnemonicKeyboardMsg {
|
pub enum MnemonicKeyboardMsg {
|
||||||
Confirmed,
|
Confirmed,
|
||||||
Previous,
|
Previous,
|
||||||
|
@ -20,6 +20,7 @@ use crate::{
|
|||||||
|
|
||||||
use core::cell::Cell;
|
use core::cell::Cell;
|
||||||
|
|
||||||
|
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||||
pub enum PassphraseKeyboardMsg {
|
pub enum PassphraseKeyboardMsg {
|
||||||
Confirmed,
|
Confirmed,
|
||||||
Cancelled,
|
Cancelled,
|
||||||
|
@ -23,6 +23,7 @@ use crate::{
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||||
pub enum PinKeyboardMsg {
|
pub enum PinKeyboardMsg {
|
||||||
Confirmed,
|
Confirmed,
|
||||||
Cancelled,
|
Cancelled,
|
||||||
|
@ -9,6 +9,7 @@ use crate::ui::{
|
|||||||
};
|
};
|
||||||
use heapless::Vec;
|
use heapless::Vec;
|
||||||
|
|
||||||
|
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||||
pub enum SelectWordCountMsg {
|
pub enum SelectWordCountMsg {
|
||||||
Selected(u32),
|
Selected(u32),
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ use crate::{
|
|||||||
|
|
||||||
use super::{theme, Button, ButtonMsg};
|
use super::{theme, Button, ButtonMsg};
|
||||||
|
|
||||||
|
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||||
pub enum NumberInputDialogMsg {
|
pub enum NumberInputDialogMsg {
|
||||||
Selected,
|
Selected,
|
||||||
InfoRequested,
|
InfoRequested,
|
||||||
|
Loading…
Reference in New Issue
Block a user