c9dof 2.0.0.0
|
Functions | |
void | c9dof_cfg_setup (c9dof_cfg_t *cfg) |
Config Object Initialization function. | |
C9DOF_RETVAL | c9dof_init (c9dof_t *ctx, c9dof_cfg_t *cfg) |
Initialization function. | |
void | c9dof_default_cfg (c9dof_t *ctx) |
Click Default Configuration function. | |
void | c9dof_set_power_mode (c9dof_t *ctx, uint8_t pwr_mode) |
Set accel and gyro power mode function. | |
void | c9dof_generic_write_accel_gyro (c9dof_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic accel and gyro write function. | |
void | c9dof_generic_read_accel_gyro (c9dof_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic accel and gyro read function. | |
void | c9dof_generic_write_mag (c9dof_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic mag write function. | |
void | c9dof_generic_read_mag (c9dof_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic mag read function. | |
void | c9dof_read_accel (c9dof_t *ctx, c9dof_accel_data_t *accel_data) |
Get accelerometer data function. | |
void | c9dof_read_gyro (c9dof_t *ctx, c9dof_gyro_data_t *gyro_data) |
Get gyroscope data function. | |
void | c9dof_read_mag (c9dof_t *ctx, c9dof_mag_data_t *mag_data) |
Get magnetometer data function. | |
uint8_t | c9dof_get_interrupt (c9dof_t *ctx) |
Get state of the Magnetic sensor interrupt function. | |
void c9dof_cfg_setup | ( | c9dof_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void c9dof_default_cfg | ( | c9dof_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for 9Dof click.
Enable accel and gyro sensors.
reg : C9DOF_REG_CTRL_REG4
tx_data : C9DOF_CTRL_REG4_CONFIG
reg : C9DOF_REG_CTRL_REG1_G ------------------------------------------------- tx_data : C9DOF_CTRL_REG1_G_CONFIG
reg : C9DOF_REG_CTRL_REG5_XL
tx_data : C9DOF_CTRL_REG5_XL_CONFIG
reg : C9DOF_REG_CTRL_REG6_XL ------------------------------------------------- tx_data : C9DOF_CTRL_REG6_XL_CONFIG
reg : C9DOF_REG_CTRL_REG8
tx_data : C9DOF_CTRL_REG8_CONFIG
reg : C9DOF_REG_CTRL_REG1_M ------------------------------------------------- tx_data : C9DOF_CTRL_REG1_M_CONFIG
reg : C9DOF_REG_CTRL_REG2_M
tx_data : C9DOF_CTRL_REG2_M_CONFIG
reg : C9DOF_REG_CTRL_REG3_M ------------------------------------------------- tx_data : C9DOF_CTRL_REG3_M_CONFIG
reg : C9DOF_REG_CTRL_REG4_M
tx_data : C9DOF_CTRL_REG4_M_CONFIG
reg : C9DOF_REG_CTRL_REG5_M ------------------------------------------------- tx_data : C9DOF_CTRL_REG5_M_CONFIG
void c9dof_generic_read_accel_gyro | ( | c9dof_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic accel and gyro read function.
ctx | Click object. |
reg | Accel and gyro register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads accel and gyro data from the desired accel and gyro register of the LSM9DS1 module.
void c9dof_generic_read_mag | ( | c9dof_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic mag read function.
ctx | Click object. |
reg | Mag register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads mag data from the desired mag register of the LSM9DS1 module.
void c9dof_generic_write_accel_gyro | ( | c9dof_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic accel and gyro write function.
ctx | Click object. |
reg | Accel and gyro register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes accel and gyro write data to the desired accel and gyro register of the LSM9DS1 module.
void c9dof_generic_write_mag | ( | c9dof_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic mag write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes mag data to the desired mag register of the LSM9DS1 module.
uint8_t c9dof_get_interrupt | ( | c9dof_t * | ctx | ) |
Get state of the Magnetic sensor interrupt function.
ctx | Click object. |
0 : Not active.
1 : Active.
@description This function gets states of the Magnetic sensor interrupt of the LSM9DS1 module.
C9DOF_RETVAL c9dof_init | ( | c9dof_t * | ctx, |
c9dof_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void c9dof_read_accel | ( | c9dof_t * | ctx, |
c9dof_accel_data_t * | accel_data ) |
Get accelerometer data function.
ctx | Click object. |
accel_data | Pointer to structure where Accel data be stored. |
@description This function reads Accel data ( X, Y and Z axis ) from the desired Accel registers of the LSM9DS1 module.
void c9dof_read_gyro | ( | c9dof_t * | ctx, |
c9dof_gyro_data_t * | gyro_data ) |
Get gyroscope data function.
ctx | Click object. |
accel_data | Pointer to structure where Gyro data be stored. |
@description This function reads Gyro data ( X, Y and Z axis ) from the desired Gyro registers of the LSM9DS1 module.
void c9dof_read_mag | ( | c9dof_t * | ctx, |
c9dof_mag_data_t * | mag_data ) |
Get magnetometer data function.
ctx | Click object. |
accel_data | Pointer to structure where Mag data be stored. |
@description This function reads Mag data ( X, Y and Z axis ) from the desired Mag registers of the LSM9DS1 module.
void c9dof_set_power_mode | ( | c9dof_t * | ctx, |
uint8_t | pwr_mode ) |
Set accel and gyro power mode function.
ctx | Click object. |
pwr_mode | Power mode. 0 ( C9DOF_ACCEL_GYRO_POWER_MODE_OFF ) : Disable accel and gyro sensors. |
1 ( C9DOF_ACCEL_GYRO_POWER_MODE_ON ) : Enable accel and gyro sensors.
@description This function sets power mode of the 9Dof click.