accel14 2.0.0.0
Public function

Functions

void accel14_cfg_setup (accel14_cfg_t *cfg)
 Config Object Initialization function.
 
ACCEL14_RETVAL accel14_init (accel14_t *ctx, accel14_cfg_t *cfg)
 Initialization function.
 
void accel14_default_cfg (accel14_t *ctx)
 Click Default Configuration function.
 
void accel14_generic_transfer (accel14_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
void accel14_generic_write (accel14_t *ctx, uint8_t reg, uint8_t tx_data)
 Generic write function.
 
uint8_t accel14_generic_read (accel14_t *ctx, uint8_t reg)
 Generic read function.
 
void accel14_multi_read (accel14_t *ctx, uint8_t reg, uint8_t *p_rx_data, uint8_t n_bytes)
 Generic read sequence function.
 
uint8_t accel14_check_communication (accel14_t *ctx)
 Check communication function.
 
uint8_t accel14_check_accel_data_ready (accel14_t *ctx)
 Check accel data ready function.
 
uint8_t accel14_check_temp_data_ready (accel14_t *ctx)
 Check temperature data ready function.
 
void accel14_get_data (accel14_t *ctx, accel14_accel_t *accel_data)
 Get Accel data function.
 
float accel14_get_temperature (accel14_t *ctx)
 Get temperature function.
 
void accel14_read_accel (accel14_t *ctx, accel14_accel_fs_xl_t *accel_fs)
 Read Accel data function.
 
uint8_t accel14_check_int1 (accel14_t *ctx)
 Get interrupt 1 ststus function.
 
uint8_t accel14_check_int2 (accel14_t *ctx)
 Get interrupt 2 ststus function.
 

Detailed Description

Function Documentation

◆ accel14_cfg_setup()

void accel14_cfg_setup ( accel14_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.

◆ accel14_check_accel_data_ready()

uint8_t accel14_check_accel_data_ready ( accel14_t * ctx)

Check accel data ready function.

Parameters
ctxClick object.
Return values
-0x00 : No set of data is available at temperature sensor output;.
  • 0x01 : New set of data is available at temperature sensor output.

@description The function check new set of data is available at accelerometer output of IIS3DWB Ultra-wide bandwidth, low-noise, 3-axis digital vibration sensor on Accel 14 Click board.

◆ accel14_check_communication()

uint8_t accel14_check_communication ( accel14_t * ctx)

Check communication function.

Parameters
ctxClick object.
Return values
-0x00 : Error.
  • 0x01 : Success.

@description The function check device ID of IIS3DWB Ultra-wide bandwidth, low-noise, 3-axis digital vibration sensor on Accel 14 Click board.

◆ accel14_check_int1()

uint8_t accel14_check_int1 ( accel14_t * ctx)

Get interrupt 1 ststus function.

Parameters
ctxClick object.
Returns
Interrupt 1 state:
  • 0 : No active;
  • 1 : Active;

@description Function check interrupt 1 state by return state of the INT pin of IIS3DWB Ultra-wide bandwidth, low-noise, 3-axis digital vibration sensor on Accel 14 Click board.

◆ accel14_check_int2()

uint8_t accel14_check_int2 ( accel14_t * ctx)

Get interrupt 2 ststus function.

Parameters
ctxClick object.
Returns
Interrupt 1 state:
  • 0 : No active;
  • 1 : Active;

@description Function check interrupt 2 state by return state of the RST pin of IIS3DWB Ultra-wide bandwidth, low-noise, 3-axis digital vibration sensor on Accel 14 Click board.

◆ accel14_check_temp_data_ready()

uint8_t accel14_check_temp_data_ready ( accel14_t * ctx)

Check temperature data ready function.

Parameters
ctxClick object.
Return values
-0x00 : No set of data is available at temperature sensor output.
  • 0x01 : New set of data is available at temperature sensor output.

@description The function check new set of data is available at temperature output of IIS3DWB Ultra-wide bandwidth, low-noise, 3-axis digital vibration sensor on Accel 14 Click board.

◆ accel14_default_cfg()

void accel14_default_cfg ( accel14_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Accel 14 click.

◆ accel14_generic_read()

uint8_t accel14_generic_read ( accel14_t * ctx,
uint8_t reg )

Generic read function.

Parameters
ctxClick object.
reg8-bit register address.
Returns
8-bit read data

@description The function read the the byte of data from the target 8-bit register address of IIS3DWB Ultra-wide bandwidth, low-noise, 3-axis digital vibration sensor on Accel 14 Click board.

◆ accel14_generic_transfer()

void accel14_generic_transfer ( accel14_t * ctx,
uint8_t * wr_buf,
uint16_t wr_len,
uint8_t * rd_buf,
uint16_t rd_len )

Generic transfer function.

Parameters
ctxClick object.
wr_bufWrite data buffer
wr_lenNumber of byte in write data buffer
rd_bufRead data buffer
rd_lenNumber of byte in read data buffer

@description Generic SPI transfer, for sending and receiving packages

◆ accel14_generic_write()

void accel14_generic_write ( accel14_t * ctx,
uint8_t reg,
uint8_t tx_data )

Generic write function.

Parameters
ctxClick object.
reg8-bit register address.
tx_dataByte of data to write.

@description The function write the byte of data to the target 8-bit register address of IIS3DWB Ultra-wide bandwidth, low-noise, 3-axis digital vibration sensor on Accel 14 Click board.

◆ accel14_get_data()

void accel14_get_data ( accel14_t * ctx,
accel14_accel_t * accel_data )

Get Accel data function.

Parameters
ctxClick object.
accel_datapointer to memory location where Accel data be stored

@description Function read Accel, Gyro and Mag X-axis, Y-axis data and Z-axis data from of IIS3DWB Ultra-wide bandwidth, low-noise, 3-axis digital vibration sensor on Accel 14 Click board.

◆ accel14_get_temperature()

float accel14_get_temperature ( accel14_t * ctx)

Get temperature function.

Parameters
ctxClick object.
Returns
float temperature ( degrees Celsius )

@description Function get temperature data in degrees Celsius of IIS3DWB Ultra-wide bandwidth, low-noise, 3-axis digital vibration sensor on Accel 14 Click board.

◆ accel14_init()

ACCEL14_RETVAL accel14_init ( accel14_t * ctx,
accel14_cfg_t * cfg )

Initialization function.

Parameters
accel14Click object.
cfgClick configuration structure.

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

◆ accel14_multi_read()

void accel14_multi_read ( accel14_t * ctx,
uint8_t reg,
uint8_t * p_rx_data,
uint8_t n_bytes )

Generic read sequence function.

Parameters
ctxClick object.
reg8-bit register address.
p_tx_datapointer to the memory location where data be stored.
n_bytesnumber of bytes to be written.

@description The function read a sequential data starting from the targeted 8-bit register address of IIS3DWB Ultra-wide bandwidth, low-noise, 3-axis digital vibration sensor on Accel 14 Click board.

◆ accel14_read_accel()

void accel14_read_accel ( accel14_t * ctx,
accel14_accel_fs_xl_t * accel_fs )

Read Accel data function.

Parameters
ctxClick object.
accel_fspointer to memory location where Accel data be stored

@description Function read Accel data X-axis, Y-axis data and Z-axis data from the 6 targeted starts from ACCEL10_OUT_X_L register address of IIS3DWB Ultra-wide bandwidth, low-noise, 3-axis digital vibration sensor on Accel 14 Click board.