Struct RegisterBlock

Source
#[repr(C)]
pub struct RegisterBlock { /* private fields */ }
Expand description

Register block

Implementations§

Source§

impl RegisterBlock

Source

pub const fn cr(&self) -> &CR

0x00 - control register

Source

pub const fn swtrigr(&self) -> &SWTRIGR

0x04 - software trigger register

Source

pub const fn dhr12r(&self, n: usize) -> &DHR12R

0x08..0x10 - channel%s 12-bit right-aligned data holding register

`n` is the index of register in the array. `n == 0` corresponds to `DHR12R1` register.
Source

pub fn dhr12r_iter(&self) -> impl Iterator<Item = &DHR12R>

Iterator for array of: 0x08..0x10 - channel%s 12-bit right-aligned data holding register

Source

pub const fn dhr12r1(&self) -> &DHR12R

0x08 - channel1 12-bit right-aligned data holding register

Source

pub const fn dhr12r2(&self) -> &DHR12R

0x14 - channel2 12-bit right-aligned data holding register

Source

pub const fn dhr12l(&self, n: usize) -> &DHR12L

0x0c..0x14 - channel%s 12-bit left aligned data holding register

`n` is the index of register in the array. `n == 0` corresponds to `DHR12L1` register.
Source

pub fn dhr12l_iter(&self) -> impl Iterator<Item = &DHR12L>

Iterator for array of: 0x0c..0x14 - channel%s 12-bit left aligned data holding register

Source

pub const fn dhr12l1(&self) -> &DHR12L

0x0c - channel1 12-bit left aligned data holding register

Source

pub const fn dhr12l2(&self) -> &DHR12L

0x18 - channel2 12-bit left aligned data holding register

Source

pub const fn dhr8r(&self, n: usize) -> &DHR8R

0x10..0x18 - channel%s 8-bit right aligned data holding register

`n` is the index of register in the array. `n == 0` corresponds to `DHR8R1` register.
Source

pub fn dhr8r_iter(&self) -> impl Iterator<Item = &DHR8R>

Iterator for array of: 0x10..0x18 - channel%s 8-bit right aligned data holding register

Source

pub const fn dhr8r1(&self) -> &DHR8R

0x10 - channel1 8-bit right aligned data holding register

Source

pub const fn dhr8r2(&self) -> &DHR8R

0x1c - channel2 8-bit right aligned data holding register

Source

pub const fn dhr12rd(&self) -> &DHR12RD

0x20 - Dual DAC 12-bit right-aligned data holding register

Source

pub const fn dhr12ld(&self) -> &DHR12LD

0x24 - DUAL DAC 12-bit left aligned data holding register

Source

pub const fn dhr8rd(&self) -> &DHR8RD

0x28 - DUAL DAC 8-bit right aligned data holding register

Source

pub const fn dor(&self, n: usize) -> &DOR

0x2c..0x34 - channel%s data output register

`n` is the index of register in the array. `n == 0` corresponds to `DOR1` register.
Source

pub fn dor_iter(&self) -> impl Iterator<Item = &DOR>

Iterator for array of: 0x2c..0x34 - channel%s data output register

Source

pub const fn dor1(&self) -> &DOR

0x2c - channel1 data output register

Source

pub const fn dor2(&self) -> &DOR

0x30 - channel2 data output register

Source

pub const fn sr(&self) -> &SR

0x34 - status register

Source

pub const fn ccr(&self) -> &CCR

0x38 - calibration control register

Source

pub const fn mcr(&self) -> &MCR

0x3c - mode control register

Source

pub const fn shsr(&self, n: usize) -> &SHSR

0x40..0x48 - DAC channel%s sample and hold sample time register

`n` is the index of register in the array. `n == 0` corresponds to `SHSR1` register.
Source

pub fn shsr_iter(&self) -> impl Iterator<Item = &SHSR>

Iterator for array of: 0x40..0x48 - DAC channel%s sample and hold sample time register

Source

pub const fn shsr1(&self) -> &SHSR

0x40 - DAC channel1 sample and hold sample time register

Source

pub const fn shsr2(&self) -> &SHSR

0x44 - DAC channel2 sample and hold sample time register

Source

pub const fn shhr(&self) -> &SHHR

0x48 - Sample and Hold hold time register

Source

pub const fn shrr(&self) -> &SHRR

0x4c - Sample and Hold refresh time register

Trait Implementations§

Source§

impl Debug for RegisterBlock

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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.