Skip to main content

NiosCore

Struct NiosCore 

Source
pub struct NiosCore<T: Transport> { /* private fields */ }

Implementations§

Source§

impl<T: Transport> NiosCore<T>

Source

pub fn new(transport: T) -> Self

Source

pub fn transport(&self) -> &T

Source

pub fn transport_mut(&mut self) -> &mut T

Source

pub fn nios_read<A: NiosNum + Send, D: NiosNum + Send>( &mut self, id: impl Into<u8>, addr: A, ) -> Result<D>

Source

pub fn nios_write<A: NiosNum + Send, D: NiosNum + Send>( &mut self, id: impl Into<u8>, addr: A, data: D, ) -> Result<()>

Source

pub fn nios_config_read(&mut self) -> Result<u32>

Source

pub fn nios_config_write(&mut self, value: u32) -> Result<()>

Source

pub fn nios_expansion_gpio_read(&mut self) -> Result<u32>

Source

pub fn nios_expansion_gpio_write(&mut self, mask: u32, val: u32) -> Result<()>

Source

pub fn nios_expansion_gpio_dir_read(&mut self) -> Result<u32>

Source

pub fn nios_expansion_gpio_dir_write( &mut self, mask: u32, val: u32, ) -> Result<()>

Source

pub fn nios_get_fpga_version(&mut self) -> Result<SemanticVersion>

Source

pub fn nios_get_iq_gain_correction(&mut self, ch: Channel) -> Result<i16>

Source

pub fn nios_get_iq_phase_correction(&mut self, ch: Channel) -> Result<i16>

Source

pub fn nios_set_iq_gain_correction( &mut self, ch: Channel, value: i16, ) -> Result<()>

Source

pub fn nios_set_iq_phase_correction( &mut self, ch: Channel, value: i16, ) -> Result<()>

Source§

impl NiosCore<UsbTransport>

Source

pub fn get_alt_setting(&self) -> u8

Auto Trait Implementations§

§

impl<T> Freeze for NiosCore<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for NiosCore<T>
where T: RefUnwindSafe,

§

impl<T> Send for NiosCore<T>

§

impl<T> Sync for NiosCore<T>
where T: Sync,

§

impl<T> Unpin for NiosCore<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for NiosCore<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for NiosCore<T>
where T: UnwindSafe,

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> 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, 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.