c6dofimu14 2.0.0.0
6DOF IMU 14 Click Driver

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

Topics

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

Functions

void c6dofimu14_cfg_setup (c6dofimu14_cfg_t *cfg)
 6DOF IMU 14 configuration object setup function.
 
void c6dofimu14_drv_interface_selection (c6dofimu14_cfg_t *cfg, c6dofimu14_drv_t drv_sel)
 6DOF IMU 14 driver interface setup function.
 
err_t c6dofimu14_init (c6dofimu14_t *ctx, c6dofimu14_cfg_t *cfg)
 6DOF IMU 14 initialization function.
 
err_t c6dofimu14_default_cfg (c6dofimu14_t *ctx)
 6DOF IMU 14 default configuration function.
 
err_t c6dofimu14_generic_write (c6dofimu14_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 6DOF IMU 14 data writing function.
 
err_t c6dofimu14_generic_read (c6dofimu14_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 6DOF IMU 14 data reading function.
 
uint8_t c6dofimu14_get_int_pin (c6dofimu14_t *ctx)
 6DOF IMU 14 get INT pin state function.
 
uint8_t c6dofimu14_get_snc_pin (c6dofimu14_t *ctx)
 6DOF IMU 14 get SNC pin state function.
 
err_t c6dofimu14_software_reset (c6dofimu14_t *ctx)
 6DOF IMU 14 software reset function.
 
err_t c6dofimu14_get_data (c6dofimu14_t *ctx, c6dofimu14_axis_t *acc_axis, c6dofimu14_axis_t *gyro_axis)
 6DOF IMU 14 get accel and gyro data function.
 
err_t c6dofimu14_get_temperature (c6dofimu14_t *ctx, float *temp)
 6DOF IMU 14 get temperature data function.
 
err_t c6dofimu14_get_accel_axis (c6dofimu14_t *ctx, c6dofimu14_axis_t *axis)
 6DOF IMU 14 get accel data function.
 
err_t c6dofimu14_get_gyro_axis (c6dofimu14_t *ctx, c6dofimu14_axis_t *axis)
 6DOF IMU 14 get gyro data function.
 

Detailed Description

API for configuring and manipulating 6DOF IMU 14 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

◆ c6dofimu14_cfg_setup()

void c6dofimu14_cfg_setup ( c6dofimu14_cfg_t * cfg)

6DOF IMU 14 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ c6dofimu14_default_cfg()

err_t c6dofimu14_default_cfg ( c6dofimu14_t * ctx)

6DOF IMU 14 default configuration function.

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

Parameters
[in]ctx: Click context object. See c6dofimu14_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.

◆ c6dofimu14_drv_interface_selection()

void c6dofimu14_drv_interface_selection ( c6dofimu14_cfg_t * cfg,
c6dofimu14_drv_t drv_sel )

6DOF IMU 14 driver interface setup function.

This function sets a serial driver interface which will be used further in the click driver.

Parameters
[out]cfg: Click configuration structure. See c6dofimu14_cfg_t object definition for detailed explanation.
[in]drv_sel: Driver interface selection. See c6dofimu14_drv_t object definition for detailed explanation.
Returns
Nothing.
Note
This driver selection should be call before init function to configure the driver to work with the serial interface which is consistent with the real state of the hardware. If this function is not called, the default driver interface will be set.

◆ c6dofimu14_generic_read()

err_t c6dofimu14_generic_read ( c6dofimu14_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

6DOF IMU 14 data reading function.

This function reads a desired number of data bytes starting from the selected register.

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

◆ c6dofimu14_generic_write()

err_t c6dofimu14_generic_write ( c6dofimu14_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

6DOF IMU 14 data writing function.

This function writes a desired number of data bytes starting from the selected register.

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

◆ c6dofimu14_get_accel_axis()

err_t c6dofimu14_get_accel_axis ( c6dofimu14_t * ctx,
c6dofimu14_axis_t * axis )

6DOF IMU 14 get accel data function.

This function reads accel data for all three axis.

Parameters
[in]ctx: Click context object.
[out]axis: Accel axis output. See c6dofimu14_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu14_get_data()

err_t c6dofimu14_get_data ( c6dofimu14_t * ctx,
c6dofimu14_axis_t * acc_axis,
c6dofimu14_axis_t * gyro_axis )

6DOF IMU 14 get accel and gyro data function.

This function reads accel and gyro data for all three axis.

Parameters
[in]ctx: Click context object.
[out]acc_axis: Accel axis output.
[out]gyro_axis: Gyro axis output. See c6dofimu14_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu14_get_gyro_axis()

err_t c6dofimu14_get_gyro_axis ( c6dofimu14_t * ctx,
c6dofimu14_axis_t * axis )

6DOF IMU 14 get gyro data function.

This function reads gyro data for all three axis.

Parameters
[in]ctx: Click context object.
[out]axis: Gyro axis output. See c6dofimu14_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu14_get_int_pin()

uint8_t c6dofimu14_get_int_pin ( c6dofimu14_t * ctx)

6DOF IMU 14 get INT pin state function.

This function returns the state of INT pin.

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

◆ c6dofimu14_get_snc_pin()

uint8_t c6dofimu14_get_snc_pin ( c6dofimu14_t * ctx)

6DOF IMU 14 get SNC pin state function.

This function returns the state of SNC pin.

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

◆ c6dofimu14_get_temperature()

err_t c6dofimu14_get_temperature ( c6dofimu14_t * ctx,
float * temp )

6DOF IMU 14 get temperature data function.

This function reads the raw temperature data and converts it to Celsius.

Parameters
[in]ctx: Click context object.
[out]temp: Temperature in Celsius. See c6dofimu14_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu14_init()

err_t c6dofimu14_init ( c6dofimu14_t * ctx,
c6dofimu14_cfg_t * cfg )

6DOF IMU 14 initialization function.

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

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

◆ c6dofimu14_software_reset()

err_t c6dofimu14_software_reset ( c6dofimu14_t * ctx)

6DOF IMU 14 software reset function.

This function performs the device software reset.

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