c3dhall11 2.0.0.0
3D Hall 11 Click Driver

API for configuring and manipulating 3D Hall 11 Click driver. More...

Topics

 3D Hall 11 Registers List
 List of registers of 3D Hall 11 Click driver.
 
 3D Hall 11 Registers Settings
 Settings for registers of 3D Hall 11 Click driver.
 
 3D Hall 11 MikroBUS Map
 MikroBUS pin mapping of 3D Hall 11 Click driver.
 

Functions

void c3dhall11_cfg_setup (c3dhall11_cfg_t *cfg)
 3D Hall 11 configuration object setup function.
 
err_t c3dhall11_init (c3dhall11_t *ctx, c3dhall11_cfg_t *cfg)
 3D Hall 11 initialization function.
 
err_t c3dhall11_default_cfg (c3dhall11_t *ctx)
 3D Hall 11 default configuration function.
 
err_t c3dhall11_generic_write (c3dhall11_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 3D Hall 11 I2C writing function.
 
err_t c3dhall11_generic_read (c3dhall11_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 3D Hall 11 I2C reading function.
 
err_t c3dhall11_write_register (c3dhall11_t *ctx, uint8_t reg, uint8_t data_in)
 3D Hall 11 write register function.
 
err_t c3dhall11_read_register (c3dhall11_t *ctx, uint8_t reg, uint8_t *data_out)
 3D Hall 11 read register function.
 
uint8_t c3dhall11_get_int_pin (c3dhall11_t *ctx)
 3D Hall 11 get int pin function.
 
err_t c3dhall11_check_communication (c3dhall11_t *ctx)
 3D Hall 11 check communication function.
 
err_t c3dhall11_read_data (c3dhall11_t *ctx, c3dhall11_data_t *data_out)
 3D Hall 11 read data function.
 

Detailed Description

API for configuring and manipulating 3D Hall 11 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

◆ c3dhall11_cfg_setup()

void c3dhall11_cfg_setup ( c3dhall11_cfg_t * cfg)

3D Hall 11 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ c3dhall11_check_communication()

err_t c3dhall11_check_communication ( c3dhall11_t * ctx)

3D Hall 11 check communication function.

This function checks the communication by reading and verifying the device and manufacturer IDs.

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

◆ c3dhall11_default_cfg()

err_t c3dhall11_default_cfg ( c3dhall11_t * ctx)

3D Hall 11 default configuration function.

This function executes a default configuration of 3D Hall 11 click board.

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

◆ c3dhall11_generic_read()

err_t c3dhall11_generic_read ( c3dhall11_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

3D Hall 11 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 c3dhall11_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.

◆ c3dhall11_generic_write()

err_t c3dhall11_generic_write ( c3dhall11_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

3D Hall 11 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 c3dhall11_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.

◆ c3dhall11_get_int_pin()

uint8_t c3dhall11_get_int_pin ( c3dhall11_t * ctx)

3D Hall 11 get int pin function.

This function returns the INT pin logic state.

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

◆ c3dhall11_init()

err_t c3dhall11_init ( c3dhall11_t * ctx,
c3dhall11_cfg_t * cfg )

3D Hall 11 initialization function.

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

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

◆ c3dhall11_read_data()

err_t c3dhall11_read_data ( c3dhall11_t * ctx,
c3dhall11_data_t * data_out )

3D Hall 11 read data function.

This function reads new data which consists of X, Y, and Z axis values in mT, and temperature in Celsius. It also reads the angle in Degrees between X and Y by default, and magnitude data as well.

Parameters
[in]ctx: Click context object. See c3dhall11_t object definition for detailed explanation.
[out]data_out: A structure object that contains the output read data. See c3dhall11_data_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ c3dhall11_read_register()

err_t c3dhall11_read_register ( c3dhall11_t * ctx,
uint8_t reg,
uint8_t * data_out )

3D Hall 11 read register function.

This function reads data from the selected register.

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

◆ c3dhall11_write_register()

err_t c3dhall11_write_register ( c3dhall11_t * ctx,
uint8_t reg,
uint8_t data_in )

3D Hall 11 write register function.

This function writes a desired data to the selected register by using I2C serial interface.

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