xsensmti3 2.0.0.0
XSENS MTi-3 Click Driver

API for configuring and manipulating XSENS MTi-3 Click driver. More...

Topics

 XSENS MTi-3 Device Settings
 Settings for registers of XSENS MTi-3 Click driver.
 
 XSENS MTi-3 MikroBUS Map
 MikroBUS pin mapping of XSENS MTi-3 Click driver.
 

Functions

void xsensmti3_cfg_setup (xsensmti3_cfg_t *cfg)
 XSENS MTi-3 configuration object setup function.
 
err_t xsensmti3_init (xsensmti3_t *ctx, xsensmti3_cfg_t *cfg)
 XSENS MTi-3 initialization function.
 
err_t xsensmti3_generic_write (xsensmti3_t *ctx, uint8_t *data_buf, uint16_t len)
 XSENS MTi-3 data writing function.
 
err_t xsensmti3_generic_read (xsensmti3_t *ctx, uint8_t *data_buf, uint16_t max_len)
 XSENS MTi-3 data reading function.
 
void xsensmti3_parser (uint8_t *rsp_buf, uint8_t start_cnt, xsensmti3_parse_t *obj)
 XSENS MTi-3 general parser.
 
void xsensmti3_get_data (xsensmti3_quat_t *quat_obj, xsensmti3_data_t *data_obj)
 XSENS MTi-3 get Roll, Pitch and Yaw.
 
err_t xsensmti3_check_package (uint8_t *package_buf, uint8_t *start_package)
 XSENS MTi-3 checks package.
 

Detailed Description

API for configuring and manipulating XSENS MTi-3 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

◆ xsensmti3_cfg_setup()

void xsensmti3_cfg_setup ( xsensmti3_cfg_t * cfg)

XSENS MTi-3 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ xsensmti3_check_package()

err_t xsensmti3_check_package ( uint8_t * package_buf,
uint8_t * start_package )

XSENS MTi-3 checks package.

This function check for the starting elements.

Parameters
[in]package_buf: Package buffer.
[in]start_package: Element from which the package starts.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.

◆ xsensmti3_generic_read()

err_t xsensmti3_generic_read ( xsensmti3_t * ctx,
uint8_t * data_buf,
uint16_t max_len )

XSENS MTi-3 data reading function.

This function reads a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See xsensmti3_t object definition for detailed explanation.
[out]data_buf: Output read data.
[in]max_len: Number of bytes to be read.
Returns
  • >0 - Number of data bytes read,
  • <=0 - Error/Empty Ring buffer. See #err_t definition for detailed explanation.
Note
None.

◆ xsensmti3_generic_write()

err_t xsensmti3_generic_write ( xsensmti3_t * ctx,
uint8_t * data_buf,
uint16_t len )

XSENS MTi-3 data writing function.

This function writes a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See xsensmti3_t object definition for detailed explanation.
[in]data_buf: Data buffer for sending.
[in]len: Number of bytes for sending.
Returns
  • >=0 - Success,
  • <0 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ xsensmti3_get_data()

void xsensmti3_get_data ( xsensmti3_quat_t * quat_obj,
xsensmti3_data_t * data_obj )

XSENS MTi-3 get Roll, Pitch and Yaw.

This function get roll, pitch and yaw values.

Parameters
[in]quat_obj: Quat objest structure.
[out]data_obj: Output object for collecting data.
Returns
Nothing.

◆ xsensmti3_init()

err_t xsensmti3_init ( xsensmti3_t * ctx,
xsensmti3_cfg_t * cfg )

XSENS MTi-3 initialization function.

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

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

◆ xsensmti3_parser()

void xsensmti3_parser ( uint8_t * rsp_buf,
uint8_t start_cnt,
xsensmti3_parse_t * obj )

XSENS MTi-3 general parser.

This function parses object for collecting data.

Parameters
[in]rsp_buf: Response buffer.
[in]start_cnt: Element from which the package starts.
[out]obj: Parse object for collecting data.
Returns
Nothing.