Suppressed conflicting destructor function.
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
Dependents: D7A_1x_TRAINING D7_MLX_AND_BAT D7A_1x_demo_sensors_v3
Fork of X_NUCLEO_IKS01A1 by
LSM303C_ACC_Sensor Class Reference
Abstract class of an LSM303C Inertial Measurement Unit (IMU) 6 axes sensor. More...
#include <LSM303C_ACC_Sensor.h>
Public Member Functions | |
| LSM303C_ACC_Sensor (DevI2C &i2c) | |
| Constructor. | |
| LSM303C_ACC_Sensor (DevI2C &i2c, uint8_t address) | |
| Constructor. | |
| virtual int | Init (void *init) |
| Initializing the component. | |
| virtual int | ReadID (uint8_t *id) |
| Read ID of LSM303C Accelerometer. | |
| virtual int | Get_X_Axes (int32_t *pData) |
| Read data from LSM303C Accelerometer. | |
| virtual int | Get_X_AxesRaw (int16_t *pData) |
| Read raw data from LSM303C Accelerometer. | |
| virtual int | Get_X_Sensitivity (float *pfData) |
| Read Accelerometer Sensitivity. | |
| virtual int | Get_X_ODR (float *odr) |
| Read LSM303C Accelerometer output data rate. | |
| virtual int | Set_X_ODR (float odr) |
| Set ODR. | |
| virtual int | Get_X_FS (float *fullScale) |
| Read LSM303C Accelerometer full scale. | |
| virtual int | Set_X_FS (float fullScale) |
| Set full scale. | |
| int | Enable (void) |
| Enable LSM303C Accelerator. | |
| int | Disable (void) |
| Disable LSM303C Accelerator. | |
| int | ReadReg (uint8_t reg, uint8_t *data) |
| Read accelerometer data from register. | |
| int | WriteReg (uint8_t reg, uint8_t data) |
| Write accelerometer data to register. | |
| uint8_t | IO_Read (uint8_t *pBuffer, uint8_t RegisterAddr, uint16_t NumByteToRead) |
| Utility function to read data. | |
| uint8_t | IO_Write (uint8_t *pBuffer, uint8_t RegisterAddr, uint16_t NumByteToWrite) |
| Utility function to write data. | |
Detailed Description
Abstract class of an LSM303C Inertial Measurement Unit (IMU) 6 axes sensor.
Definition at line 71 of file LSM303C_ACC_Sensor.h.
Constructor & Destructor Documentation
| LSM303C_ACC_Sensor | ( | DevI2C & | i2c ) |
Constructor.
- Parameters:
-
i2c object of an helper class which handles the I2C peripheral address the address of the component's instance
Definition at line 52 of file LSM303C_ACC_Sensor.cpp.
| LSM303C_ACC_Sensor | ( | DevI2C & | i2c, |
| uint8_t | address | ||
| ) |
Constructor.
- Parameters:
-
i2c object of an helper class which handles the I2C peripheral address the address of the component's instance
Definition at line 61 of file LSM303C_ACC_Sensor.cpp.
Member Function Documentation
| int Disable | ( | void | ) |
Disable LSM303C Accelerator.
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 142 of file LSM303C_ACC_Sensor.cpp.
| int Enable | ( | void | ) |
Enable LSM303C Accelerator.
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 119 of file LSM303C_ACC_Sensor.cpp.
| int Get_X_Axes | ( | int32_t * | pData ) | [virtual] |
Read data from LSM303C Accelerometer.
- Parameters:
-
pData the pointer where the accelerometer data are stored
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 193 of file LSM303C_ACC_Sensor.cpp.
| int Get_X_AxesRaw | ( | int16_t * | pData ) | [virtual] |
Read raw data from LSM303C Accelerometer.
- Parameters:
-
pData the pointer where the accelerometer raw data are stored
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 262 of file LSM303C_ACC_Sensor.cpp.
| int Get_X_FS | ( | float * | fullScale ) | [virtual] |
Read LSM303C Accelerometer full scale.
- Parameters:
-
fullScale the pointer to the full scale
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 398 of file LSM303C_ACC_Sensor.cpp.
| int Get_X_ODR | ( | float * | odr ) | [virtual] |
Read LSM303C Accelerometer output data rate.
- Parameters:
-
odr the pointer to the output data rate
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 286 of file LSM303C_ACC_Sensor.cpp.
| int Get_X_Sensitivity | ( | float * | pfData ) | [virtual] |
Read Accelerometer Sensitivity.
- Parameters:
-
pfData the pointer where the accelerometer sensitivity is stored
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 217 of file LSM303C_ACC_Sensor.cpp.
| int Init | ( | void * | init ) | [virtual] |
Initializing the component.
- Parameters:
-
[in] init pointer to device specific initalization structure.
- Return values:
-
0 in case of success, an error code otherwise.
Definition at line 71 of file LSM303C_ACC_Sensor.cpp.
| uint8_t IO_Read | ( | uint8_t * | pBuffer, |
| uint8_t | RegisterAddr, | ||
| uint16_t | NumByteToRead | ||
| ) |
Utility function to read data.
- Parameters:
-
pBuffer,: pointer to data to be read. RegisterAddr,: specifies internal address register to be read. NumByteToRead,: number of bytes to be read.
- Return values:
-
0 if ok, an error code otherwise.
Definition at line 97 of file LSM303C_ACC_Sensor.h.
| uint8_t IO_Write | ( | uint8_t * | pBuffer, |
| uint8_t | RegisterAddr, | ||
| uint16_t | NumByteToWrite | ||
| ) |
Utility function to write data.
- Parameters:
-
pBuffer,: pointer to data to be written. RegisterAddr,: specifies internal address register to be written. NumByteToWrite,: number of bytes to write.
- Return values:
-
0 if ok, an error code otherwise.
Definition at line 109 of file LSM303C_ACC_Sensor.h.
| int ReadID | ( | uint8_t * | id ) | [virtual] |
Read ID of LSM303C Accelerometer.
- Parameters:
-
p_id the pointer where the ID of the device is stored
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 172 of file LSM303C_ACC_Sensor.cpp.
| int ReadReg | ( | uint8_t | reg, |
| uint8_t * | data | ||
| ) |
Read accelerometer data from register.
- Parameters:
-
reg register address data register data
- Return values:
-
0 in case of success 1 in case of failure
Definition at line 454 of file LSM303C_ACC_Sensor.cpp.
| int Set_X_FS | ( | float | fullScale ) | [virtual] |
Set full scale.
- Parameters:
-
fullScale the full scale to be set
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 431 of file LSM303C_ACC_Sensor.cpp.
| int Set_X_ODR | ( | float | odr ) | [virtual] |
Set ODR.
- Parameters:
-
odr the output data rate to be set
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 331 of file LSM303C_ACC_Sensor.cpp.
| int WriteReg | ( | uint8_t | reg, |
| uint8_t | data | ||
| ) |
Write accelerometer data to register.
- Parameters:
-
reg register address data register data
- Return values:
-
0 in case of success 1 in case of failure
Definition at line 472 of file LSM303C_ACC_Sensor.cpp.
Generated on Tue Jul 12 2022 17:30:07 by
1.7.2
