c9dof2  2.0.0.0
Functions
Public function

Functions

void c9dof2_cfg_setup (c9dof2_cfg_t *cfg)
 Config Object Initialization function. More...
 
C9DOF2_RETVAL c9dof2_init (c9dof2_t *ctx, c9dof2_cfg_t *cfg)
 Initialization function. More...
 
void c9dof2_write_byte (c9dof2_t *ctx, uint8_t reg, uint8_t wr_data)
 Write Byte function. More...
 
void c9dof2_write_data (c9dof2_t *ctx, uint8_t reg, int16_t wr_data)
 Write Data function. More...
 
uint8_t c9dof2_read_byte (c9dof2_t *ctx, uint8_t reg)
 Read Byte function. More...
 
int16_t c9dof2_read_data (c9dof2_t *ctx, uint8_t reg)
 Read Data function. More...
 
void c9dof2_dev_rst (c9dof2_t *ctx)
 Device Reset function. More...
 
void c9dof2_power (c9dof2_t *ctx, uint8_t on_off)
 Power up function. More...
 
void c9dof2_def_settings (c9dof2_t *ctx)
 Default settings function. More...
 
void c9dof2_read_gyroscope (c9dof2_t *ctx, int16_t *gyro_x, int16_t *gyro_y, int16_t *gyro_z)
 Read gyroscope data function. More...
 
void c9dof2_angular_rate (c9dof2_t *ctx, float *x_ang_rte, float *y_ang_rte, float *z_ang_rte)
 Read Angular Rate function. More...
 
void c9dof2_read_accelerometer (c9dof2_t *ctx, int16_t *accel_x, int16_t *accel_y, int16_t *accel_z)
 Read accelerometer data function. More...
 
void c9dof2_acceleration_rate (c9dof2_t *ctx, float *x_accel_rte, float *y_accel_rte, float *z_accel_rte)
 Read acceleration Rate function. More...
 
float c9dof2_read_temperature (c9dof2_t *ctx, float temp_offs)
 Read temperture function. More...
 
uint8_t c9dof2_check_int (c9dof2_t *ctx)
 Check Interrupt state function. More...
 
void c9dof2_snc_pin (c9dof2_t *ctx, uint8_t state)
 FSYNC Pin State function. More...
 

Detailed Description

Function Documentation

◆ c9dof2_acceleration_rate()

void c9dof2_acceleration_rate ( c9dof2_t ctx,
float *  x_accel_rte,
float *  y_accel_rte,
float *  z_accel_rte 
)

Read acceleration Rate function.

Parameters
ctxClick object.
x_accel_rtefloat X-axis acceleration rate
y_accel_rtefloat Y-axis acceleration rate
z_accel_rtefloat Z-axis acceleration rate

@description Function is used to calculate acceleration rate.

◆ c9dof2_angular_rate()

void c9dof2_angular_rate ( c9dof2_t ctx,
float *  x_ang_rte,
float *  y_ang_rte,
float *  z_ang_rte 
)

Read Angular Rate function.

Parameters
ctxClick object.
x_ang_rtefloat X-axis angular rate
y_ang_rtefloat Y-axis angular rate
z_ang_rtefloat Z-axis angular rate

@description Function is used to calculate angular rate.

◆ c9dof2_cfg_setup()

void c9dof2_cfg_setup ( c9dof2_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.

◆ c9dof2_check_int()

uint8_t c9dof2_check_int ( c9dof2_t ctx)

Check Interrupt state function.

Parameters
ctxClick object.
Returns
  • 0 : Interrupt has not occured
  • 1 : Interrupt has occured

@description Function is used to check if an interrupt has occured.

◆ c9dof2_def_settings()

void c9dof2_def_settings ( c9dof2_t ctx)

Default settings function.

Parameters
ctxClick object.

@description Function is used to apply the default settings to the device.

Note
It is advisable to use this device once.

◆ c9dof2_dev_rst()

void c9dof2_dev_rst ( c9dof2_t ctx)

Device Reset function.

Parameters
ctxClick object.

@description Function is used to perform soft reset.

◆ c9dof2_init()

C9DOF2_RETVAL c9dof2_init ( c9dof2_t ctx,
c9dof2_cfg_t cfg 
)

Initialization function.

Parameters
c9dof2Click object.
cfgClick configuration structure.

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

◆ c9dof2_power()

void c9dof2_power ( c9dof2_t ctx,
uint8_t  on_off 
)

Power up function.

Parameters
ctxClick object.
on_offValue defines power state of the device

@description Turns the device on or off.

Note
It is advisable to use predefined values.

◆ c9dof2_read_accelerometer()

void c9dof2_read_accelerometer ( c9dof2_t ctx,
int16_t *  accel_x,
int16_t *  accel_y,
int16_t *  accel_z 
)

Read accelerometer data function.

Parameters
ctxClick object.
accel_x16-bit accelerometer X-axis data
accel_y16-bit accelerometer Y-axis data
accel_z16-bit accelerometer Z-axis data

@description Function is used to read accelerometer data.

◆ c9dof2_read_byte()

uint8_t c9dof2_read_byte ( c9dof2_t ctx,
uint8_t  reg 
)

Read Byte function.

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

@descritpion Reads one byte from register defined by 8-bit register address

◆ c9dof2_read_data()

int16_t c9dof2_read_data ( c9dof2_t ctx,
uint8_t  reg 
)

Read Data function.

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

@description Reads two byte from registers defined by 8-bit register address

◆ c9dof2_read_gyroscope()

void c9dof2_read_gyroscope ( c9dof2_t ctx,
int16_t *  gyro_x,
int16_t *  gyro_y,
int16_t *  gyro_z 
)

Read gyroscope data function.

Parameters
ctxClick object.
gyro_x16-bit gyroscope X-axis data
gyro_y16-bit gyroscope Y-axis data
gyro_z16-bit gyroscope Z-axis data

@description Function is used to read gyroscope data.

◆ c9dof2_read_temperature()

float c9dof2_read_temperature ( c9dof2_t ctx,
float  temp_offs 
)

Read temperture function.

Parameters
ctxClick object.
temp_offstemperature offset.
Returns
result float temperture data

@description Function is used to read temperture in degree Centigrade.

◆ c9dof2_snc_pin()

void c9dof2_snc_pin ( c9dof2_t ctx,
uint8_t  state 
)

FSYNC Pin State function.

Parameters
ctxClick object.
statevalue that defines the state of the FSYNC pin.

@description Function is used to define the device to change the state of the pin.

◆ c9dof2_write_byte()

void c9dof2_write_byte ( c9dof2_t ctx,
uint8_t  reg,
uint8_t  wr_data 
)

Write Byte function.

Parameters
ctxClick object.
reg8-bit register address
wr_data8-bit write data

@description Writes one byte into register defined by 8-bit register address

◆ c9dof2_write_data()

void c9dof2_write_data ( c9dof2_t ctx,
uint8_t  reg,
int16_t  wr_data 
)

Write Data function.

Parameters
ctxClick object.
reg8-bit register address
wr_data16-bit write data

@description Writes two bytes into registers defined by 8-bit register address