accel2 2.0.0.0
Public function

Functions

void accel2_cfg_setup (accel2_cfg_t *cfg)
 Config Object Initialization function.
 
ACCEL2_RETVAL accel2_init (accel2_t *ctx, accel2_cfg_t *cfg)
 Initialization function.
 
void accel2_generic_write (accel2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void accel2_generic_read (accel2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void accel2_setting (accel2_t *ctx)
 Initializes function.
 
uint8_t accel2_check_id (accel2_t *ctx)
 Check Accel 2 ID.
 
int16_t accel2_read_xaxis (accel2_t *ctx)
 Function read X axis.
 
int16_t accel2_read_yaxis (accel2_t *ctx)
 Function read Y axis.
 
int16_t accel2_read_zaxis (accel2_t *ctx)
 Function read Z axis.
 

Detailed Description

Function Documentation

◆ accel2_cfg_setup()

void accel2_cfg_setup ( accel2_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.

◆ accel2_check_id()

uint8_t accel2_check_id ( accel2_t * ctx)

Check Accel 2 ID.

Parameters
ctxClick object.

@description This function check Accel 2 ID.

◆ accel2_generic_read()

void accel2_generic_read ( accel2_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.

◆ accel2_generic_write()

void accel2_generic_write ( accel2_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.

◆ accel2_init()

ACCEL2_RETVAL accel2_init ( accel2_t * ctx,
accel2_cfg_t * cfg )

Initialization function.

Parameters
accel2Click object.
cfgClick configuration structure.

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

◆ accel2_read_xaxis()

int16_t accel2_read_xaxis ( accel2_t * ctx)

Function read X axis.

Parameters
ctxClick object.

@description This function read X axis from Accel 2.

◆ accel2_read_yaxis()

int16_t accel2_read_yaxis ( accel2_t * ctx)

Function read Y axis.

Parameters
ctxClick object.

@description This function read Y axis from Accel 2.

◆ accel2_read_zaxis()

int16_t accel2_read_zaxis ( accel2_t * ctx)

Function read Z axis.

Parameters
ctxClick object.

@description This function read Z axis from Accel 2.

◆ accel2_setting()

void accel2_setting ( accel2_t * ctx)

Initializes function.

Parameters
ctxClick object.

@description This function initializes Accel 2 register.