c6dofimu13 2.0.0.0
6DOF IMU 13 Click Driver

API for configuring and manipulating 6DOF IMU 13 Click driver. More...

Topics

 6DOF IMU 13 Registers List
 List of registers of 6DOF IMU 13 Click driver.
 
 6DOF IMU 13 Registers Settings
 Settings for registers of 6DOF IMU 13 Click driver.
 
 6DOF IMU 13 MikroBUS Map
 MikroBUS pin mapping of 6DOF IMU 13 Click driver.
 

Functions

void c6dofimu13_cfg_setup (c6dofimu13_cfg_t *cfg)
 6DOF IMU 13 configuration object setup function.
 
err_t c6dofimu13_init (c6dofimu13_t *ctx, c6dofimu13_cfg_t *cfg)
 6DOF IMU 13 initialization function.
 
err_t c6dofimu13_default_cfg (c6dofimu13_t *ctx)
 6DOF IMU 13 default configuration function.
 
err_t c6dofimu13_set_slave_address (c6dofimu13_t *ctx, uint8_t slave_address)
 6DOF IMU 13 set slave address function.
 
err_t c6dofimu13_generic_write (c6dofimu13_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len)
 6DOF IMU 13 I2C writing function.
 
err_t c6dofimu13_generic_read (c6dofimu13_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len)
 6DOF IMU 13 I2C reading function.
 
err_t c6dofimu13_mag_init (c6dofimu13_t *ctx, uint8_t res, uint8_t op_mode, uint8_t temp_meas)
 6DOF IMU 13 Magnetometer initialize function.
 
err_t c6dofimu13_mag_get_x (c6dofimu13_t *ctx, float *result)
 6DOF IMU 13 Magnetometer get X-Axis data function.
 
err_t c6dofimu13_mag_get_y (c6dofimu13_t *ctx, float *result)
 6DOF IMU 13 Magnetometer get Y-Axis data function.
 
err_t c6dofimu13_mag_get_z (c6dofimu13_t *ctx, float *result)
 6DOF IMU 13 Magnetometer get Z-Axis data function.
 
err_t c6dofimu13_mag_get_data (c6dofimu13_t *ctx, float *mag_x, float *mag_y, float *mag_z)
 6DOF IMU 13 Magnetometer get X, Y, and Z-Axis data function.
 
err_t c6dofimu13_mag_offset (c6dofimu13_t *ctx, int16_t offset, uint8_t axis)
 6DOF IMU 13 set magnetometer offset function.
 
err_t c6dofimu13_accel_init (c6dofimu13_t *ctx, uint8_t samp_rate, uint8_t samp_range, uint8_t samp_res)
 6DOF IMU 13 Accelerometer initialize function.
 
err_t c6dofimu13_accel_get_raw_x (c6dofimu13_t *ctx, int16_t *result)
 6DOF IMU 13 Accelerometer get RAW X-Axis data function.
 
err_t c6dofimu13_accel_get_raw_y (c6dofimu13_t *ctx, int16_t *result)
 6DOF IMU 13 Accelerometer get RAW Y-Axis data function.
 
err_t c6dofimu13_accel_get_raw_z (c6dofimu13_t *ctx, int16_t *result)
 6DOF IMU 13 Accelerometer get RAW Z-Axis data function.
 
err_t c6dofimu13_accel_get_x (c6dofimu13_t *ctx, float *result)
 6DOF IMU 13 Accelerometer get X-Axis data function.
 
err_t c6dofimu13_accel_get_y (c6dofimu13_t *ctx, float *result)
 6DOF IMU 13 Accelerometer get Y-Axis data function.
 
err_t c6dofimu13_accel_get_z (c6dofimu13_t *ctx, float *result)
 6DOF IMU 13 Accelerometer get Z-Axis data function.
 
err_t c6dofimu13_accel_get_data (c6dofimu13_t *ctx, float *accel_x, float *accel_y, float *accel_z)
 6DOF IMU 13 Accelerometer get X, Y, and Z-Axis data function.
 
err_t c6dofimu13_accel_offset (c6dofimu13_t *ctx, int16_t offset, uint8_t axis)
 6DOF IMU 13 set accelerometer offset function.
 
uint8_t c6dofimu13_get_in1 (c6dofimu13_t *ctx)
 6DOF IMU 13 get in1 pin state function.
 
uint8_t c6dofimu13_get_in2 (c6dofimu13_t *ctx)
 6DOF IMU 13 get in2 pin state function.
 

Detailed Description

API for configuring and manipulating 6DOF IMU 13 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ c6dofimu13_accel_get_data()

err_t c6dofimu13_accel_get_data ( c6dofimu13_t * ctx,
float * accel_x,
float * accel_y,
float * accel_z )

6DOF IMU 13 Accelerometer get X, Y, and Z-Axis data function.

This function reads accelerometer X, Y, and Z-Axis data.

Parameters
[in]ctx: Click context object. See c6dofimu13_t object definition for detailed explanation.
[out]accel_x: Accelerometer X-Axis data.
[out]accel_y: Accelerometer Y-Axis data.
[out]accel_z: Accelerometer Z-Axis data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu13_accel_get_raw_x()

err_t c6dofimu13_accel_get_raw_x ( c6dofimu13_t * ctx,
int16_t * result )

6DOF IMU 13 Accelerometer get RAW X-Axis data function.

This function reads RAW accelerometer X-Axis data.

Parameters
[in]ctx: Click context object. See c6dofimu13_t object definition for detailed explanation.
[out]result: RAW Accelerometer X-Axis data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu13_accel_get_raw_y()

err_t c6dofimu13_accel_get_raw_y ( c6dofimu13_t * ctx,
int16_t * result )

6DOF IMU 13 Accelerometer get RAW Y-Axis data function.

This function reads RAW accelerometer Y-Axis data.

Parameters
[in]ctx: Click context object. See c6dofimu13_t object definition for detailed explanation.
[out]result: RAW Accelerometer Y-Axis data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu13_accel_get_raw_z()

err_t c6dofimu13_accel_get_raw_z ( c6dofimu13_t * ctx,
int16_t * result )

6DOF IMU 13 Accelerometer get RAW Z-Axis data function.

This function reads RAW accelerometer Z-Axis data.

Parameters
[in]ctx: Click context object. See c6dofimu13_t object definition for detailed explanation.
[out]result: RAW Accelerometer Z-Axis data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu13_accel_get_x()

err_t c6dofimu13_accel_get_x ( c6dofimu13_t * ctx,
float * result )

6DOF IMU 13 Accelerometer get X-Axis data function.

This function reads accelerometer X-Axis data.

Parameters
[in]ctx: Click context object. See c6dofimu13_t object definition for detailed explanation.
[out]result: Accelerometer X-Axis data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu13_accel_get_y()

err_t c6dofimu13_accel_get_y ( c6dofimu13_t * ctx,
float * result )

6DOF IMU 13 Accelerometer get Y-Axis data function.

This function reads accelerometer Y-Axis data.

Parameters
[in]ctx: Click context object. See c6dofimu13_t object definition for detailed explanation.
[out]result: Accelerometer Y-Axis data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu13_accel_get_z()

err_t c6dofimu13_accel_get_z ( c6dofimu13_t * ctx,
float * result )

6DOF IMU 13 Accelerometer get Z-Axis data function.

This function reads accelerometer Z-Axis data.

Parameters
[in]ctx: Click context object. See c6dofimu13_t object definition for detailed explanation.
[out]result: Accelerometer Z-Axis data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu13_accel_init()

err_t c6dofimu13_accel_init ( c6dofimu13_t * ctx,
uint8_t samp_rate,
uint8_t samp_range,
uint8_t samp_res )

6DOF IMU 13 Accelerometer initialize function.

This function initializes accelerometer.

Parameters
[in]ctx: Click context object. See c6dofimu13_t object definition for detailed explanation.
[in]samp_rate: Data sample rate.
[in]samp_range: Data sample range..
[in]samp_res: Data sample resolution.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu13_accel_offset()

err_t c6dofimu13_accel_offset ( c6dofimu13_t * ctx,
int16_t offset,
uint8_t axis )

6DOF IMU 13 set accelerometer offset function.

This function sets accelerometer offset value for X, Y, or Z-Axis.

Parameters
[in]ctx: Click context object. See c6dofimu13_t object definition for detailed explanation.
[in]offset: Offset value.
[in]axis: Axis for which it will set the offset.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu13_cfg_setup()

void c6dofimu13_cfg_setup ( c6dofimu13_cfg_t * cfg)

6DOF IMU 13 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See c6dofimu13_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ c6dofimu13_default_cfg()

err_t c6dofimu13_default_cfg ( c6dofimu13_t * ctx)

6DOF IMU 13 default configuration function.

This function executes a default configuration of 6DOF IMU 13 click board.

Parameters
[in]ctx: Click context object. See c6dofimu13_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ c6dofimu13_generic_read()

err_t c6dofimu13_generic_read ( c6dofimu13_t * ctx,
uint8_t reg,
uint8_t * rx_buf,
uint8_t rx_len )

6DOF IMU 13 I2C reading function.

This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See c6dofimu13_t object definition for detailed explanation.
[in]reg: Start register address.
[out]rx_buf: Output read data.
[in]rx_len: Number of bytes to be read.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu13_generic_write()

err_t c6dofimu13_generic_write ( c6dofimu13_t * ctx,
uint8_t reg,
uint8_t * tx_buf,
uint8_t tx_len )

6DOF IMU 13 I2C writing function.

This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See c6dofimu13_t object definition for detailed explanation.
[in]reg: Start register address.
[in]tx_buf: Data to be written.
[in]tx_len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu13_get_in1()

uint8_t c6dofimu13_get_in1 ( c6dofimu13_t * ctx)

6DOF IMU 13 get in1 pin state function.

This function gets the in1 pin state.

Parameters
[in]ctx: Click context object. See c6dofimu13_t object definition for detailed explanation.
Note
None.

◆ c6dofimu13_get_in2()

uint8_t c6dofimu13_get_in2 ( c6dofimu13_t * ctx)

6DOF IMU 13 get in2 pin state function.

This function gets the in2 pin state.

Parameters
[in]ctx: Click context object. See c6dofimu13_t object definition for detailed explanation.
Note
None.

◆ c6dofimu13_init()

err_t c6dofimu13_init ( c6dofimu13_t * ctx,
c6dofimu13_cfg_t * cfg )

6DOF IMU 13 initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See c6dofimu13_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See c6dofimu13_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu13_mag_get_data()

err_t c6dofimu13_mag_get_data ( c6dofimu13_t * ctx,
float * mag_x,
float * mag_y,
float * mag_z )

6DOF IMU 13 Magnetometer get X, Y, and Z-Axis data function.

This function reads magnetometer X, Y, and Z-Axis data.

Parameters
[in]ctx: Click context object. See c6dofimu13_t object definition for detailed explanation.
[out]mag_x: Magnetometer X-Axis data.
[out]mag_y: Magnetometer Y-Axis data.
[out]mag_z: Magnetometer Z-Axis data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu13_mag_get_x()

err_t c6dofimu13_mag_get_x ( c6dofimu13_t * ctx,
float * result )

6DOF IMU 13 Magnetometer get X-Axis data function.

This function reads magnetometer X-Axis data.

Parameters
[in]ctx: Click context object. See c6dofimu13_t object definition for detailed explanation.
[out]result: Magnetometer X-Axis data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu13_mag_get_y()

err_t c6dofimu13_mag_get_y ( c6dofimu13_t * ctx,
float * result )

6DOF IMU 13 Magnetometer get Y-Axis data function.

This function reads magnetometer Y-Axis data.

Parameters
[in]ctx: Click context object. See c6dofimu13_t object definition for detailed explanation.
[out]result: Magnetometer Y-Axis data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu13_mag_get_z()

err_t c6dofimu13_mag_get_z ( c6dofimu13_t * ctx,
float * result )

6DOF IMU 13 Magnetometer get Z-Axis data function.

This function reads magnetometer Z-Axis data.

Parameters
[in]ctx: Click context object. See c6dofimu13_t object definition for detailed explanation.
[out]result: Magnetometer Z-Axis data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu13_mag_init()

err_t c6dofimu13_mag_init ( c6dofimu13_t * ctx,
uint8_t res,
uint8_t op_mode,
uint8_t temp_meas )

6DOF IMU 13 Magnetometer initialize function.

This function initializes magnetometer.

Parameters
[in]ctx: Click context object. See c6dofimu13_t object definition for detailed explanation.
[in]res: Resolution.
[in]op_mode: Operation mode (single shot or continuous).
[in]temp_meas: Temperature measurement (enable or disable).
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu13_mag_offset()

err_t c6dofimu13_mag_offset ( c6dofimu13_t * ctx,
int16_t offset,
uint8_t axis )

6DOF IMU 13 set magnetometer offset function.

This function sets magnetometer offset value for X, Y, or Z-Axis.

Parameters
[in]ctx: Click context object. See c6dofimu13_t object definition for detailed explanation.
[in]offset: Offset value.
[in]axis: Axis for which it will set the offset.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu13_set_slave_address()

err_t c6dofimu13_set_slave_address ( c6dofimu13_t * ctx,
uint8_t slave_address )

6DOF IMU 13 set slave address function.

This function sets the I2C slave address.

Parameters
[in]ctx: Click context object. See c6dofimu13_t object definition for detailed explanation.
[in]slave_address: Slave address.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.