c3dhall9 2.0.0.0
3D Hall 9 Click Driver

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

Topics

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

Functions

void c3dhall9_cfg_setup (c3dhall9_cfg_t *cfg)
 3D Hall 9 configuration object setup function.
 
err_t c3dhall9_init (c3dhall9_t *ctx, c3dhall9_cfg_t *cfg)
 3D Hall 9 initialization function.
 
err_t c3dhall9_default_cfg (c3dhall9_t *ctx)
 3D Hall 9 default configuration function.
 
err_t c3dhall9_write_register (c3dhall9_t *ctx, uint8_t reg, uint32_t data_in)
 3D Hall 9 I2C writing function.
 
err_t c3dhall9_read_register (c3dhall9_t *ctx, uint8_t reg, uint32_t *data_out)
 3D Hall 9 I2C reading function.
 
void c3dhall9_enable_chip (c3dhall9_t *ctx)
 3D Hall 9 enable chip function.
 
void c3dhall9_disable_chip (c3dhall9_t *ctx)
 3D Hall 9 disable chip function.
 
uint8_t c3dhall9_get_int_pin (c3dhall9_t *ctx)
 3D Hall 9 get int pin function.
 
err_t c3dhall9_read_data (c3dhall9_t *ctx, c3dhall9_data_t *data_out)
 3D Hall 9 read data function.
 

Detailed Description

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

◆ c3dhall9_cfg_setup()

void c3dhall9_cfg_setup ( c3dhall9_cfg_t * cfg)

3D Hall 9 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ c3dhall9_default_cfg()

err_t c3dhall9_default_cfg ( c3dhall9_t * ctx)

3D Hall 9 default configuration function.

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

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

◆ c3dhall9_disable_chip()

void c3dhall9_disable_chip ( c3dhall9_t * ctx)

3D Hall 9 disable chip function.

This function disables the chip by setting the EN pin to low logic state.

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

◆ c3dhall9_enable_chip()

void c3dhall9_enable_chip ( c3dhall9_t * ctx)

3D Hall 9 enable chip function.

This function enables the chip by setting the EN pin to high logic state.

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

◆ c3dhall9_get_int_pin()

uint8_t c3dhall9_get_int_pin ( c3dhall9_t * ctx)

3D Hall 9 get int pin function.

This function returns the INT pin logic state.

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

◆ c3dhall9_init()

err_t c3dhall9_init ( c3dhall9_t * ctx,
c3dhall9_cfg_t * cfg )

3D Hall 9 initialization function.

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

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

◆ c3dhall9_read_data()

err_t c3dhall9_read_data ( c3dhall9_t * ctx,
c3dhall9_data_t * data_out )

3D Hall 9 read data function.

This function reads new data which consists of X, Y, and Z axis values in Gauss, and temperature in Celsius. It also calculates the angles between all axes in Degrees based on the raw axes data read.

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

◆ c3dhall9_read_register()

err_t c3dhall9_read_register ( c3dhall9_t * ctx,
uint8_t reg,
uint32_t * data_out )

3D Hall 9 I2C reading function.

This function reads a desired data from the selected register by using I2C serial interface.

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

◆ c3dhall9_write_register()

err_t c3dhall9_write_register ( c3dhall9_t * ctx,
uint8_t reg,
uint32_t data_in )

3D Hall 9 I2C writing function.

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

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