earthquake 2.0.0.0
|
Functions | |
void | earthquake_cfg_setup (earthquake_cfg_t *cfg) |
Config Object Initialization function. | |
EARTHQUAKE_RETVAL | earthquake_init (earthquake_t *ctx, earthquake_cfg_t *cfg) |
Initialization function. | |
void | earthquake_generic_write (earthquake_t *ctx, uint16_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | earthquake_generic_read (earthquake_t *ctx, uint16_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | earthquake_proc_notify (earthquake_t *ctx) |
Shutoff output function. | |
uint8_t | earthquake_shutoff_output (earthquake_t *ctx) |
Shutoff output function. | |
uint8_t | earthquake_read_status (earthquake_t *ctx) |
Read status function. | |
uint16_t | earthquake_read_si (earthquake_t *ctx) |
Read SI function. | |
void | earthquake_clear_memory (earthquake_t *ctx) |
Clear Memory function. | |
void earthquake_cfg_setup | ( | earthquake_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void earthquake_clear_memory | ( | earthquake_t * | ctx | ) |
Clear Memory function.
ctx | Click object. |
@description This function clears earthquake data, self-diagnostic data, latest offset data and initial installation data.
void earthquake_generic_read | ( | earthquake_t * | ctx, |
uint16_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf. |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void earthquake_generic_write | ( | earthquake_t * | ctx, |
uint16_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic 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 data to the desired register.
EARTHQUAKE_RETVAL earthquake_init | ( | earthquake_t * | ctx, |
earthquake_cfg_t * | cfg ) |
Initialization function.
earthquake | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t earthquake_proc_notify | ( | earthquake_t * | ctx | ) |
Shutoff output function.
ctx | Click object. |
@description This function reads state od INT2 pin. An open-drain output, goes active during earthquake calculations, offset acquisition, and self-diagnostic processing.
uint16_t earthquake_read_si | ( | earthquake_t * | ctx | ) |
Read SI function.
ctx | Click object. |
@description This function reads and combines data from SI_H and SI_L registers.
uint8_t earthquake_read_status | ( | earthquake_t * | ctx | ) |
Read status function.
ctx | Click object. |
@description This function reads data from a STATE register.
uint8_t earthquake_shutoff_output | ( | earthquake_t * | ctx | ) |
Shutoff output function.
ctx | Click object. |
@description This function reads state od INT1 pin. An open-drain output, goes active (ON) when the shutoff judgment condition and collapse detection condition are met.