pub enum TxStatus {
Free,
Scheduled,
Emitting,
Unknown(u8),
}Expand description
What the transmit chain is doing.
Variants§
Free
Idle, and ready to be given a packet.
Scheduled
Holding a packet, waiting for its trigger.
Emitting
On the air now.
Unknown(u8)
A value the chip does not document, carried so a caller can report it.
Implementations§
Source§impl TxStatus
impl TxStatus
Sourcepub const fn of(value: u8) -> TxStatus
pub const fn of(value: u8) -> TxStatus
Reads the transmit status register.
§Arguments
value- what the status register answered with.
§Returns
What the chain is doing.
§Examples
use pamoja_radios::sx1302::tx::TxStatus;
assert_eq!(TxStatus::of(0x80), TxStatus::Free);
assert_eq!(TxStatus::of(0x91), TxStatus::Scheduled);
assert_eq!(TxStatus::of(0x60), TxStatus::Emitting);Trait Implementations§
impl Copy for TxStatus
impl Eq for TxStatus
impl StructuralPartialEq for TxStatus
Auto Trait Implementations§
impl Freeze for TxStatus
impl RefUnwindSafe for TxStatus
impl Send for TxStatus
impl Sync for TxStatus
impl Unpin for TxStatus
impl UnsafeUnpin for TxStatus
impl UnwindSafe for TxStatus
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more