ADS1263

Struct ADS1263 

Source
pub struct ADS1263<SPI, CS, DRDY, Delay>
where SPI: Transfer<u8>, CS: OutputPin, DRDY: InputPin, Delay: DelayMs<u32>,
{ /* private fields */ }

Implementations§

Source§

impl<SPI, CS, DRDY, Delay, S, P> ADS1263<SPI, CS, DRDY, Delay>
where SPI: Transfer<u8, Error = S>, CS: OutputPin<Error = P>, DRDY: InputPin<Error = P>, Delay: DelayMs<u32>,

Source

pub fn new(spi: SPI, cs: CS, drdy: Option<DRDY>, delay: Delay) -> Self

Source

pub fn send_command(&mut self, command: Command) -> Result<(), Error<S, P>>

Send a command to the device

Source

pub fn read_register(&mut self, register: Register) -> Result<u8, Error<S, P>>

Read the contents of a register as a u8

Source

pub fn write_register( &mut self, register: Register, val: u8, ) -> Result<(), Error<S, P>>

Write the contents of a register as a u8

Source

pub fn write_bitfield<T>(&mut self, bitfield: T) -> Result<(), Error<S, P>>
where T: BitField,

Utility function to set specific bits in a register Reads the register sets the bits then writes it back to device Offset and register is handled by the BitField trait

Source

pub fn read_adc1( &mut self, positive_pin: PositiveInpmux, negative_pin: NegativeInpmux, ) -> Result<u32, Error<S, P>>

Read voltage difference between two pins using ADC1 Does not compute CRC or checksum

Source

pub fn wait_for_pin_data_ready(&mut self) -> Result<(), Error<S, P>>

Source

pub fn calibrate_self_offset1(&mut self) -> Result<[u8; 3], Error<S, P>>

Source

pub fn load_calibration_offset1( &mut self, ofcal: [u8; 3], ) -> Result<(), Error<S, P>>

Auto Trait Implementations§

§

impl<SPI, CS, DRDY, Delay> Freeze for ADS1263<SPI, CS, DRDY, Delay>
where SPI: Freeze, CS: Freeze, Delay: Freeze, DRDY: Freeze,

§

impl<SPI, CS, DRDY, Delay> RefUnwindSafe for ADS1263<SPI, CS, DRDY, Delay>
where SPI: RefUnwindSafe, CS: RefUnwindSafe, Delay: RefUnwindSafe, DRDY: RefUnwindSafe,

§

impl<SPI, CS, DRDY, Delay> Send for ADS1263<SPI, CS, DRDY, Delay>
where SPI: Send, CS: Send, Delay: Send, DRDY: Send,

§

impl<SPI, CS, DRDY, Delay> Sync for ADS1263<SPI, CS, DRDY, Delay>
where SPI: Sync, CS: Sync, Delay: Sync, DRDY: Sync,

§

impl<SPI, CS, DRDY, Delay> Unpin for ADS1263<SPI, CS, DRDY, Delay>
where SPI: Unpin, CS: Unpin, Delay: Unpin, DRDY: Unpin,

§

impl<SPI, CS, DRDY, Delay> UnwindSafe for ADS1263<SPI, CS, DRDY, Delay>
where SPI: UnwindSafe, CS: UnwindSafe, Delay: UnwindSafe, DRDY: 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.