Trait mpu9250::NineDOFDevice
source · pub trait NineDOFDevice: Device + AK8963<Error = <Self as Device>::Error> {
// Required method
fn read_9dof(
&mut self,
reg: Register,
buffer: &mut [u8; 21]
) -> Result<(), <Self as Device>::Error>;
}
Expand description
The trait describes how to aquire 9 degrees-of-freedom measurements (plug a temperature reading) from an MPU
Required Methods§
sourcefn read_9dof(
&mut self,
reg: Register,
buffer: &mut [u8; 21]
) -> Result<(), <Self as Device>::Error>
fn read_9dof( &mut self, reg: Register, buffer: &mut [u8; 21] ) -> Result<(), <Self as Device>::Error>
Perform a 9DOF reading
The trait assumes a contiguous reading of (x, y, z) accelerometer, temperature, (x,y,z) gyroscope, and (x, y, z) magnetometer. Essentially, this is the layout of a single SPI read transaction. Any other implementors are required to meet this layout.