|
enum | adxl313_type {
ID_ADXL312 = 0,
ID_ADXL313 = 1,
ID_ADXL314 = 2
} |
| Enum for device type. More...
|
|
enum | adxl313_comm_type {
ADXL313_SPI_COMM = 0,
ADXL313_I2C_COMM = 1
} |
| Enum for communication type. More...
|
|
enum | adxl313_op_mode {
ADXL313_STDBY = 0,
ADXL313_MEAS = 1
} |
| Enum for operating mode. More...
|
|
enum | adxl313_lp_mode {
ADXL313_LP_MODE_NONE = 0,
ADXL313_LP_MODE_ON = 1,
ADXL313_LP_MODE_AUTOSLEEP = 2
} |
| Enum for low power operating mode. More...
|
|
enum | adxl313_wake_up_f {
ADXL313_WU_8_HZ = 0,
ADXL313_WU_4_HZ = 1,
ADXL313_WU_2_HZ = 2,
ADXL313_WU_1_HZ = 3
} |
| Enum for frequency of wake-up events during sleep. More...
|
|
enum | adxl313_range {
ADXL313_0_5G_RANGE = 0,
ADXL313_1G_RANGE = 1,
ADXL313_2G_RANGE = 2,
ADXL313_4G_RANGE = 3,
ADXL313_1_5G_RANGE = 4,
ADXL313_3G_RANGE = 5,
ADXL313_6G_RANGE = 6,
ADXL313_12G_RANGE = 7,
ADXL313_200G_RANGE = 8
} |
| Enum for selecting range. More...
|
|
enum | adxl313_resolution {
ADXL313_10_BIT_RES = 0,
ADXL313_11_BIT_RES = 1,
ADXL313_12_BIT_RES = 2,
ADXL313_13_BIT_RES = 3
} |
| Enum for specifying resolution. More...
|
|
enum | adxl313_odr {
ADXL313_ODR_6_25HZ = 0,
ADXL313_ODR_12_5HZ = 1,
ADXL313_ODR_25HZ = 2,
ADXL313_ODR_50HZ = 3,
ADXL313_ODR_100HZ = 4,
ADXL313_ODR_200HZ = 5,
ADXL313_ODR_400HZ = 6,
ADXL313_ODR_800HZ = 7,
ADXL313_ODR_1600HZ = 8,
ADXL313_ODR_3200HZ = 9
} |
| Enum for selecting output data rate. More...
|
|
enum | adxl313_axis {
ADXL313_X_AXIS = 0,
ADXL313_Y_AXIS = 1,
ADXL313_Z_AXIS = 2
} |
| Enum for accelerometer axis. More...
|
|
enum | adxl313_fifo_mode {
ADXL313_BYPAS_MODE = 0,
ADXL313_FIFO_MODE = 1,
ADXL313_STREAM_MODE = 2,
ADXL313_TRIGGERED_MODE = 3
} |
| Enum for selecting FIFO operating mode. More...
|
|
enum | adxl313_int_pol {
ADXL313_INT_ACTIVE_HIGH = 0,
ADXL313_INT_ACTIVE_LOW = 1
} |
| Enum for selecting interrupt polarity. More...
|
|
enum | bit_action {
DISABLE_E = 0,
ENABLE_E = 1
} |
| Enum for selecting Set/Reset bit action. More...
|
|
|
int | adxl313_init (struct adxl313_dev **device, struct adxl313_init_param init_param) |
|
int | adxl313_remove (struct adxl313_dev *dev) |
|
int | adxl313_software_reset (struct adxl313_dev *dev) |
|
int | adxl313_set_op_mode (struct adxl313_dev *dev, enum adxl313_op_mode op_mode) |
|
int | adxl313_get_op_mode (struct adxl313_dev *dev, enum adxl313_op_mode *op_mode) |
|
int | adxl313_set_offset (struct adxl313_dev *dev, int32_t offset_ug, enum adxl313_axis axis) |
|
int | adxl313_get_offset (struct adxl313_dev *dev, int32_t *offset_ug, enum adxl313_axis axis) |
|
int | adxl313_set_raw_offset (struct adxl313_dev *dev, int32_t offset_raw, enum adxl313_axis axis) |
|
int | adxl313_get_raw_offset (struct adxl313_dev *dev, int32_t *offset_raw, enum adxl313_axis axis) |
|
int | adxl313_get_raw_xyz (struct adxl313_dev *dev, int16_t *x_raw, int16_t *y_raw, int16_t *z_raw) |
|
int | adxl313_get_xyz (struct adxl313_dev *dev, struct adxl313_frac_repr *x_m_s2, struct adxl313_frac_repr *y_m_s2, struct adxl313_frac_repr *z_m_s2) |
|
int | adxl313_get_no_of_fifo_entries (struct adxl313_dev *dev, uint8_t *entries_no) |
|
int | adxl313_set_fifo_samples (struct adxl313_dev *dev, uint8_t samples_no) |
|
int | adxl313_set_fifo_mode (struct adxl313_dev *dev, enum adxl313_fifo_mode mode) |
|
int | adxl313_get_raw_fifo_data (struct adxl313_dev *dev, uint8_t *entries, int16_t *x_raw, int16_t *y_raw, int16_t *z_raw) |
|
int | adxl313_get_fifo_data (struct adxl313_dev *dev, uint8_t *entries, struct adxl313_frac_repr *x, struct adxl313_frac_repr *y, struct adxl313_frac_repr *z) |
|
int | adxl313_conf_act_thr (struct adxl313_dev *dev, uint32_t act_thr_ug) |
|
int | adxl313_get_act_thr (struct adxl313_dev *dev, uint32_t *act_thr_ug) |
|
int | adxl313_conf_inact_thr (struct adxl313_dev *dev, uint32_t inact_thr_ug) |
|
int | adxl313_get_inact_thr (struct adxl313_dev *dev, uint32_t *inact_thr_ug) |
|
int | adxl313_conf_time_inact (struct adxl313_dev *dev, uint8_t time_inact_s) |
|
int | adxl313_get_time_inact (struct adxl313_dev *dev, uint8_t *time_inact_s) |
|
int | adxl313_conf_act_inact_ctl (struct adxl313_dev *dev, union adxl313_act_inact_ctl_flags config) |
|
int | adxl313_get_conf_act_inact_ctl (struct adxl313_dev *dev, union adxl313_act_inact_ctl_flags *config) |
|
int | adxl313_set_activity_detection (struct adxl313_dev *dev, uint8_t act_axes, uint8_t act_ac_dc, uint32_t act_thresh_ug, uint8_t int_pin) |
| Enable the activity detection. More...
|
|
int | adxl313_set_inactivity_detection (struct adxl313_dev *dev, uint8_t inact_axes, uint8_t inact_ac_dc, uint32_t inact_thresh_ug, uint8_t inact_time, uint8_t int_pin) |
| Enables the inactivity detection. More...
|
|
int | adxl313_set_odr (struct adxl313_dev *dev, enum adxl313_odr odr) |
|
int | adxl313_get_odr (struct adxl313_dev *dev, enum adxl313_odr *odr) |
|
int | adxl313_disable_i2c (struct adxl313_dev *dev) |
|
int | adxl313_enable_i2c (struct adxl313_dev *dev) |
|
int | adxl313_set_low_power_mode (struct adxl313_dev *dev, enum bit_action enable) |
|
int | adxl313_set_autosleep_mode (struct adxl313_dev *dev, enum bit_action enable, uint8_t inact_thr, uint8_t time_inact_s) |
|
int | adxl313_link_mode_enable (struct adxl313_dev *dev) |
|
int | adxl313_link_mode_disable (struct adxl313_dev *dev) |
|
int | adxl313_sleep (struct adxl313_dev *dev, enum adxl313_wake_up_f wake_up_f_hz) |
|
int | adxl313_exit_sleep (struct adxl313_dev *dev) |
|
int | adxl313_conf_int_enable (struct adxl313_dev *dev, union adxl313_int_en_reg_flags en_ctl) |
|
int | adxl313_activity_int_enable (struct adxl313_dev *dev) |
|
int | adxl313_activity_int_disable (struct adxl313_dev *dev) |
|
int | adxl313_inactivity_int_enable (struct adxl313_dev *dev) |
|
int | adxl313_inactivity_int_disable (struct adxl313_dev *dev) |
|
int | adxl313_conf_int_map (struct adxl313_dev *dev, union adxl313_int_map_reg_flags int_map) |
|
int | adxl313_data_ready_int_map (struct adxl313_dev *dev, uint8_t int_pin) |
|
int | adxl313_activity_int_map (struct adxl313_dev *dev, uint8_t int_pin) |
|
int | adxl313_inactivity_int_map (struct adxl313_dev *dev, uint8_t int_pin) |
|
int | adxl313_watermark_int_map (struct adxl313_dev *dev, uint8_t int_pin) |
|
int | adxl313_overrun_int_map (struct adxl313_dev *dev, uint8_t int_pin) |
|
int | adxl313_get_int_source_reg (struct adxl313_dev *dev, union adxl313_int_src_reg_flags *int_status_flags) |
|
int | adxl313_set_int_pol (struct adxl313_dev *dev, enum adxl313_int_pol int_pol) |
|
int | adxl313_enable_full_res (struct adxl313_dev *dev) |
|
int | adxl313_disable_full_res (struct adxl313_dev *dev) |
|
int | adxl313_get_full_res_setting (struct adxl313_dev *dev, uint8_t *full_res) |
|
int | adxl313_set_range (struct adxl313_dev *dev, enum adxl313_range range) |
|
int | adxl313_get_range (struct adxl313_dev *dev, enum adxl313_range *range) |
|
int | adxl313_self_test (struct adxl313_dev *dev) |
|
Header file of ADXL313 Driver.
- Author
- GMois (georg.nosp@m.e.mo.nosp@m.is@an.nosp@m.alog.nosp@m..com)
Copyright 2022(c) Analog Devices, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.