c3dhall2 2.0.0.0
Public function

Functions

void c3dhall2_cfg_setup (c3dhall2_cfg_t *cfg)
 Config Object Initialization function.
 
err_t c3dhall2_init (c3dhall2_t *ctx, c3dhall2_cfg_t *cfg)
 Initialization function.
 
err_t c3dhall2_default_cfg (c3dhall2_t *ctx)
 Default configuration initialization function.
 
err_t c3dhall2_write_data (c3dhall2_t *ctx, uint8_t *data_buf, uint16_t len)
 Generic write function.
 
err_t c3dhall2_read_data (c3dhall2_t *ctx, uint8_t *data_buf, uint16_t len)
 Generic read function.
 
err_t c3dhall2_get_axis_temp_data (c3dhall2_t *ctx, float *axis_data, float *temp_data)
 Functions for getting Hall axis data and Temperature data.
 
err_t c3dhall2_configuration (c3dhall2_t *ctx, uint8_t settings1, uint8_t settings2)
 Functions for settings chip for measurement.
 

Detailed Description

Function Documentation

◆ c3dhall2_cfg_setup()

void c3dhall2_cfg_setup ( c3dhall2_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ c3dhall2_configuration()

err_t c3dhall2_configuration ( c3dhall2_t * ctx,
uint8_t settings1,
uint8_t settings2 )

Functions for settings chip for measurement.

Parameters
ctxClick object
settings1Mode 1 register settings
settings2Mode 2 register settings

@description This function configures the chip for measurement.

Note
Options - modes :
  •   Options for settings:
       Mode 1 :
         Slave address (0,1, 2 or 3)
            Interrupt (Enable or Disable)
            Fast mode (Enable or Disable)
            Low power mode (Enable or Disable)
        Mode 2 :
            Temperature (Enable or Disable)
            Low power period (100ms or 12ms)
            Parity test (Enable or Disable)
    *

◆ c3dhall2_default_cfg()

err_t c3dhall2_default_cfg ( c3dhall2_t * ctx)

Default configuration initialization function.

Parameters
ctxClick object.

@description This function initializes default configuration.

Note
This function sets values to required registers.

◆ c3dhall2_get_axis_temp_data()

err_t c3dhall2_get_axis_temp_data ( c3dhall2_t * ctx,
float * axis_data,
float * temp_data )

Functions for getting Hall axis data and Temperature data.

Parameters
ctxClick object.
axis_dataHall axis data in mT - (axisData[0] - X axis, axisData[1] - Y axis, axisData[2] - Z axis)
temp_dataTemperature data in C

@description This function gets temperature and axis data.

◆ c3dhall2_init()

err_t c3dhall2_init ( c3dhall2_t * ctx,
c3dhall2_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ c3dhall2_read_data()

err_t c3dhall2_read_data ( c3dhall2_t * ctx,
uint8_t * data_buf,
uint16_t len )

Generic read function.

Parameters
ctxClick object.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function reads data from register.

◆ c3dhall2_write_data()

err_t c3dhall2_write_data ( c3dhall2_t * ctx,
uint8_t * data_buf,
uint16_t len )

Generic write function.

Parameters
ctxClick object.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to register.