lsm303agr 2.0.0.0
|
Functions | |
void | lsm303agr_cfg_setup (lsm303agr_cfg_t *cfg) |
Config Object Initialization function. | |
LSM303AGR_RETVAL | lsm303agr_init (lsm303agr_t *ctx, lsm303agr_cfg_t *cfg) |
Initialization function. | |
void | lsm303agr_default_cfg (lsm303agr_t *ctx) |
Click Default Configuration function. | |
void | lsm303agr_read_data (lsm303agr_t *ctx, uint8_t reg_addr, uint8_t *read_buf, uint8_t read_len) |
Generic read data function. | |
void | lsm303agr_write_data (lsm303agr_t *ctx, uint8_t reg_addr, uint8_t *write_buf, uint8_t write_len) |
Generic write data function. | |
float | lsm303agr_get_acc_axis_x (lsm303agr_t *ctx) |
Reading the raw X axis data and calculating the value : | |
float | lsm303agr_get_acc_axis_y (lsm303agr_t *ctx) |
Reading the raw Y axis data and calculating the value : | |
float | lsm303agr_get_acc_axis_z (lsm303agr_t *ctx) |
Reading the raw Z axis data and calculating the value : | |
float | lsm303agr_get_mag_axis_x (lsm303agr_t *ctx) |
Reading the raw X axis data and calculating the value : | |
float | lsm303agr_get_mag_axis_y (lsm303agr_t *ctx) |
Reading the raw Y axis data and calculating the value : | |
float | lsm303agr_get_mag_axis_z (lsm303agr_t *ctx) |
Reading the raw Z axis data and calculating the value : | |
void | lsm303agr_accelerometer_init (lsm303agr_t *ctx) |
Accelerometer init. | |
void | lsm303agr_magnetometer_init (lsm303agr_t *ctx) |
Magnetometer init. | |
void lsm303agr_accelerometer_init | ( | lsm303agr_t * | ctx | ) |
Accelerometer init.
ctx | Click object. |
Sets accelerometer operating mode to HR / Normal / Low-power mode (100 Hz) by writing 0x57h in 0x20h address
void lsm303agr_cfg_setup | ( | lsm303agr_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void lsm303agr_default_cfg | ( | lsm303agr_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for LSM303AGR click.
float lsm303agr_get_acc_axis_x | ( | lsm303agr_t * | ctx | ) |
Reading the raw X axis data and calculating the value :
ctx | Click object. |
float lsm303agr_get_acc_axis_y | ( | lsm303agr_t * | ctx | ) |
Reading the raw Y axis data and calculating the value :
ctx | Click object. |
float lsm303agr_get_acc_axis_z | ( | lsm303agr_t * | ctx | ) |
Reading the raw Z axis data and calculating the value :
ctx | Click object. |
float lsm303agr_get_mag_axis_x | ( | lsm303agr_t * | ctx | ) |
Reading the raw X axis data and calculating the value :
ctx | Click object. |
float lsm303agr_get_mag_axis_y | ( | lsm303agr_t * | ctx | ) |
Reading the raw Y axis data and calculating the value :
ctx | Click object. |
float lsm303agr_get_mag_axis_z | ( | lsm303agr_t * | ctx | ) |
Reading the raw Z axis data and calculating the value :
ctx | Click object. |
LSM303AGR_RETVAL lsm303agr_init | ( | lsm303agr_t * | ctx, |
lsm303agr_cfg_t * | cfg ) |
Initialization function.
lsm303agr | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void lsm303agr_magnetometer_init | ( | lsm303agr_t * | ctx | ) |
Magnetometer init.
ctx | Click object. |
Sets magnetoometer operating mode to Continuous mode / ODR 10 Hz by writing 0x00h in 0x60h address
void lsm303agr_read_data | ( | lsm303agr_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t * | read_buf, | ||
uint8_t | read_len ) |
Generic read data function.
lightranger | Click object. |
reg_addr | Register address. |
read_buf | Read buffer. |
read_len | Buffer length. |
@description This function reads 16-bit data from given address.
void lsm303agr_write_data | ( | lsm303agr_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t * | write_buf, | ||
uint8_t | write_len ) |
Generic write data function.
lsm303agr | Click object. |
reg_addr | Register address. |
write_buf | Read buffer. |
write_len | Buffer length. |
@description This function writes 16-bit command to given address.