accel3 2.0.0.0
Public function

Functions

void accel3_cfg_setup (accel3_cfg_t *cfg)
 Config Object Initialization function.
 
ACCEL3_RETVAL accel3_init (accel3_t *ctx, accel3_cfg_t *cfg)
 Initialization function.
 
void accel3_default_cfg (accel3_t *ctx, accel3_cfg_t *cfg)
 Click Default Configuration function.
 
void accel3_generic_write (accel3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void accel3_generic_read (accel3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
uint8_t accel3_check_id (accel3_t *ctx)
 Check Accel 3 ID function.
 
void accel3_read_data (accel3_t *ctx, accel3_data_t *accel3_data)
 Get accelerometer data function.
 

Detailed Description

Function Documentation

◆ accel3_cfg_setup()

void accel3_cfg_setup ( accel3_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.

◆ accel3_check_id()

uint8_t accel3_check_id ( accel3_t * ctx)

Check Accel 3 ID function.

Parameters
ctxClick object.

@description This function checks Accel 3 ID.

◆ accel3_default_cfg()

void accel3_default_cfg ( accel3_t * ctx,
accel3_cfg_t * cfg )

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Accel3 click.

◆ accel3_generic_read()

void accel3_generic_read ( accel3_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.

◆ accel3_generic_write()

void accel3_generic_write ( accel3_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.

◆ accel3_init()

ACCEL3_RETVAL accel3_init ( accel3_t * ctx,
accel3_cfg_t * cfg )

Initialization function.

Parameters
accel3Click object.
cfgClick configuration structure.

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

◆ accel3_read_data()

void accel3_read_data ( accel3_t * ctx,
accel3_data_t * accel3_data )

Get accelerometer data function.

Parameters
ctxClick object.
accel3_dataPointer to structure where Accel data be stored.

@description This function reads Accel data ( X, Y and Z axis ) from the desired Accel registers of the H3LIS331DL module.