pub struct ADS1263<SPI, CS, DRDY, Delay>{ /* private fields */ }Implementations§
Source§impl<SPI, CS, DRDY, Delay, S, P> ADS1263<SPI, CS, DRDY, Delay>
impl<SPI, CS, DRDY, Delay, S, P> ADS1263<SPI, CS, DRDY, Delay>
pub fn new(spi: SPI, cs: CS, drdy: Option<DRDY>, delay: Delay) -> Self
Sourcepub fn send_command(&mut self, command: Command) -> Result<(), Error<S, P>>
pub fn send_command(&mut self, command: Command) -> Result<(), Error<S, P>>
Send a command to the device
Sourcepub fn read_register(&mut self, register: Register) -> Result<u8, Error<S, P>>
pub fn read_register(&mut self, register: Register) -> Result<u8, Error<S, P>>
Read the contents of a register as a u8
Sourcepub fn write_register(
&mut self,
register: Register,
val: u8,
) -> Result<(), Error<S, P>>
pub fn write_register( &mut self, register: Register, val: u8, ) -> Result<(), Error<S, P>>
Write the contents of a register as a u8
Sourcepub fn write_bitfield<T>(&mut self, bitfield: T) -> Result<(), Error<S, P>>where
T: BitField,
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
Sourcepub fn read_adc1(
&mut self,
positive_pin: PositiveInpmux,
negative_pin: NegativeInpmux,
) -> Result<u32, Error<S, P>>
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
pub fn wait_for_pin_data_ready(&mut self) -> Result<(), Error<S, P>>
pub fn calibrate_self_offset1(&mut self) -> Result<[u8; 3], Error<S, P>>
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>
impl<SPI, CS, DRDY, Delay> RefUnwindSafe for ADS1263<SPI, CS, DRDY, Delay>
impl<SPI, CS, DRDY, Delay> Send for ADS1263<SPI, CS, DRDY, Delay>
impl<SPI, CS, DRDY, Delay> Sync for ADS1263<SPI, CS, DRDY, Delay>
impl<SPI, CS, DRDY, Delay> Unpin for ADS1263<SPI, CS, DRDY, Delay>
impl<SPI, CS, DRDY, Delay> UnwindSafe for ADS1263<SPI, CS, DRDY, Delay>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more