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:
parent
02ad6060c5
commit
2eb0a60409
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user