Trait avr_oxide::hal::generic::cpu::Cpu

source ·
pub trait Cpu {
    // Required method
    unsafe fn write_protected(
        &mut self,
        change: ConfigurationChange,
        register: &mut u8,
        value: u8
    );

    // Provided methods
    fn read_sp(&self) -> u16 { ... }
    unsafe fn write_sp(&mut self, sp: u16) { ... }
    fn read_sreg(&self) -> u8 { ... }
    unsafe fn write_sreg(&mut self, sregval: u8) { ... }
    fn interrupts_enabled(&self) -> bool { ... }
    fn in_isr(&self) -> bool { ... }
}

Required Methods§

source

unsafe fn write_protected( &mut self, change: ConfigurationChange, register: &mut u8, value: u8 )

Write to a protected register.

Provided Methods§

source

fn read_sp(&self) -> u16

Read the current stack pointer.

Note that it is critical this function is inlined if it is to read the SP value you expect :-).

source

unsafe fn write_sp(&mut self, sp: u16)

Write the stack pointer.

Note that it is critical this function is inlined if it is to read the SP value you expect :-).

source

fn read_sreg(&self) -> u8

Read the current status register

source

unsafe fn write_sreg(&mut self, sregval: u8)

Write the status register

source

fn interrupts_enabled(&self) -> bool

Return true iff interrupts are enabled

source

fn in_isr(&self) -> bool

Return true iff we are inside an interrupt service routine

Implementors§