c6dofimu16 2.1.0.0
6DOF IMU 16 Click Driver

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

Topics

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

Functions

void c6dofimu16_cfg_setup (c6dofimu16_cfg_t *cfg)
 6DOF IMU 16 configuration object setup function.
 
void c6dofimu16_drv_interface_sel (c6dofimu16_cfg_t *cfg, c6dofimu16_drv_t drv_sel)
 6DOF IMU 16 driver interface setup function.
 
err_t c6dofimu16_init (c6dofimu16_t *ctx, c6dofimu16_cfg_t *cfg)
 6DOF IMU 16 initialization function.
 
err_t c6dofimu16_default_cfg (c6dofimu16_t *ctx)
 6DOF IMU 16 default configuration function.
 
err_t c6dofimu16_generic_write (c6dofimu16_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 6DOF IMU 16 data writing function.
 
err_t c6dofimu16_generic_read (c6dofimu16_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 6DOF IMU 16 data reading function.
 
uint8_t c6dofimu16_get_int1_pin (c6dofimu16_t *ctx)
 6DOF IMU 16 get int1 pin function.
 
uint8_t c6dofimu16_get_int2_pin (c6dofimu16_t *ctx)
 6DOF IMU 16 get int2 pin function.
 
err_t c6dofimu16_reg_write (c6dofimu16_t *ctx, uint8_t reg, uint8_t data_in)
 6DOF IMU 16 data writing function.
 
err_t c6dofimu16_reg_read (c6dofimu16_t *ctx, uint8_t reg, uint8_t *data_out)
 6DOF IMU 16 register data reading function.
 
err_t c6dofimu16_sw_reset (c6dofimu16_t *ctx)
 6DOF IMU 16 software reset device function.
 
err_t c6dofimu16_get_gyro_data (c6dofimu16_t *ctx, c6dofimu16_axis_t *gyro_data)
 6DOF IMU 16 read gyro function.
 
err_t c6dofimu16_get_accel_data (c6dofimu16_t *ctx, c6dofimu16_axis_t *accel_data)
 6DOF IMU 16 read accel function.
 

Detailed Description

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

◆ c6dofimu16_cfg_setup()

void c6dofimu16_cfg_setup ( c6dofimu16_cfg_t * cfg)

6DOF IMU 16 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ c6dofimu16_default_cfg()

err_t c6dofimu16_default_cfg ( c6dofimu16_t * ctx)

6DOF IMU 16 default configuration function.

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

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

◆ c6dofimu16_drv_interface_sel()

void c6dofimu16_drv_interface_sel ( c6dofimu16_cfg_t * cfg,
c6dofimu16_drv_t drv_sel )

6DOF IMU 16 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 c6dofimu16_cfg_t object definition for detailed explanation.
[in]drv_sel: Driver interface selection. See c6dofimu16_drv_t object definition for detailed explanation.
Returns
Nothing.
Note
This driver selection should be called 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.

◆ c6dofimu16_generic_read()

err_t c6dofimu16_generic_read ( c6dofimu16_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

6DOF IMU 16 data reading function.

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

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

◆ c6dofimu16_generic_write()

err_t c6dofimu16_generic_write ( c6dofimu16_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

6DOF IMU 16 data writing function.

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

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

◆ c6dofimu16_get_accel_data()

err_t c6dofimu16_get_accel_data ( c6dofimu16_t * ctx,
c6dofimu16_axis_t * accel_data )

6DOF IMU 16 read accel function.

This function reads the accelerometer of X, Y, and Z axis relative to standard gravity (mg).

Parameters
[in]ctx: Click context object. See c6dofimu16_t object definition for detailed explanation.
[out]accel_data: Output accelerometer data. See #c6dofimu16_data_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu16_get_gyro_data()

err_t c6dofimu16_get_gyro_data ( c6dofimu16_t * ctx,
c6dofimu16_axis_t * gyro_data )

6DOF IMU 16 read gyro function.

This function reads the angular rate of X, Y, and Z axis in degrees per second (mdps).

Parameters
[in]ctx: Click context object. See c6dofimu16_t object definition for detailed explanation.
[out]gyro_data: Output gyro data. See #c6dofimu16_data_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu16_get_int1_pin()

uint8_t c6dofimu16_get_int1_pin ( c6dofimu16_t * ctx)

6DOF IMU 16 get int1 pin function.

This function returns the INT1 pin logic state.

Parameters
[in]ctx: Click context object. See c6dofimu16_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ c6dofimu16_get_int2_pin()

uint8_t c6dofimu16_get_int2_pin ( c6dofimu16_t * ctx)

6DOF IMU 16 get int2 pin function.

This function returns the INT2 pin logic state.

Parameters
[in]ctx: Click context object. See c6dofimu16_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ c6dofimu16_init()

err_t c6dofimu16_init ( c6dofimu16_t * ctx,
c6dofimu16_cfg_t * cfg )

6DOF IMU 16 initialization function.

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

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

◆ c6dofimu16_reg_read()

err_t c6dofimu16_reg_read ( c6dofimu16_t * ctx,
uint8_t reg,
uint8_t * data_out )

6DOF IMU 16 register data reading function.

This function reads a data byte from the selected register.

Parameters
[in]ctx: Click context object. See c6dofimu16_t object definition for detailed explanation.
[in]reg: Register address.
[out]data_out: Output read data.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu16_reg_write()

err_t c6dofimu16_reg_write ( c6dofimu16_t * ctx,
uint8_t reg,
uint8_t data_in )

6DOF IMU 16 data writing function.

This function writes a data byte into the selected register.

Parameters
[in]ctx: Click context object. See c6dofimu16_t object definition for detailed explanation.
[in]reg: Register address.
[in]data_in: Data to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu16_sw_reset()

err_t c6dofimu16_sw_reset ( c6dofimu16_t * ctx)

6DOF IMU 16 software reset device function.

This function performs the device software reset.

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