c6dofimu8 2.0.0.0

Functions

void c6dofimu8_cfg_setup (c6dofimu8_cfg_t *cfg)
 Config Object Initialization function.
 
C6DOFIMU8_RETVAL c6dofimu8_init (c6dofimu8_t *ctx, c6dofimu8_cfg_t *cfg)
 Initialization function.
 
void c6dofimu8_default_cfg (c6dofimu8_t *ctx)
 Click Default Configuration function.
 
void c6dofimu8_generic_write (c6dofimu8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void c6dofimu8_generic_read (c6dofimu8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
uint8_t c6dofimu8_write_byte (c6dofimu8_t *ctx, uint8_t reg_addr, uint8_t data_in)
 Single Byte Write functions.
 
uint8_t c6dofimu8_read_byte (c6dofimu8_t *ctx, uint8_t reg_addr, uint8_t *data_out)
 Single Byte Read function.
 
uint8_t c6dofimu8_write_word (c6dofimu8_t *ctx, uint8_t reg_addr, uint16_t data_in)
 Word Write function.
 
uint8_t c6dofimu8_read_word (c6dofimu8_t *ctx, uint8_t reg_addr, uint16_t *data_out)
 Word Read function.
 
uint8_t c6dofimu8_write_bytes (c6dofimu8_t *ctx, uint8_t start_addr, uint8_t *data_in, uint8_t n_bytes)
 Sequential Write function.
 
uint8_t c6dofimu8_read_bytes (c6dofimu8_t *ctx, uint8_t start_addr, uint8_t *data_out, uint8_t n_bytes)
 equential Read function.
 
void c6dofimu8_reset (c6dofimu8_t *ctx)
 Device SW Reset function.
 
uint8_t c6dofimu8_get_int_1_pin (c6dofimu8_t *ctx)
 INT1 Pin Check function.
 
uint8_t c6dofimu8_get_int_2_pin (c6dofimu8_t *ctx)
 INT2 Pin Check function.
 
uint8_t c6dofimu8_get_drdy_status (c6dofimu8_t *ctx, uint8_t bit_mask)
 Status Check function.
 
void c6dofimu8_get_data (c6dofimu8_t *ctx, t_c6dofimu8_axis *accel_out, t_c6dofimu8_axis *gyro_out, int8_t *temp_out)
 Data Get function.
 
uint8_t c6dofimu8_set_fsr (c6dofimu8_t *ctx, uint8_t gyro_fsr, uint8_t accel_fsr)
 Full Scale Setting function.
 
uint8_t c6dofimu8_set_odr (c6dofimu8_t *ctx, uint8_t gyro_odr, uint8_t accel_odr)
 Data Rate Setting function.
 
void c6dofimu8_get_magnetometer_data (c6dofimu8_t *ctx, t_c6dofimu8_axis *magneto_out)
 Magnetometer Data Get function.
 

Detailed Description

Function Documentation

◆ c6dofimu8_cfg_setup()

void c6dofimu8_cfg_setup ( c6dofimu8_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.

◆ c6dofimu8_default_cfg()

void c6dofimu8_default_cfg ( c6dofimu8_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for c6DOF IMU 8 click.

◆ c6dofimu8_generic_read()

void c6dofimu8_generic_read ( c6dofimu8_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.

◆ c6dofimu8_generic_write()

void c6dofimu8_generic_write ( c6dofimu8_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.

◆ c6dofimu8_get_data()

void c6dofimu8_get_data ( c6dofimu8_t * ctx,
t_c6dofimu8_axis * accel_out,
t_c6dofimu8_axis * gyro_out,
int8_t * temp_out )

Data Get function.

Parameters
ctxClick object.
accel_outMemory location where accelerometer axis data be stored.
gyro_outMemory location where gyroscope axis data be stored.
temp_outMemory location where temperature data be stored.

@description This function performs a data reading and all necessary calculations to get accelerometer, gyroscope and temperature data.

◆ c6dofimu8_get_drdy_status()

uint8_t c6dofimu8_get_drdy_status ( c6dofimu8_t * ctx,
uint8_t bit_mask )

Status Check function.

Parameters
ctxClick object.
bit_maskSelects which status flag bit of the Status register be checked.

@description This function checks a data ready status for all measurements.

◆ c6dofimu8_get_int_1_pin()

uint8_t c6dofimu8_get_int_1_pin ( c6dofimu8_t * ctx)

INT1 Pin Check function.

Parameters
ctxClick object.

@description This function checks does interrupt generated on the INT1 pin.

◆ c6dofimu8_get_int_2_pin()

uint8_t c6dofimu8_get_int_2_pin ( c6dofimu8_t * ctx)

INT2 Pin Check function.

Parameters
ctxClick object.

@description This function checks does interrupt generated on the INT2 pin.

◆ c6dofimu8_get_magnetometer_data()

void c6dofimu8_get_magnetometer_data ( c6dofimu8_t * ctx,
t_c6dofimu8_axis * magneto_out )

Magnetometer Data Get function.

Parameters
ctxClick object.
gyro_odrMemory location where magnetometer axis data be stored.

@description This function performs a magnetometer data reading.

◆ c6dofimu8_init()

C6DOFIMU8_RETVAL c6dofimu8_init ( c6dofimu8_t * ctx,
c6dofimu8_cfg_t * cfg )

Initialization function.

Parameters
c6dofimu8Click object.
cfgClick configuration structure.

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

◆ c6dofimu8_read_byte()

uint8_t c6dofimu8_read_byte ( c6dofimu8_t * ctx,
uint8_t reg_addr,
uint8_t * data_out )

Single Byte Read function.

Parameters
ctxClick object.
reg_addrAddress which from data be read.
data_outMemory location where data be stored.

@description This function reads one byte data from the desired register.

◆ c6dofimu8_read_bytes()

uint8_t c6dofimu8_read_bytes ( c6dofimu8_t * ctx,
uint8_t start_addr,
uint8_t * data_out,
uint8_t n_bytes )

equential Read function.

Parameters
ctxClick object.
start_addrStart address which from data reading be started.
data_outMemory location where data be stored.
n_bytesNumber of bytes to be read.

@description This function performs a sequential data reading starting from the desired address.

◆ c6dofimu8_read_word()

uint8_t c6dofimu8_read_word ( c6dofimu8_t * ctx,
uint8_t reg_addr,
uint16_t * data_out )

Word Read function.

Parameters
ctxClick object.
reg_addrAddress of the lower byte of data which will be read.
data_outMemory location where data be stored.

@description This function reads 16bit data from the desired register.

◆ c6dofimu8_reset()

void c6dofimu8_reset ( c6dofimu8_t * ctx)

Device SW Reset function.

Parameters
ctxClick object.

@description This function performs a device software reset.

◆ c6dofimu8_set_fsr()

uint8_t c6dofimu8_set_fsr ( c6dofimu8_t * ctx,
uint8_t gyro_fsr,
uint8_t accel_fsr )

Full Scale Setting function.

Parameters
ctxClick object.
gyro_fsrSelects a full scale for gyroscope measurement [0-4].
accel_fsrSelects a full scale for accelerometer measurement [0-3].

@description This function selects a measurement full scale range.

◆ c6dofimu8_set_odr()

uint8_t c6dofimu8_set_odr ( c6dofimu8_t * ctx,
uint8_t gyro_odr,
uint8_t accel_odr )

Data Rate Setting function.

Parameters
ctxClick object.
gyro_odrSelects a data rate for gyroscope measurement [0x00-0x0B].
accel_odrSelects a data rate for accelerometer measurement [0x00-0x0B].

@description This function selects a measurement output data rate.

◆ c6dofimu8_write_byte()

uint8_t c6dofimu8_write_byte ( c6dofimu8_t * ctx,
uint8_t reg_addr,
uint8_t data_in )

Single Byte Write functions.

Parameters
ctxClick object.
reg_addrAddress where data be written.
data_inData to be written.

@description This function writes one byte data to the desired register.

◆ c6dofimu8_write_bytes()

uint8_t c6dofimu8_write_bytes ( c6dofimu8_t * ctx,
uint8_t start_addr,
uint8_t * data_in,
uint8_t n_bytes )

Sequential Write function.

Parameters
ctxClick object.
start_addrStart address which from data writing be started.
data_inData to be written.
n_bytesNumber of bytes to be written.

@description This function performs a sequential data writing starting from the desired address.

◆ c6dofimu8_write_word()

uint8_t c6dofimu8_write_word ( c6dofimu8_t * ctx,
uint8_t reg_addr,
uint16_t data_in )

Word Write function.

Parameters
ctxClick object.
reg_addrAddress of the lower byte of data which will be written.
data_inData to be written.

@description This function writes 16bit data to the desired register.