lsm6dsl 2.0.0.0
|
Functions | |
void | lsm6dsl_cfg_setup (lsm6dsl_cfg_t *cfg) |
Config Object Initialization function. | |
LSM6DSL_RETVAL | lsm6dsl_init (lsm6dsl_t *ctx, lsm6dsl_cfg_t *cfg) |
Initialization function. | |
void | lsm6dsl_default_cfg (lsm6dsl_t *ctx) |
Click Default Configuration function. | |
void | lsm6dsl_generic_transfer (lsm6dsl_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
uint8_t | lsm6dsl_read_byte (lsm6dsl_t *ctx, uint8_t reg_address) |
Read byte of data function. | |
void | lsm6dsl_write_byte (lsm6dsl_t *ctx, uint8_t reg_address, uint8_t write_data) |
Write byte of data function. | |
uint8_t | lsm6dsl_check_id (lsm6dsl_t *ctx) |
Function check LSM6DSL ID. | |
void | lsm6dsl_set_accel_config (lsm6dsl_t *ctx, uint8_t odr_sel, uint8_t full_scale) |
Set accel configuration function. | |
void | lsm6dsl_set_gyro_config (lsm6dsl_t *ctx, uint8_t odr_sel, uint8_t full_scale) |
Set gyro configuration function. | |
void | lsm6dsl_soft_reset (lsm6dsl_t *ctx) |
Set soft reset function. | |
void | lsm6dsl_sleep_gyro (lsm6dsl_t *ctx) |
Set gyroscope sleep mode function. | |
void | lsm6dsl_wake_up_gyro (lsm6dsl_t *ctx) |
Set gyroscope wake up mode function. | |
void | lsm6dsl_circular_burst_mode (lsm6dsl_t *ctx, uint8_t burst_mode) |
Set circular burst mode function. | |
void | lsm6dsl_set_self_test_mode (lsm6dsl_t *ctx, uint8_t gyro_self_test, uint8_t accel_self_test) |
Set self-test mode function. | |
uint8_t | lsm6dsl_get_status_reg (lsm6dsl_t *ctx) |
Get status function. | |
uint16_t | lsm6dsl_get_axis (lsm6dsl_t *ctx, uint8_t reg_address_low) |
Get axis value function. | |
float | lsm6dsl_get_temperature (lsm6dsl_t *ctx) |
void | lsm6dsl_get_accel (lsm6dsl_t *ctx, lsm6dsl_accel_t *accel, uint8_t full_scale) |
Get acceleration function. | |
void | lsm6dsl_get_gyro (lsm6dsl_t *ctx, lsm6dsl_gyro_t *gyro, uint8_t full_scale) |
Get gyroscope function. | |
void lsm6dsl_cfg_setup | ( | lsm6dsl_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t lsm6dsl_check_id | ( | lsm6dsl_t * | ctx | ) |
Function check LSM6DSL ID.
ctx | Click object. |
@description This function check ID by read WHO_AM_I register of LSM6DSL sensor.
void lsm6dsl_circular_burst_mode | ( | lsm6dsl_t * | ctx, |
uint8_t | burst_mode ) |
Set circular burst mode function.
ctx | Click object. |
burst_mode | Burst mode. |
@description This function set circular burst mode of LSM6DSL sensor.
void lsm6dsl_default_cfg | ( | lsm6dsl_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for LSM6DSL click.
void lsm6dsl_generic_transfer | ( | lsm6dsl_t * | ctx, |
uint8_t * | wr_buf, | ||
uint16_t | wr_len, | ||
uint8_t * | rd_buf, | ||
uint16_t | rd_len ) |
Generic transfer function.
ctx | Click object. |
wr_buf | Write data buffer |
wr_len | Number of byte in write data buffer |
rd_buf | Read data buffer |
rd_len | Number of byte in read data buffer |
@description Generic SPI transfer, for sending and receiving packages
void lsm6dsl_get_accel | ( | lsm6dsl_t * | ctx, |
lsm6dsl_accel_t * | accel, | ||
uint8_t | full_scale ) |
Get acceleration function.
ctx | Click object. |
accel | Pointer to accel structure ( accel_x, accel_y, accel_z ) . |
full_scale | Full scale value. |
@description This function get accel x-axis, y-axis and z-axis from the six:
uint16_t lsm6dsl_get_axis | ( | lsm6dsl_t * | ctx, |
uint8_t | reg_address_low ) |
Get axis value function.
ctx | Click object. |
reg_address_low | Register address of low data output. |
@description This function get axis value from the two target 8-bit register address of LSM6DSL sensor.
void lsm6dsl_get_gyro | ( | lsm6dsl_t * | ctx, |
lsm6dsl_gyro_t * | gyro, | ||
uint8_t | full_scale ) |
Get gyroscope function.
ctx | Click object. |
gyro | Pointer to gyro structure ( gyro_x, gyro_y, gyro_z ) . |
full_scale | Full scale value. |
@description This function get gyroscope X-axis, Y-axis and Z-axis from the six:
uint8_t lsm6dsl_get_status_reg | ( | lsm6dsl_t * | ctx | ) |
Get status function.
ctx | Click object. |
@description This function get status from the LSM6DSL_STATUS_REG register of LSM6DSL sensor.
float lsm6dsl_get_temperature | ( | lsm6dsl_t * | ctx | ) |
@briefGet temperature function.
ctx | Click object. |
@description This function read temperature data from the two:
LSM6DSL_RETVAL lsm6dsl_init | ( | lsm6dsl_t * | ctx, |
lsm6dsl_cfg_t * | cfg ) |
Initialization function.
lsm6dsl | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t lsm6dsl_read_byte | ( | lsm6dsl_t * | ctx, |
uint8_t | reg_address ) |
Read byte of data function.
ctx | Click object. |
reg_address | Register address. |
@description This function read the 8-bit of data from the target 8-bit register address of LSM6DSL sensor.
void lsm6dsl_set_accel_config | ( | lsm6dsl_t * | ctx, |
uint8_t | odr_sel, | ||
uint8_t | full_scale ) |
Set accel configuration function.
ctx | Click object. |
odr_sel | Output data rate. |
full_scale | Full-scale. |
@description This function set accel configuration to the target LSM6DSL_CTRL1_XL register of LSM6DSL sensor.
void lsm6dsl_set_gyro_config | ( | lsm6dsl_t * | ctx, |
uint8_t | odr_sel, | ||
uint8_t | full_scale ) |
Set gyro configuration function.
ctx | Click object. |
odr_sel | Output data rate. |
full_scale | Full-scale. |
@description This function set gyro configuration to the target LSM6DSL_CTRL1_XL register of LSM6DSL sensor.
void lsm6dsl_set_self_test_mode | ( | lsm6dsl_t * | ctx, |
uint8_t | gyro_self_test, | ||
uint8_t | accel_self_test ) |
Set self-test mode function.
ctx | Click object. |
gyro_self_test | Gyroscope self-test mode data. |
accel_self_test | Acceleration self-test mode data. |
@description This function set gyro and accel self-test mode by set data to the LSM6DSL_CTRL5_C register of LSM6DSL sensor.
void lsm6dsl_sleep_gyro | ( | lsm6dsl_t * | ctx | ) |
Set gyroscope sleep mode function.
ctx | Click object. |
@description This function set gyroscope sleep mode by set high sleep bit to the target LSM6DSL_CTRL3_C register of LSM6DSL sensor.
void lsm6dsl_soft_reset | ( | lsm6dsl_t * | ctx | ) |
Set soft reset function.
ctx | Click object. |
@description This function set soft reset by set soft reset bit high to the target LSM6DSL_CTRL3_C register of LSM6DSL sensor.
void lsm6dsl_wake_up_gyro | ( | lsm6dsl_t * | ctx | ) |
Set gyroscope wake up mode function.
ctx | Click object. |
@description This function set gyroscope wake up mode by set low sleep bit to the target LSM6DSL_CTRL3_C register of LSM6DSL sensor.
void lsm6dsl_write_byte | ( | lsm6dsl_t * | ctx, |
uint8_t | reg_address, | ||
uint8_t | write_data ) |
Write byte of data function.
ctx | Click object. |
reg_address | Register address. |
write_data | Byte of data to write. |
@description This function write the 8-bit of data to the target 8-bit register address of LSM6DSL sensor.