[−][src]Trait hmc5983::interface::SensorInterface
A method of communicating with the device
Associated Types
type InterfaceError
Interface associated error type
Required methods
fn read_block(
&mut self,
reg: u8,
recv_buf: &mut [u8]
) -> Result<(), Self::InterfaceError>
&mut self,
reg: u8,
recv_buf: &mut [u8]
) -> Result<(), Self::InterfaceError>
Read a block from a specific register
reg
: The register address to read from
recv_buf
: The buffer to receive into
fn write_reg(&mut self, reg: u8, val: u8) -> Result<(), Self::InterfaceError>
Write a value to a register
Implementors
impl<I2C, CommE> SensorInterface for I2cInterface<I2C> where
I2C: Write<Error = CommE> + Read<Error = CommE> + WriteRead<Error = CommE>,
CommE: Debug,
[src]
I2C: Write<Error = CommE> + Read<Error = CommE> + WriteRead<Error = CommE>,
CommE: Debug,
type InterfaceError = Error<CommE, ()>
fn write_reg(&mut self, reg: u8, val: u8) -> Result<(), Self::InterfaceError>
[src]
fn read_block(
&mut self,
reg: u8,
recv_buf: &mut [u8]
) -> Result<(), Self::InterfaceError>
[src]
&mut self,
reg: u8,
recv_buf: &mut [u8]
) -> Result<(), Self::InterfaceError>
impl<SPI, CS, CommE, PinE> SensorInterface for SpiInterface<SPI, CS> where
SPI: Write<u8, Error = CommE> + Transfer<u8, Error = CommE>,
CS: OutputPin<Error = PinE>,
CommE: Debug,
PinE: Debug,
[src]
SPI: Write<u8, Error = CommE> + Transfer<u8, Error = CommE>,
CS: OutputPin<Error = PinE>,
CommE: Debug,
PinE: Debug,
type InterfaceError = Error<CommE, PinE>
fn read_block(
&mut self,
reg: u8,
recv_buf: &mut [u8]
) -> Result<(), Self::InterfaceError>
[src]
&mut self,
reg: u8,
recv_buf: &mut [u8]
) -> Result<(), Self::InterfaceError>