c6dofimu17 2.0.0.0
6DOF IMU 17 Click Driver

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

Topics

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

Functions

void c6dofimu17_cfg_setup (c6dofimu17_cfg_t *cfg)
 6DOF IMU 17 configuration object setup function.
 
void c6dofimu17_drv_interface_selection (c6dofimu17_cfg_t *cfg, c6dofimu17_drv_t drv_sel)
 6DOF IMU 17 driver interface setup function.
 
err_t c6dofimu17_init (c6dofimu17_t *ctx, c6dofimu17_cfg_t *cfg)
 6DOF IMU 17 initialization function.
 
err_t c6dofimu17_default_cfg (c6dofimu17_t *ctx)
 6DOF IMU 17 default configuration function.
 
err_t c6dofimu17_generic_write (c6dofimu17_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 6DOF IMU 17 data writing function.
 
err_t c6dofimu17_generic_read (c6dofimu17_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 6DOF IMU 17 data reading function.
 
err_t c6dofimu17_bank_selection (c6dofimu17_t *ctx, uint8_t bank_sel)
 6DOF IMU 17 bank selection function.
 
uint8_t c6dofimu17_get_interrupt (c6dofimu17_t *ctx)
 6DOF IMU 17 get interrupt function.
 
err_t c6dofimu17_get_device_id (c6dofimu17_t *ctx, uint8_t *device_id)
 6DOF IMU 17 get device ID function.
 
err_t c6dofimu17_temperature_enable (c6dofimu17_t *ctx)
 6DOF IMU 17 temperature enable function.
 
err_t c6dofimu17_gyro_enable (c6dofimu17_t *ctx)
 6DOF IMU 17 gyroscope enable function.
 
err_t c6dofimu17_accel_enable (c6dofimu17_t *ctx)
 6DOF IMU 17 accelerometer enable function.
 
err_t c6dofimu17_set_config_gyro (c6dofimu17_t *ctx, c6dofimu17_gyro_cfg_t gyro_cfg)
 6DOF IMU 17 set config gyroscope function.
 
err_t c6dofimu17_get_config_gyro (c6dofimu17_t *ctx, c6dofimu17_gyro_cfg_t *gyro_cfg)
 6DOF IMU 17 get config gyroscope function.
 
err_t c6dofimu17_set_config_accel (c6dofimu17_t *ctx, c6dofimu17_accel_cfg_t accel_cfg)
 6DOF IMU 17 set config accelerometer function.
 
err_t c6dofimu17_get_config_accel (c6dofimu17_t *ctx, c6dofimu17_accel_cfg_t *accel_cfg)
 6DOF IMU 17 get config accelerometer function.
 
err_t c6dofimu17_soft_reset (c6dofimu17_t *ctx)
 6DOF IMU 17 soft reset function.
 
err_t c6dofimu17_get_accel_data (c6dofimu17_t *ctx, c6dofimu17_axis_t *accel_data)
 6DOF IMU 17 get accel data function.
 
err_t c6dofimu17_get_gyro_data (c6dofimu17_t *ctx, c6dofimu17_axis_t *gyro_data)
 6DOF IMU 17 get gyroscope data function.
 
err_t c6dofimu17_get_temperature (c6dofimu17_t *ctx, float *temperature)
 6DOF IMU 17 get temperature data function.
 

Detailed Description

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

◆ c6dofimu17_accel_enable()

err_t c6dofimu17_accel_enable ( c6dofimu17_t * ctx)

6DOF IMU 17 accelerometer enable function.

This function enable accelerometer data of the IIM-42652 High-performance 6-Axis SmartIndustrial™ MotionTracking MEMS Device on the 6DOF IMU 17 click board™.

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

◆ c6dofimu17_bank_selection()

err_t c6dofimu17_bank_selection ( c6dofimu17_t * ctx,
uint8_t bank_sel )

6DOF IMU 17 bank selection function.

This function accessible from all register bank of the IIM-42652 High-performance 6-Axis SmartIndustrial™ MotionTracking MEMS Device on the 6DOF IMU 17 click board™.

Parameters
[in]ctx: Click context object. See c6dofimu17_t object definition for detailed explanation.
[in]bank_sel:
  • 0 ( C6DOFIMU17_SET_BANK_0 )- Bank 0 (default),
  • 1 ( C6DOFIMU17_SET_BANK_1 )- Bank 1,
  • 2 ( C6DOFIMU17_SET_BANK_2 )- Bank 2,
  • 3 ( C6DOFIMU17_SET_BANK_3 )- Bank 3,
  • 4 ( C6DOFIMU17_SET_BANK_4 )- Bank 4.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu17_cfg_setup()

void c6dofimu17_cfg_setup ( c6dofimu17_cfg_t * cfg)

6DOF IMU 17 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ c6dofimu17_default_cfg()

err_t c6dofimu17_default_cfg ( c6dofimu17_t * ctx)

6DOF IMU 17 default configuration function.

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

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

◆ c6dofimu17_drv_interface_selection()

void c6dofimu17_drv_interface_selection ( c6dofimu17_cfg_t * cfg,
c6dofimu17_drv_t drv_sel )

6DOF IMU 17 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 c6dofimu17_cfg_t object definition for detailed explanation.
[in]drv_sel: Driver interface selection. See c6dofimu17_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.

◆ c6dofimu17_generic_read()

err_t c6dofimu17_generic_read ( c6dofimu17_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

6DOF IMU 17 data reading function.

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

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

◆ c6dofimu17_generic_write()

err_t c6dofimu17_generic_write ( c6dofimu17_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

6DOF IMU 17 data writing function.

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

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

◆ c6dofimu17_get_accel_data()

err_t c6dofimu17_get_accel_data ( c6dofimu17_t * ctx,
c6dofimu17_axis_t * accel_data )

6DOF IMU 17 get accel data function.

This function get accelerometer data of the IIM-42652 High-performance 6-Axis SmartIndustrial™ MotionTracking MEMS Device on the 6DOF IMU 17 click board™.

Parameters
[in]ctx: Click context object. See c6dofimu17_t object definition for detailed explanation.
[out]accel_data: An object that contains X , Y and Z axis data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu17_get_config_accel()

err_t c6dofimu17_get_config_accel ( c6dofimu17_t * ctx,
c6dofimu17_accel_cfg_t * accel_cfg )

6DOF IMU 17 get config accelerometer function.

This function get accelerometer configuration of the IIM-42652 High-performance 6-Axis SmartIndustrial™ MotionTracking MEMS Device on the 6DOF IMU 17 click board™.

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

◆ c6dofimu17_get_config_gyro()

err_t c6dofimu17_get_config_gyro ( c6dofimu17_t * ctx,
c6dofimu17_gyro_cfg_t * gyro_cfg )

6DOF IMU 17 get config gyroscope function.

This function get gyroscope configuration of the IIM-42652 High-performance 6-Axis SmartIndustrial™ MotionTracking MEMS Device on the 6DOF IMU 17 click board™.

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

◆ c6dofimu17_get_device_id()

err_t c6dofimu17_get_device_id ( c6dofimu17_t * ctx,
uint8_t * device_id )

6DOF IMU 17 get device ID function.

This function get device ID of the IIM-42652 High-performance 6-Axis SmartIndustrial™ MotionTracking MEMS Device on the 6DOF IMU 17 click board™.

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

◆ c6dofimu17_get_gyro_data()

err_t c6dofimu17_get_gyro_data ( c6dofimu17_t * ctx,
c6dofimu17_axis_t * gyro_data )

6DOF IMU 17 get gyroscope data function.

This function get gyroscope data of the IIM-42652 High-performance 6-Axis SmartIndustrial™ MotionTracking MEMS Device on the 6DOF IMU 17 click board™.

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

◆ c6dofimu17_get_interrupt()

uint8_t c6dofimu17_get_interrupt ( c6dofimu17_t * ctx)

6DOF IMU 17 get interrupt function.

This function get states of the INT pin of the IIM-42652 High-performance 6-Axis SmartIndustrial™ MotionTracking MEMS Device on the 6DOF IMU 17 click board™.

Parameters
[in]ctx: Click context object. See c6dofimu17_t object definition for detailed explanation.
Returns
INT pin state.
Note
None.

◆ c6dofimu17_get_temperature()

err_t c6dofimu17_get_temperature ( c6dofimu17_t * ctx,
float * temperature )

6DOF IMU 17 get temperature data function.

This function get temperature data of the IIM-42652 High-performance 6-Axis SmartIndustrial™ MotionTracking MEMS Device on the 6DOF IMU 17 click board™.

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

◆ c6dofimu17_gyro_enable()

err_t c6dofimu17_gyro_enable ( c6dofimu17_t * ctx)

6DOF IMU 17 gyroscope enable function.

This function enable gyroscope data of the IIM-42652 High-performance 6-Axis SmartIndustrial™ MotionTracking MEMS Device on the 6DOF IMU 17 click board™.

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

◆ c6dofimu17_init()

err_t c6dofimu17_init ( c6dofimu17_t * ctx,
c6dofimu17_cfg_t * cfg )

6DOF IMU 17 initialization function.

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

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

◆ c6dofimu17_set_config_accel()

err_t c6dofimu17_set_config_accel ( c6dofimu17_t * ctx,
c6dofimu17_accel_cfg_t accel_cfg )

6DOF IMU 17 set config accelerometer function.

This function set accelerometer configuration of the IIM-42652 High-performance 6-Axis SmartIndustrial™ MotionTracking MEMS Device on the 6DOF IMU 17 click board™.

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

◆ c6dofimu17_set_config_gyro()

err_t c6dofimu17_set_config_gyro ( c6dofimu17_t * ctx,
c6dofimu17_gyro_cfg_t gyro_cfg )

6DOF IMU 17 set config gyroscope function.

This function set gyroscope configuration of the IIM-42652 High-performance 6-Axis SmartIndustrial™ MotionTracking MEMS Device on the 6DOF IMU 17 click board™.

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

◆ c6dofimu17_soft_reset()

err_t c6dofimu17_soft_reset ( c6dofimu17_t * ctx)

6DOF IMU 17 soft reset function.

This function performs a software reset
of the IIM-42652 High-performance 6-Axis SmartIndustrial™ MotionTracking MEMS Device on the 6DOF IMU 17 click board™.

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

◆ c6dofimu17_temperature_enable()

err_t c6dofimu17_temperature_enable ( c6dofimu17_t * ctx)

6DOF IMU 17 temperature enable function.

This function enable temperature data of the IIM-42652 High-performance 6-Axis SmartIndustrial™ MotionTracking MEMS Device on the 6DOF IMU 17 click board™.

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