Skip to content

Commit

Permalink
fixed header
Browse files Browse the repository at this point in the history
  • Loading branch information
caiodasilva2005 committed Oct 27, 2024
1 parent f8aa44d commit 6fbf4f3
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions general/include/lsm6dso.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ typedef int (*I2C_Write)(uint8_t *data, uint8_t reg, uint8_t length);
*
*/
enum lsm6dso_axes {

LSM6DSO_X_AXIS = 0,
LSM6DSO_Y_AXIS = 1,
LSM6DSO_Z_AXIS = 2
Expand Down Expand Up @@ -83,7 +84,7 @@ typedef struct {
*
* @return 0 if OK, other if ERROR
*/
int lsm6dso_init(I2C_Read read_func, I2C_Write write_func);
int lsm6dso_init(lsm6dso_t *imu, I2C_Read read_func, I2C_Write write_func);

/* IMU Setting Configuration */
/**
Expand All @@ -95,7 +96,9 @@ int lsm6dso_init(I2C_Read read_func, I2C_Write write_func);
* @param lp_f2_enable
* @return 0 if OK, other if ERROR
*/
int lsm6dso_set_accel_cfg(int8_t odr_sel, int8_t fs_sel, int8_t lp_f2_enable);

int lsm6dso_set_accel_cfg(lsm6dso_t *imu, int8_t odr_sel, int8_t fs_sel,
int8_t lp_f2_enable);

/**
* @brief Configures the accelerometer of the LSM6DSO IMU
Expand All @@ -105,19 +108,21 @@ int lsm6dso_set_accel_cfg(int8_t odr_sel, int8_t fs_sel, int8_t lp_f2_enable);
* @param fs_125
* @return 0 if OK, other if ERROR
*/
int lsm6dso_set_gyro_cfg(int8_t odr_sel, int8_t fs_sel, int8_t fs_125);

int lsm6dso_set_gyro_cfg(lsm6dso_t *imu, int8_t odr_sel, int8_t fs_sel,
int8_t fs_125);

/* Data Aquisition */
/**
* @brief Retrieves accelerometer data from the LSM6DSO IMU
* @return 0 if OK, other if ERROR
*/
int lsm6dso_read_accel();
int lsm6dso_read_accel(lsm6dso_t *imu);

/**
* @brief Retreives the gyroscope data from the LSM6DSO IMU
* @return 0 if OK, other if ERROR
*/
int lsm6dso_read_gyro();
int lsm6dso_read_gyro(lsm6dso_t *imu);

#endif // LSM6DSO_H

0 comments on commit 6fbf4f3

Please sign in to comment.