geomagnetic 2.0.0.0

Functions

void geomagnetic_cfg_setup (geomagnetic_cfg_t *cfg)
 Config Object Initialization function.
 
GEOMAGNETIC_RETVAL geomagnetic_init (geomagnetic_t *ctx, geomagnetic_cfg_t *cfg)
 Initialization function.
 
void geomagnetic_default_cfg (geomagnetic_t *ctx)
 Click Default Configuration function.
 
void geomagnetic_generic_write (geomagnetic_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void geomagnetic_generic_read (geomagnetic_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
GEOMAGNETIC_RETVAL geomagnetic_write_byte (geomagnetic_t *ctx, uint8_t input_data, uint8_t address)
 Write byte function.
 
GEOMAGNETIC_RETVAL geomagnetic_read_data (geomagnetic_t *ctx, uint8_t *out_buf, uint8_t address, uint8_t len)
 Read data function.
 
uint8_t geomagnetic_check_ready (geomagnetic_t *ctx)
 Check ready function.
 
void geomagnetic_read_axis_data (geomagnetic_t *ctx, geomagnetic_axis_t *geomag_axis, uint16_t *resolution_hall)
 Read axis data function.
 
GEOMAGNETIC_RETVAL geomagnetic_check_interrupt (geomagnetic_t *ctx)
 Check interrupt function.
 
uint8_t get_interrupt (geomagnetic_t *ctx)
 Get interrupt function.
 
void geomagnetic_software_reset (geomagnetic_t *ctx)
 Software reset function.
 
void geomagnetic_power_on_reset (geomagnetic_t *ctx)
 Power ON reset function.
 

Detailed Description

Function Documentation

◆ geomagnetic_cfg_setup()

void geomagnetic_cfg_setup ( geomagnetic_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.

◆ geomagnetic_check_interrupt()

GEOMAGNETIC_RETVAL geomagnetic_check_interrupt ( geomagnetic_t * ctx)

Check interrupt function.

Parameters
ctxClick object.

@description This function returns 1/0 depeinding on the input from the INT pin.

◆ geomagnetic_check_ready()

uint8_t geomagnetic_check_ready ( geomagnetic_t * ctx)

Check ready function.

Parameters
ctxClick object.

@description This function gives feedback on whether the device is ready to measure or not.

◆ geomagnetic_default_cfg()

void geomagnetic_default_cfg ( geomagnetic_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for geomagnetic click.

◆ geomagnetic_generic_read()

void geomagnetic_generic_read ( geomagnetic_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.

◆ geomagnetic_generic_write()

void geomagnetic_generic_write ( geomagnetic_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.

◆ geomagnetic_init()

GEOMAGNETIC_RETVAL geomagnetic_init ( geomagnetic_t * ctx,
geomagnetic_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ geomagnetic_power_on_reset()

void geomagnetic_power_on_reset ( geomagnetic_t * ctx)

Power ON reset function.

Parameters
ctxClick object.

@description This function configures some click module registers after the device has been reset.

◆ geomagnetic_read_axis_data()

void geomagnetic_read_axis_data ( geomagnetic_t * ctx,
geomagnetic_axis_t * geomag_axis,
uint16_t * resolution_hall )

Read axis data function.

Parameters
ctxClick object.
geomag_axisAxis structures pointer.
resolution_hallHall effect digital resolution value.

@description This function sets the x/y/z axis and hall resolution value.

◆ geomagnetic_read_data()

GEOMAGNETIC_RETVAL geomagnetic_read_data ( geomagnetic_t * ctx,
uint8_t * out_buf,
uint8_t address,
uint8_t len )

Read data function.

Parameters
ctxClick object.
out_bufOutput buffer.
addressAddress variable.
lenSize of the output buffer.

@description This function reads n bytes of data from the specified address.

◆ geomagnetic_software_reset()

void geomagnetic_software_reset ( geomagnetic_t * ctx)

Software reset function.

Parameters
ctxClick object.

@description This function resets the click module.

◆ geomagnetic_write_byte()

GEOMAGNETIC_RETVAL geomagnetic_write_byte ( geomagnetic_t * ctx,
uint8_t input_data,
uint8_t address )

Write byte function.

Parameters
ctxClick object.
input_dataInput data variable.
addressAddress variable.

@description This function writes one byte of data to the specified address.

◆ get_interrupt()

uint8_t get_interrupt ( geomagnetic_t * ctx)

Get interrupt function.

Parameters
ctxClick object.

@description This function returns the input value from the INT pin.