shake2wake 2.0.0.0
|
This file contains API for Shake2Wake Click driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"
Go to the source code of this file.
Data Structures | |
struct | shake2wake_t |
Click ctx object definition. More... | |
struct | shake2wake_cfg_t |
Click configuration structure definition. More... | |
Functions | |
void | shake2wake_cfg_setup (shake2wake_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | shake2wake_init (shake2wake_t *ctx, shake2wake_cfg_t *cfg) |
Initialization function. | |
void | shake2wake_default_cfg (shake2wake_t *ctx) |
Click Default Configuration function. | |
uint8_t | shake2wake_read_byte (shake2wake_t *ctx, uint8_t rd_addr) |
Read one byte function. | |
void | shake2wake_write_byte (shake2wake_t *ctx, uint8_t wr_addr, uint8_t wr_val) |
Write one byte function. | |
void | shake2wake_write_two_byte (shake2wake_t *ctx, uint8_t reg_addr, uint16_t reg_val, uint8_t cnt) |
Write two bytes function. | |
void | shake2wake_read_multiple_byte (shake2wake_t *ctx, uint8_t reg_addr, uint8_t *prd_data, uint8_t cnt) |
Read miltiple bytes function. | |
void | shake2wake_fifo_read (shake2wake_t *ctx, uint8_t *p_buff, uint16_t cnt) |
FIFO read function. | |
uint8_t | shake2wake_read_dev_id_ad (shake2wake_t *ctx) |
Read DEVID_AD register function. | |
uint8_t | shake2wake_read_dev_id_mst (shake2wake_t *ctx) |
Read DEVID_MST register function. | |
uint8_t | shake2wake_read_part_id (shake2wake_t *ctx) |
Read part ID register function. | |
uint8_t | shake2wake_read_revision (shake2wake_t *ctx) |
Read silicon revision register function. | |
void | shake2wake_soft_reset (shake2wake_t *ctx) |
Software reset function. | |
uint8_t | shake2wake_read_status (shake2wake_t *ctx) |
Read status register function. | |
uint16_t | shake2wake_read_fifo_ent (shake2wake_t *ctx) |
Read fifo entries registers function. | |
void | shake2wake_get_lo_res_raw_data (shake2wake_t *ctx, int8_t *x_val, int8_t *y_val, int8_t *z_val) |
Get low resolution raw accelerometer data function. | |
void | shake2wake_get_raw_data (shake2wake_t *ctx, int16_t *x_val, int16_t *y_val, int16_t *z_val) |
Get raw accelerometer data function. | |
float | shake2wake_read_temperature (shake2wake_t *ctx) |
Read temperature function. | |
void | shake2wake_stand_by_mode (shake2wake_t *ctx) |
Stand by function. | |
void | shake2wake_measure_mode (shake2wake_t *ctx) |
Measure mode function. | |
void | shake2wake_auto_sleep_mode (shake2wake_t *ctx) |
Auto-sleep mode function. | |
void | shake2wake_wake_up (shake2wake_t *ctx) |
Wake up function. | |
void | shake2wake_set_low_noise_mode (shake2wake_t *ctx, uint8_t low_noise) |
Set Low Noise Mode function. | |
void | shake2wake_extern_clk (shake2wake_t *ctx) |
Enable external clock function. | |
void | shake2wake_set_range (shake2wake_t *ctx, uint8_t range) |
Select measurement range function. | |
void | shake2wake_sel_hal_bandw (shake2wake_t *ctx) |
Select halved bandwidth function. | |
void | shake2wake_set_ext_samp_trg (shake2wake_t *ctx) |
External sampling trigger function. | |
void | shake2wake_set_out_data_rate (shake2wake_t *ctx, uint8_t odr) |
Select output data rate function. | |
void | shake2wake_get_data_g (shake2wake_t *ctx, float *x_val, float *y_val, float *z_val) |
Get accelerometer data in "g" function. | |
void | shake2wake_set_fifo_above_half (shake2wake_t *ctx) |
Set FIFO Above Half function. | |
void | shake2wake_store_temp (shake2wake_t *ctx) |
Store Temperature Data to FIFO function. | |
void | shake2wake_set_fifo_mode (shake2wake_t *ctx, uint8_t mode) |
Enable FIFO and Mode Selection function. | |
uint8_t | shake2wake_read_filter_ctl (shake2wake_t *ctx) |
Read filter control register function. | |
uint8_t | shake2wake_read_power_ctl (shake2wake_t *ctx) |
Read power control register function. | |
uint8_t | shake2wake_read_fifo_ctl (shake2wake_t *ctx) |
Read FIFO control register function. | |
uint8_t | shake2wake_read_act_inact_ctl (shake2wake_t *ctx) |
Read activity/inactivity control register function. | |
void | shake2wake_set_act_enable (shake2wake_t *ctx) |
Set Activity Enable function. | |
void | shake2wake_set_ref_act (shake2wake_t *ctx) |
Set Referenced Activity function. | |
void | shake2wake_set_inact_enable (shake2wake_t *ctx) |
Set Inactivity Enable function. | |
void | shake2wake_set_ref_inact (shake2wake_t *ctx) |
Set Referenced Inactivity function. | |
void | shake2wake_sel_link_loop_mode (shake2wake_t *ctx, uint8_t mode) |
Select LINK/LOOP mode function. | |
void | shake2wake_set_act_trsh (shake2wake_t *ctx, uint16_t act_trsh) |
Set activity threshold function. | |
int16_t | shake2wake_read_act_trsh (shake2wake_t *ctx) |
Read activity threshold function. | |
void | shake2wake_set_act_time (shake2wake_t *ctx, uint8_t ac_time) |
Set activity time function. | |
uint8_t | shake2wake_read_act_time (shake2wake_t *ctx) |
Read activity time function. | |
void | shake2wake_set_inact_trsh (shake2wake_t *ctx, uint16_t inact_trsh) |
Set inactivity threshold function. | |
int16_t | shake2wake_read_inact_trsh (shake2wake_t *ctx) |
Read inactivity threshold function. | |
void | shake2wake_set_inact_time (shake2wake_t *ctx, uint16_t inac_time) |
Set inactivity time function. | |
uint16_t | shake2wake_read_inact_time (shake2wake_t *ctx) |
Read inactivity time function. | |
void | shake2wake_write_int_1_map (shake2wake_t *ctx, uint8_t wr_data) |
Write INT1 function map function. | |
uint8_t | shake2wake_read_int_1_map (shake2wake_t *ctx) |
Read INT1 function map function. | |
void | shake2wake_write_int_2_map (shake2wake_t *ctx, uint8_t wr_data) |
Write INT2 function map function. | |
uint8_t | shake2wake_read_int_2_map (shake2wake_t *ctx) |
Read INT2 function map function. | |
void | shake2wake_write_fifo_samp (shake2wake_t *ctx, uint8_t samp) |
Write FIFO samples function. | |
uint8_t | shake2wake_read_fifo_samp (shake2wake_t *ctx) |
Read FIFO samples function. | |
uint8_t | shake2wake_check_int (shake2wake_t *ctx) |
Get Interrupt state function. | |
This file contains API for Shake2Wake Click driver.