accel5 2.0.0.0
Public function

Functions

void accel5_cfg_setup (accel5_cfg_t *cfg)
 Config Object Initialization function.
 
err_t accel5_init (accel5_t *ctx, accel5_cfg_t *cfg)
 Initialization function.
 
err_t accel5_generic_write (accel5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
err_t accel5_generic_read (accel5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void accel5_default_cfg (accel5_t *ctx, uint8_t mode, uint8_t range)
 Click Default Configuration function..
 
void accel5_write_byte (accel5_t *ctx, uint8_t reg, uint8_t reg_data)
 Functions for write one byte in register.
 
uint8_t accel5_read_byte (accel5_t *ctx, uint8_t reg)
 Functions for read byte from register.
 
uint16_t accel5_read_data (accel5_t *ctx, uint8_t reg)
 Functions for read data from register.
 
int16_t accel5_get_axis (accel5_t *ctx, uint8_t axis)
 Functions for read axis data.
 
uint32_t accel5_sensor_time (accel5_t *ctx)
 Functions for initialize the chip.
 
float accel5_get_temperature (accel5_t *ctx)
 Functions for read temperature.
 
void accel5_soft_reset (accel5_t *ctx)
 Functions for software reset.
 

Detailed Description

Function Documentation

◆ accel5_cfg_setup()

void accel5_cfg_setup ( accel5_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.

◆ accel5_default_cfg()

void accel5_default_cfg ( accel5_t * ctx,
uint8_t mode,
uint8_t range )

Click Default Configuration function..

Parameters
ctxClick object.
modeMode.
rangeRange. @description This Functions initializes accelerometer g-range and mode. Initialization contains and enable data, single tap, double tap, step, actch and x / y / z axis.

◆ accel5_generic_read()

err_t accel5_generic_read ( accel5_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic 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 register.

◆ accel5_generic_write()

err_t accel5_generic_write ( accel5_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf. @description This function writes data to the desired register.

◆ accel5_get_axis()

int16_t accel5_get_axis ( accel5_t * ctx,
uint8_t axis )

Functions for read axis data.

Parameters
ctxClick object.
axisAxis. @description This function gets axis.

◆ accel5_get_temperature()

float accel5_get_temperature ( accel5_t * ctx)

Functions for read temperature.

Parameters
ctxClick object. @description This function read temperature.

◆ accel5_init()

err_t accel5_init ( accel5_t * ctx,
accel5_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ accel5_read_byte()

uint8_t accel5_read_byte ( accel5_t * ctx,
uint8_t reg )

Functions for read byte from register.

Parameters
ctxClick object.
regRegister address. @description This function read one byte data which is read from the register.

◆ accel5_read_data()

uint16_t accel5_read_data ( accel5_t * ctx,
uint8_t reg )

Functions for read data from register.

Parameters
ctxClick object.
regRegister address. @description This function read data.

◆ accel5_sensor_time()

uint32_t accel5_sensor_time ( accel5_t * ctx)

Functions for initialize the chip.

Parameters
ctxClick object. @description The internal sensor time is calculated using the formula: Sensor time = Time * 312.5us
  • Time The value read from the three time sensor register.

◆ accel5_soft_reset()

void accel5_soft_reset ( accel5_t * ctx)

Functions for software reset.

Parameters
ctxClick object. @description This function software reset .

◆ accel5_write_byte()

void accel5_write_byte ( accel5_t * ctx,
uint8_t reg,
uint8_t reg_data )

Functions for write one byte in register.

Parameters
ctxClick object.
regRegister address.
dataData @description This function write byte.