compass 2.0.0.0

Functions

void compass_cfg_setup (compass_cfg_t *cfg)
 Config Object Initialization function.
 
COMPASS_RETVAL compass_init (compass_t *ctx, compass_cfg_t *cfg)
 Initialization function.
 
void compass_accel_generic_write (compass_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic accel write function.
 
void compass_magnet_generic_write (compass_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic magnet write function.
 
void compass_accel_generic_read (compass_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic accel read function.
 
void compass_magnet_generic_read (compass_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic magnet read function.
 
void compass_default_config (compass_t *ctx)
 Default config function.
 
void compass_read_accel_axis (compass_t *ctx, int16_t *x_axis, int16_t *y_axis, int16_t *z_axis)
 Accel axes read function.
 
void compass_read_magnet_axis (compass_t *ctx, int16_t *x_axis, int16_t *y_axis, int16_t *z_axis)
 Magnet axes read function.
 

Detailed Description

Function Documentation

◆ compass_accel_generic_read()

void compass_accel_generic_read ( compass_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic accel read function.

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

@description This function reads data from the desired accelerometer register.

◆ compass_accel_generic_write()

void compass_accel_generic_write ( compass_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic accel write function.

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

@description This function writes accelerometer data to the desired register.

◆ compass_cfg_setup()

void compass_cfg_setup ( compass_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.

◆ compass_default_config()

void compass_default_config ( compass_t * ctx)

Default config function.

Parameters
ctxClick object.

@description This function does default configuration for the chip.

◆ compass_init()

COMPASS_RETVAL compass_init ( compass_t * ctx,
compass_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ compass_magnet_generic_read()

void compass_magnet_generic_read ( compass_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic magnet read function.

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

@description This function reads data from the desired magnetic register.

◆ compass_magnet_generic_write()

void compass_magnet_generic_write ( compass_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic magnet write function.

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

@description This function writes magnet data to the desired register.

◆ compass_read_accel_axis()

void compass_read_accel_axis ( compass_t * ctx,
int16_t * x_axis,
int16_t * y_axis,
int16_t * z_axis )

Accel axes read function.

Parameters
ctxClick object.
x_axisX axis value.
y_axisY axis value.
z_axisZ axis value.

@description This function reads data for accelerometer axes.

◆ compass_read_magnet_axis()

void compass_read_magnet_axis ( compass_t * ctx,
int16_t * x_axis,
int16_t * y_axis,
int16_t * z_axis )

Magnet axes read function.

Parameters
ctxClick object.
x_axisX axis value.
y_axisY axis value.
z_axisZ axis value.

@description This function reads data for megnetic axes.