accel10 2.0.0.0
|
Functions | |
void | accel10_cfg_setup (accel10_cfg_t *cfg) |
Config Object Initialization function. | |
ACCEL10_RETVAL | accel10_init (accel10_t *ctx, accel10_cfg_t *cfg) |
Initialization function. | |
void | accel10_default_cfg (accel10_t *ctx) |
Click Default Configuration function. | |
void | accel10_generic_write (accel10_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | accel10_generic_read (accel10_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
ACCEL10_RETVAL | accel10_check_id (accel10_t *ctx) |
Check ID function. | |
uint8_t | accel10_check_data_ready (accel10_t *ctx) |
Check data ready function. | |
void | accel10_soft_reset (accel10_t *ctx) |
Soft reset function. | |
void | accel10_get_data (accel10_t *ctx, accel10_data_t *p_accel_data) |
Read Accel data function. | |
int8_t | accel10_read_temperature (accel10_t *ctx) |
Read temperature function. | |
uint8_t | accel10_check_it1 (accel10_t *ctx) |
Get interrupt 1 ststus function. | |
uint8_t | accel10_check_it2 (accel10_t *ctx) |
Get interrupt 2 ststus function. | |
void accel10_cfg_setup | ( | accel10_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t accel10_check_data_ready | ( | accel10_t * | ctx | ) |
Check data ready function.
ctx | Click object. |
@description This function check accel data ready of LIS2DW12 3-axis MEMS acceleromete on Accel 10 Click board.
ACCEL10_RETVAL accel10_check_id | ( | accel10_t * | ctx | ) |
Check ID function.
ctx | Click object. |
@description This function check device ID by read ID value from the sensor ACCEL10_WHO_AM_I register address of LIS2DW12 3-axis MEMS acceleromete on Accel 10 Click board.
uint8_t accel10_check_it1 | ( | accel10_t * | ctx | ) |
Get interrupt 1 ststus function.
ctx | Click object. |
@description This function check interrupt 1 state by return state of the PWM pin of Accel 10 Click board.
uint8_t accel10_check_it2 | ( | accel10_t * | ctx | ) |
Get interrupt 2 ststus function.
ctx | Click object. |
@description This function check interrupt 1 state by return state of the INT pin of Accel 10 Click board.
void accel10_default_cfg | ( | accel10_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Accel 10 click.
- Set Low-power mode selection : Low-Power Mode 2 (14-bit resolution); - Set Mode selection : Low-Power Mode (12/14-bit resolution); - Set Data rate configuration : Low-Power mode 100 Hz;
reg : ACCEL10_REG_CTRL1
tx_data : ACCEL10_LP_MODE_2 | ACCEL10_MODE_LOW_POWER | ACCEL10_ODR_100Hz
- Set Low-noise configuration : Disable; - Set Filtered data type selection : Low-pass filter path selected; - Set Full-scale selection : ±2 g; - Set Digital filtering cutoff selection : ODR/2;
reg : ACCEL10_REG_CTRL6
tx_data : ACCEL10_LOW_NOISE_DISABLE | ACCEL10_FSD_LOW_PASS | ACCEL10_FS_2G | ACCEL10_BW_FILT_ODR2
void accel10_generic_read | ( | accel10_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read 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 reads data from the desired register.
void accel10_generic_write | ( | accel10_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function writes data to the desired register.
void accel10_get_data | ( | accel10_t * | ctx, |
accel10_data_t * | p_accel_data ) |
Read Accel data function.
ctx | Click object. |
p_accel_data | Pointer to memory location where Accel data be stored. |
@description This function read Accel data X-axis, Y-axis data and Z-axis data from the 6 targeted starts from ACCEL10_OUT_X_L register address of LIS2DW12 3-axis MEMS acceleromete on Accel 10 Click board.
ACCEL10_RETVAL accel10_init | ( | accel10_t * | ctx, |
accel10_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.
int8_t accel10_read_temperature | ( | accel10_t * | ctx | ) |
Read temperature function.
ctx | Click object. |
@description This function read temperature data in degrees Celsius of LIS2DW12 3-axis MEMS acceleromete on Accel 10 Click board.
void accel10_soft_reset | ( | accel10_t * | ctx | ) |
Soft reset function.
ctx | Click object. |
@description This function soft reset acts as reset for all control registers of LIS2DW12 3-axis MEMS acceleromete on Accel 10 Click board.