1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-02 04:18:20 +00:00

rust exposure

This commit is contained in:
tychovrahe 2024-11-08 13:11:03 +01:00
parent 02ad6060c5
commit 2eb0a60409

View File

@ -6,6 +6,7 @@ pub enum BLEEvent {
Connected, Connected,
Disconnected, Disconnected,
PairingRequest(&'static [u8]), PairingRequest(&'static [u8]),
PairingCanceled,
} }
impl BLEEvent { impl BLEEvent {
@ -14,6 +15,7 @@ impl BLEEvent {
1 => Self::Connected, 1 => Self::Connected,
2 => Self::Disconnected, 2 => Self::Disconnected,
3 => Self::PairingRequest(data), 3 => Self::PairingRequest(data),
4 => Self::PairingCanceled,
_ => return Err(Error::OutOfRange), _ => return Err(Error::OutOfRange),
}; };
Ok(result) Ok(result)