pub enum InstructionOperands {
JMP {
condition: JmpCondition,
address: u8,
},
WAIT {
polarity: u8,
source: WaitSource,
},
IN {
source: InSource,
bit_count: u8,
},
OUT {
destination: OutDestination,
bit_count: u8,
},
PUSH {
if_full: bool,
block: bool,
},
PULL {
if_empty: bool,
block: bool,
},
MOV {
destination: MovDestination,
op: MovOperation,
source: MovSource,
},
MOVTORX {
fifo_index: MovRxIndex,
},
MOVFROMRX {
fifo_index: MovRxIndex,
},
IRQ {
clear: bool,
wait: bool,
index: u8,
index_mode: IrqIndexMode,
},
SET {
destination: SetDestination,
data: u8,
},
}Variants§
JMP
WAIT
IN
OUT
PUSH
PULL
MOV
MOVTORX
Fields
§
fifo_index: MovRxIndexMOVFROMRX
Fields
§
fifo_index: MovRxIndexIRQ
SET
Implementations§
Source§impl InstructionOperands
impl InstructionOperands
Sourcepub const fn encode(&self) -> u16
pub const fn encode(&self) -> u16
Encode these operands into binary representation. Note that this output does not take side set and delay into account.
Sourcepub fn decode(instruction: u16) -> Option<InstructionOperands>
pub fn decode(instruction: u16) -> Option<InstructionOperands>
Decode operands from binary representation. Note that this output does not take side set and delay into account.
Trait Implementations§
Source§impl Clone for InstructionOperands
impl Clone for InstructionOperands
Source§fn clone(&self) -> InstructionOperands
fn clone(&self) -> InstructionOperands
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for InstructionOperands
Auto Trait Implementations§
impl Freeze for InstructionOperands
impl RefUnwindSafe for InstructionOperands
impl Send for InstructionOperands
impl Sync for InstructionOperands
impl Unpin for InstructionOperands
impl UnsafeUnpin for InstructionOperands
impl UnwindSafe for InstructionOperands
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