avr_t

Struct avr_t 

Source
#[repr(C)]
pub struct avr_t {
Show 56 fields pub mmcu: *const c_char, pub ioend: u16, pub ramend: u16, pub flashend: u32, pub e2end: u32, pub vector_size: u8, pub resetting: u8, pub fuse: [u8; 6], pub lockbits: u8, pub signature: [u8; 3], pub serial: [u8; 9], pub rampz: avr_io_addr_t, pub eind: avr_io_addr_t, pub address_size: u8, pub reset_flags: avr_t__bindgen_ty_1, pub codeend: u32, pub state: c_int, pub frequency: u32, pub vcc: u32, pub avcc: u32, pub aref: u32, pub cycle: avr_cycle_count_t, pub run_cycle_count: avr_cycle_count_t, pub run_cycle_limit: avr_cycle_count_t, pub sleep_usec: u32, pub time_base: u64, pub init: Option<unsafe extern "C" fn(avr: *mut avr_t)>, pub reset: Option<unsafe extern "C" fn(avr: *mut avr_t)>, pub custom: avr_t__bindgen_ty_2, pub run: avr_run_t, pub sleep: Option<unsafe extern "C" fn(avr: *mut avr_t, howLong: avr_cycle_count_t)>, pub irq_pool: avr_irq_pool_t, pub sreg: [u8; 8], pub interrupt_state: i8, pub pc: avr_flashaddr_t, pub reset_pc: avr_flashaddr_t, pub io: [avr_t__bindgen_ty_3; 280], pub io_shared_io_count: c_int, pub io_shared_io: [avr_t__bindgen_ty_4; 4], pub sram_tracepoint_count: c_int, pub sram_tracepoint: [avr_t__bindgen_ty_5; 16], pub flash: *mut u8, pub data: *mut u8, pub io_port: *mut avr_io_t, pub irq: *mut avr_irq_t, pub commands: avr_cmd_table_t, pub cycle_timers: avr_cycle_timer_pool_t, pub interrupts: avr_int_table_t, pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1]>, pub trace_data: *mut avr_trace_data_t, pub vcd: *mut avr_vcd_t, pub gdb: *mut avr_gdb_t, pub gdb_port: c_int, pub io_console_buffer: avr_t__bindgen_ty_6, pub data_names: *mut *const c_char,
}

Fields§

§mmcu: *const c_char§ioend: u16§ramend: u16§flashend: u32§e2end: u32§vector_size: u8§resetting: u8§fuse: [u8; 6]§lockbits: u8§signature: [u8; 3]§serial: [u8; 9]§rampz: avr_io_addr_t§eind: avr_io_addr_t§address_size: u8§reset_flags: avr_t__bindgen_ty_1§codeend: u32§state: c_int§frequency: u32§vcc: u32§avcc: u32§aref: u32§cycle: avr_cycle_count_t§run_cycle_count: avr_cycle_count_t§run_cycle_limit: avr_cycle_count_t§sleep_usec: u32

Sleep requests are accumulated in sleep_usec until the minimum sleep value is reached, at which point sleep_usec is cleared and the sleep request is passed on to the operating system.

§time_base: u64§init: Option<unsafe extern "C" fn(avr: *mut avr_t)>§reset: Option<unsafe extern "C" fn(avr: *mut avr_t)>§custom: avr_t__bindgen_ty_2§run: avr_run_t

Default AVR core run function. Two modes are available, a “raw” run that goes as fast as it can, and a “gdb” mode that also watchouts for gdb events and is a little bit slower.

§sleep: Option<unsafe extern "C" fn(avr: *mut avr_t, howLong: avr_cycle_count_t)>

Sleep default behaviour. In “raw” mode, it calls usleep, in gdb mode, it waits for howLong for gdb command on it’s sockets.

§irq_pool: avr_irq_pool_t

Every IRQs will be stored in this pool. It is not mandatory (yet) but will allow listing IRQs and their connections

§sreg: [u8; 8]§interrupt_state: i8§pc: avr_flashaddr_t§reset_pc: avr_flashaddr_t§io: [avr_t__bindgen_ty_3; 280]§io_shared_io_count: c_int§io_shared_io: [avr_t__bindgen_ty_4; 4]§sram_tracepoint_count: c_int§sram_tracepoint: [avr_t__bindgen_ty_5; 16]§flash: *mut u8§data: *mut u8§io_port: *mut avr_io_t§irq: *mut avr_irq_t§commands: avr_cmd_table_t§cycle_timers: avr_cycle_timer_pool_t§interrupts: avr_int_table_t§_bitfield_align_1: [u8; 0]§_bitfield_1: __BindgenBitfieldUnit<[u8; 1]>§trace_data: *mut avr_trace_data_t§vcd: *mut avr_vcd_t§gdb: *mut avr_gdb_t§gdb_port: c_int§io_console_buffer: avr_t__bindgen_ty_6§data_names: *mut *const c_char

Implementations§

Source§

impl avr_t

Source

pub fn trace(&self) -> u8

Source

pub fn set_trace(&mut self, val: u8)

Source

pub fn log(&self) -> u8

Source

pub fn set_log(&mut self, val: u8)

Source

pub fn new_bitfield_1(trace: u8, log: u8) -> __BindgenBitfieldUnit<[u8; 1]>

Trait Implementations§

Source§

impl Clone for avr_t

Source§

fn clone(&self) -> avr_t

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for avr_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for avr_t

Auto Trait Implementations§

§

impl Freeze for avr_t

§

impl RefUnwindSafe for avr_t

§

impl !Send for avr_t

§

impl !Sync for avr_t

§

impl Unpin for avr_t

§

impl UnwindSafe for avr_t

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.