c3dhall3 2.0.0.0
Public function

Functions

void c3dhall3_cfg_setup (c3dhall3_cfg_t *cfg)
 Config Object Initialization function.
 
C3DHALL3_RETVAL c3dhall3_init (c3dhall3_t *ctx, c3dhall3_cfg_t *cfg)
 Initialization function.
 
void c3dhall3_default_cfg (c3dhall3_t *ctx)
 Click Default Configuration function.
 
void c3dhall3_generic_write (c3dhall3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void c3dhall3_generic_read (c3dhall3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
uint8_t c3dhall3_read_status (c3dhall3_t *ctx)
 Read status register.
 
int16_t c3dhall3_read_x (c3dhall3_t *ctx)
 Read X value.
 
int16_t c3dhall3_read_y (c3dhall3_t *ctx)
 Read Y value.
 
int16_t c3dhall3_read_z (c3dhall3_t *ctx)
 Read Z value.
 
void c3dhall3_read_xyz (c3dhall3_t *ctx, int16_t *out_xyz)
 Read XYZ value.
 
void c3dhall3_write_offset (c3dhall3_t *ctx, uint8_t axis, uint16_t offset)
 Write offset value.
 
uint8_t c3dhall3_read_interrupt_source (c3dhall3_t *ctx)
 Read interrupt source.
 
void c3dhall3_interrupt_threshold (c3dhall3_t *ctx, uint16_t threshold)
 Set Interrupt Threshold.
 
uint8_t c3dhall3_check_int_pin (c3dhall3_t *ctx)
 Check status of the int pin.
 

Detailed Description

Function Documentation

◆ c3dhall3_cfg_setup()

void c3dhall3_cfg_setup ( c3dhall3_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.

◆ c3dhall3_check_int_pin()

uint8_t c3dhall3_check_int_pin ( c3dhall3_t * ctx)

Check status of the int pin.

Parameters
ctxClick object.

@description This function gets status of the interrupt pin.

◆ c3dhall3_default_cfg()

void c3dhall3_default_cfg ( c3dhall3_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for 3D Hall 3 click.

◆ c3dhall3_generic_read()

void c3dhall3_generic_read ( c3dhall3_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic read function.

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

@description This function reads data from the desired register.

◆ c3dhall3_generic_write()

void c3dhall3_generic_write ( c3dhall3_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic write function.

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

@description This function writes data to the desired register.

◆ c3dhall3_init()

C3DHALL3_RETVAL c3dhall3_init ( c3dhall3_t * ctx,
c3dhall3_cfg_t * cfg )

Initialization function.

Parameters
c3dhall3Click object.
cfgClick configuration structure.

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

◆ c3dhall3_interrupt_threshold()

void c3dhall3_interrupt_threshold ( c3dhall3_t * ctx,
uint16_t threshold )

Set Interrupt Threshold.

Parameters
ctxClick object.
thresholdThreshold value

@description This function sets desired threshold value.

◆ c3dhall3_read_interrupt_source()

uint8_t c3dhall3_read_interrupt_source ( c3dhall3_t * ctx)

Read interrupt source.

Parameters
ctxClick object.

@description This function returns interrupt source value.

◆ c3dhall3_read_status()

uint8_t c3dhall3_read_status ( c3dhall3_t * ctx)

Read status register.

Parameters
ctxClick object.

@description This function reads status from the register.

◆ c3dhall3_read_x()

int16_t c3dhall3_read_x ( c3dhall3_t * ctx)

Read X value.

Parameters
ctxClick object.

@description This function reads x value from the module.

◆ c3dhall3_read_xyz()

void c3dhall3_read_xyz ( c3dhall3_t * ctx,
int16_t * out_xyz )

Read XYZ value.

Parameters
ctxClick object.
out_xyzXYZ register

@description This function reads xyz values from the module.

◆ c3dhall3_read_y()

int16_t c3dhall3_read_y ( c3dhall3_t * ctx)

Read Y value.

Parameters
ctxClick object.

@description This function reads y value from the module.

◆ c3dhall3_read_z()

int16_t c3dhall3_read_z ( c3dhall3_t * ctx)

Read Z value.

Parameters
ctxClick object.

@description This function reads z value from the module.

◆ c3dhall3_write_offset()

void c3dhall3_write_offset ( c3dhall3_t * ctx,
uint8_t axis,
uint16_t offset )

Write offset value.

Parameters
ctxClick object.
axisAxis value
offsetOffset value

@description This function writes offest values to the module.