Struct em7180::USFS [−][src]
pub struct USFS<I2C> { /* fields omitted */ }
Expand description
Struct for USFS
Implementations
impl<I2C, E> USFS<I2C> where
I2C: WriteRead<Error = E>,
[src]
impl<I2C, E> USFS<I2C> where
I2C: WriteRead<Error = E>,
[src]pub fn default(i2c: I2C) -> Result<USFS<I2C>, Error<E>> where
I2C: WriteRead<Error = E>,
[src]
pub fn default(i2c: I2C) -> Result<USFS<I2C>, Error<E>> where
I2C: WriteRead<Error = E>,
[src]Creates a sensor with default configuration
pub fn new(
i2c: I2C,
address: u8,
int_pin: u8,
pass_thru: bool
) -> Result<USFS<I2C>, Error<E>> where
I2C: WriteRead<Error = E>,
[src]
pub fn new(
i2c: I2C,
address: u8,
int_pin: u8,
pass_thru: bool
) -> Result<USFS<I2C>, Error<E>> where
I2C: WriteRead<Error = E>,
[src]Creates a sensor with specific configuration
pub fn get_product_id(&mut self) -> Result<u8, E>
[src]
pub fn get_product_id(&mut self) -> Result<u8, E>
[src]Get ProductID, should be: 0x80
pub fn get_rom_version(&mut self) -> Result<[u8; 2], E>
[src]
pub fn get_rom_version(&mut self) -> Result<[u8; 2], E>
[src]Get ProductID, should be: 0xE609
pub fn get_sentral_status(&mut self) -> Result<u8, E>
[src]
pub fn get_sentral_status(&mut self) -> Result<u8, E>
[src]Get Sentral status
pub fn check_run_status(&mut self) -> Result<u8, E>
[src]
pub fn check_run_status(&mut self) -> Result<u8, E>
[src]Get run status
pub fn check_status(&mut self) -> Result<u8, E>
[src]
pub fn check_status(&mut self) -> Result<u8, E>
[src]Check EventStatus on address 0x35 Non-zero value indicates a new event has been generated bit | meaning 0 | CPUReset 1 | Error 2 | QuaternionResult 3 | MagResult 4 | AccelResult 5 | GyroResult
pub fn check_errors(&mut self) -> Result<u8, E>
[src]
pub fn check_errors(&mut self) -> Result<u8, E>
[src]Check ErrorRegister Software-Related Error Conditions on address 0x50 Non-zero value indicates an error value | error condition | response 0x00 | no error | 0x80 | invalid sample rate selected | check sensor rate settings 0x30 | mathematical error | check for software updates 0x21 | Magnetometer initialization failed | this error can be caused by a wrong driver, 0x22 | accelerometer initialization failed | physically bad sensor connection, or 0x24 | gyroscope initialization failed | incorrect I2C device address in the driver 0x11 | magnetometer rate failure | this error indicates the given sensor 0x12 | accelerometer rate failure | is unreliable and has stopped 0x14 | Gyroscope rate failure | producing data
pub fn check_sensor_status(&mut self) -> Result<u8, E>
[src]
pub fn check_sensor_status(&mut self) -> Result<u8, E>
[src]Check SensorStatus Sensor-Related Error Conditions on address 0x36 Non-zero value indicates sensor-related error bit | meaning 0 | MagNACK. 1 = NACK from magnetometer 1 | AccelNACK. 1 = NACK from accelerometer 2 | GyroNACK. 1 = NACK from gyroscope 4 | MagDeviceIDErr. 1 = Unexpected DeviceID from magnetometer 5 | AccelDeviceIDErr. 1 = Unexpected DeviceID from accelerometer 6 | GyroDeviceIDErr. 1 = Unexpected DeviceID from gyroscope
pub fn check_feature_flags(&mut self) -> Result<u8, E>
[src]
pub fn check_feature_flags(&mut self) -> Result<u8, E>
[src]Check which sensors can be detected by the EM7180 value | response 0x01 | A barometer is installed 0x02 | A humidity sensor is installed 0x04 | A temperature sensor is installed 0x08 | A custom sensor is installed 0x10 | A second custom sensor is installed 0x20 | A third custom sensor is installed
pub fn get_actual_magnetometer_rate(&mut self) -> Result<u8, E>
[src]
pub fn get_actual_magnetometer_rate(&mut self) -> Result<u8, E>
[src]Get actual magnetometer output data rate
pub fn get_actual_accel_rate(&mut self) -> Result<u8, E>
[src]
pub fn get_actual_accel_rate(&mut self) -> Result<u8, E>
[src]Get actual accelerometer output data rate
pub fn get_actual_gyroscope_rate(&mut self) -> Result<u8, E>
[src]
pub fn get_actual_gyroscope_rate(&mut self) -> Result<u8, E>
[src]Get actual gyroscope output data rate
pub fn read_sentral_accel_data(&mut self) -> Result<[i16; 3], E>
[src]
pub fn read_sentral_accel_data(&mut self) -> Result<[i16; 3], E>
[src]Read Linear Acceleration AX Linear Acceleration – X Axis AY Linear Acceleration – Y Axis AZ Linear Acceleration – Z Axis
pub fn read_sentral_gyro_data(&mut self) -> Result<[i16; 3], E>
[src]
pub fn read_sentral_gyro_data(&mut self) -> Result<[i16; 3], E>
[src]Read Rotational Velocity GX Rotational Velocity – X Axis GY Rotational Velocity – Y Axis GZ Rotational Velocity – Z Axis
pub fn read_sentral_mag_data(&mut self) -> Result<[i16; 3], E>
[src]
pub fn read_sentral_mag_data(&mut self) -> Result<[i16; 3], E>
[src]Read Magnetic Field MX Magnetic Field – X Axis MY Magnetic Field – Y Axis MZ Magnetic Field – Z Axis
pub fn read_sentral_quat_qata(&mut self) -> Result<[f32; 4], E>
[src]
pub fn read_sentral_quat_qata(&mut self) -> Result<[f32; 4], E>
[src]Read Normalized Quaternion QX Normalized Quaternion – X, or Heading | Full-Scale Range 0.0 – 1.0 or ±π QY Normalized Quaternion – Y, or Pitch | Full-Scale Range 0.0 – 1.0 or ±π/2 QZ Normalized Quaternion – Z, or Roll | Full-Scale Range 0.0 – 1.0 or ±π QW Normalized Quaternion – W, or 0.0 | Full-Scale Range 0.0 – 1.0
pub fn read_sentral_baro_data(&mut self) -> Result<i16, E>
[src]
pub fn read_sentral_baro_data(&mut self) -> Result<i16, E>
[src]Read Pressure in mBar
pub fn read_sentral_temp_data(&mut self) -> Result<i16, E>
[src]
pub fn read_sentral_temp_data(&mut self) -> Result<i16, E>
[src]Read Temperature in °C
Trait Implementations
impl<I2C: Copy> Copy for USFS<I2C>
[src]
Auto Trait Implementations
impl<I2C> Send for USFS<I2C> where
I2C: Send,
I2C: Send,
impl<I2C> Sync for USFS<I2C> where
I2C: Sync,
I2C: Sync,
impl<I2C> Unpin for USFS<I2C> where
I2C: Unpin,
I2C: Unpin,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self