no-OS
adxl372.h
Go to the documentation of this file.
1 /***************************************************************************/
40 #ifndef ADXL372_H_
41 #define ADXL372_H_
42 
43 /******************************************************************************/
44 /***************************** Include Files **********************************/
45 /******************************************************************************/
46 #include <stdint.h>
47 #include "no_os_util.h"
48 #include "no_os_delay.h"
49 #include "no_os_gpio.h"
50 #include "no_os_i2c.h"
51 #include "no_os_spi.h"
52 
53 /******************************************************************************/
54 /********************** Macros and Constants Definitions **********************/
55 /******************************************************************************/
56 /*
57  * ADXL372 registers definition
58  */
59 #define ADXL372_DEVID 0x00u /* Analog Devices, Inc., accelerometer ID */
60 #define ADXL372_DEVID_MST 0x01u /* Analog Devices MEMS device ID */
61 #define ADXL372_PARTID 0x02u /* Device ID */
62 #define ADXL372_REVID 0x03u /* product revision ID*/
63 #define ADXL372_STATUS_1 0x04u /* Status register 1 */
64 #define ADXL372_STATUS_2 0x05u /* Status register 2 */
65 #define ADXL372_FIFO_ENTRIES_2 0x06u /* Valid data samples in the FIFO */
66 #define ADXL372_FIFO_ENTRIES_1 0x07u /* Valid data samples in the FIFO */
67 #define ADXL372_X_DATA_H 0x08u /* X-axis acceleration data [11:4] */
68 #define ADXL372_X_DATA_L 0x09u /* X-axis acceleration data [3:0] */
69 #define ADXL372_Y_DATA_H 0x0Au /* Y-axis acceleration data [11:4] */
70 #define ADXL372_Y_DATA_L 0x0Bu /* Y-axis acceleration data [3:0] */
71 #define ADXL372_Z_DATA_H 0x0Cu /* Z-axis acceleration data [11:4] */
72 #define ADXL372_Z_DATA_L 0x0Du /* Z-axis acceleration data [3:0] */
73 #define ADXL372_X_MAXPEAK_H 0x15u /* X-axis MaxPeak acceleration data [15:8] */
74 #define ADXL372_X_MAXPEAK_L 0x16u /* X-axis MaxPeak acceleration data [7:0] */
75 #define ADXL372_Y_MAXPEAK_H 0x17u /* Y-axis MaxPeak acceleration data [15:8] */
76 #define ADXL372_Y_MAXPEAK_L 0x18u /* Y-axis MaxPeak acceleration data [7:0] */
77 #define ADXL372_Z_MAXPEAK_H 0x19u /* Z-axis MaxPeak acceleration data [15:8] */
78 #define ADXL372_Z_MAXPEAK_L 0x1Au /* Z-axis MaxPeak acceleration data [7:0] */
79 #define ADXL372_OFFSET_X 0x20u /* X axis offset */
80 #define ADXL372_OFFSET_Y 0x21u /* Y axis offset */
81 #define ADXL372_OFFSET_Z 0x22u /* Z axis offset */
82 #define ADXL372_X_THRESH_ACT_H 0x23u /* X axis Activity Threshold [15:8] */
83 #define ADXL372_X_THRESH_ACT_L 0x24u /* X axis Activity Threshold [7:0] */
84 #define ADXL372_Y_THRESH_ACT_H 0x25u /* Y axis Activity Threshold [15:8] */
85 #define ADXL372_Y_THRESH_ACT_L 0x26u /* Y axis Activity Threshold [7:0] */
86 #define ADXL372_Z_THRESH_ACT_H 0x27u /* Z axis Activity Threshold [15:8] */
87 #define ADXL372_Z_THRESH_ACT_L 0x28u /* Z axis Activity Threshold [7:0] */
88 #define ADXL372_TIME_ACT 0x29u /* Activity Time */
89 #define ADXL372_X_THRESH_INACT_H 0x2Au /* X axis Inactivity Threshold [15:8] */
90 #define ADXL372_X_THRESH_INACT_L 0x2Bu /* X axis Inactivity Threshold [7:0] */
91 #define ADXL372_Y_THRESH_INACT_H 0x2Cu /* Y axis Inactivity Threshold [15:8] */
92 #define ADXL372_Y_THRESH_INACT_L 0x2Du /* Y axis Inactivity Threshold [7:0] */
93 #define ADXL372_Z_THRESH_INACT_H 0x2Eu /* Z axis Inactivity Threshold [15:8] */
94 #define ADXL372_Z_THRESH_INACT_L 0x2Fu /* Z axis Inactivity Threshold [7:0] */
95 #define ADXL372_TIME_INACT_H 0x30u /* Inactivity Time [15:8] */
96 #define ADXL372_TIME_INACT_L 0x31u /* Inactivity Time [7:0] */
97 #define ADXL372_X_THRESH_ACT2_H 0x32u /* X axis Activity2 Threshold [15:8] */
98 #define ADXL372_X_THRESH_ACT2_L 0x33u /* X axis Activity2 Threshold [7:0] */
99 #define ADXL372_Y_THRESH_ACT2_H 0x34u /* Y axis Activity2 Threshold [15:8] */
100 #define ADXL372_Y_THRESH_ACT2_L 0x35u /* Y axis Activity2 Threshold [7:0] */
101 #define ADXL372_Z_THRESH_ACT2_H 0x36u /* Z axis Activity2 Threshold [15:8] */
102 #define ADXL372_Z_THRESH_ACT2_L 0x37u /* Z axis Activity2 Threshold [7:0] */
103 #define ADXL372_HPF 0x38u /* High Pass Filter */
104 #define ADXL372_FIFO_SAMPLES 0x39u /* FIFO Samples */
105 #define ADXL372_FIFO_CTL 0x3Au /* FIFO Control */
106 #define ADXL372_INT1_MAP 0x3Bu /* Interrupt 1 mapping control */
107 #define ADXL372_INT2_MAP 0x3Cu /* Interrupt 2 mapping control */
108 #define ADXL372_TIMING 0x3Du /* Timing */
109 #define ADXL372_MEASURE 0x3Eu /* Measure */
110 #define ADXL372_POWER_CTL 0x3Fu /* Power control */
111 #define ADXL372_SELF_TEST 0x40u /* Self Test */
112 #define ADXL372_RESET 0x41u /* Reset */
113 #define ADXL372_FIFO_DATA 0x42u /* FIFO Data */
114 
115 #define ADXL372_DEVID_VAL 0xADu /* Analog Devices, Inc., accelerometer ID */
116 #define ADXL372_MST_DEVID_VAL 0x1Du /* Analog Devices MEMS device ID */
117 #define ADXL372_PARTID_VAL 0xFAu /* Device ID */
118 #define ADXL372_REVID_VAL 0x02u /* product revision ID*/
119 #define ADXL372_RESET_CODE 0x52u /* Writing code 0x52 resets the device */
120 
121 #define ADXL372_REG_READ(x) (((x & 0xFF) << 1) | 0x01)
122 #define ADXL372_REG_WRITE(x) ((x & 0xFF) << 1)
123 
124 /* ADXL372_POWER_CTL */
125 #define ADXL372_POWER_CTL_INSTANT_ON_TH_MSK NO_OS_BIT(5)
126 #define ADXL372_POWER_CTL_INSTANT_ON_TH_MODE(x) (((x) & 0x1) << 5)
127 #define ADXL372_POWER_CTL_FIL_SETTLE_MSK NO_OS_BIT(4)
128 #define ADXL372_POWER_CTL_FIL_SETTLE_MODE(x) (((x) & 0x1) << 4)
129 #define ADXL372_POWER_CTL_LPF_DIS_MSK NO_OS_BIT(3)
130 #define ADXL372_POWER_CTL_LPF_DIS_MODE(x) (((x) & 0x1) << 3)
131 #define ADXL372_POWER_CTL_HPF_DIS_MSK NO_OS_BIT(2)
132 #define ADXL372_POWER_CTL_HPF_DIS_MODE(x) (((x) & 0x1) << 2)
133 #define ADXL372_POWER_CTL_MODE_MSK NO_OS_GENMASK(1, 0)
134 #define ADXL372_POWER_CTL_MODE(x) (((x) & 0x3) << 0)
135 
136 /* ADXL372_MEASURE */
137 #define ADXL372_MEASURE_AUTOSLEEP_MSK NO_OS_BIT(6)
138 #define ADXL372_MEASURE_AUTOSLEEP_MODE(x) (((x) & 0x1) << 6)
139 #define ADXL372_MEASURE_LINKLOOP_MSK NO_OS_GENMASK(5, 4)
140 #define ADXL372_MEASURE_LINKLOOP_MODE(x) (((x) & 0x3) << 4)
141 #define ADXL372_MEASURE_LOW_NOISE_MSK NO_OS_BIT(3)
142 #define ADXL372_MEASURE_LOW_NOISE_MODE(x) (((x) & 0x1) << 3)
143 #define ADXL372_MEASURE_BANDWIDTH_MSK NO_OS_GENMASK(2, 0)
144 #define ADXL372_MEASURE_BANDWIDTH_MODE(x) (((x) & 0x7) << 0)
145 
146 /* ADXL372_TIMING */
147 #define ADXL372_TIMING_ODR_MSK NO_OS_GENMASK(7, 5)
148 #define ADXL372_TIMING_ODR_MODE(x) (((x) & 0x7) << 5)
149 #define ADXL372_TIMING_WAKE_UP_RATE_MSK NO_OS_GENMASK(4, 2)
150 #define ADXL372_TIMING_WAKE_UP_RATE_MODE(x) (((x) & 0x7) << 2)
151 #define ADXL372_TIMING_EXT_CLK_MSK NO_OS_BIT(1)
152 #define ADXL372_TIMING_EXT_CLK_MODE(x) (((x) & 0x1) << 1)
153 #define ADXL372_TIMING_EXT_SYNC_MSK NO_OS_BIT(0)
154 #define ADXL372_TIMING_EXT_SYNC_MODE(x) (((x) & 0x1) << 0)
155 
156 /* ADXL372_FIFO_CTL */
157 #define ADXL372_FIFO_CTL_FORMAT_MSK NO_OS_GENMASK(5, 3)
158 #define ADXL372_FIFO_CTL_FORMAT_MODE(x) (((x) & 0x7) << 3)
159 #define ADXL372_FIFO_CTL_MODE_MSK NO_OS_GENMASK(2, 1)
160 #define ADXL372_FIFO_CTL_MODE_MODE(x) (((x) & 0x3) << 1)
161 #define ADXL372_FIFO_CTL_SAMPLES_MSK NO_OS_BIT(0)
162 #define ADXL372_FIFO_CTL_SAMPLES_MODE(x) (((x) > 0xFF) ? 1 : 0)
163 
164 /* ADXL372_STATUS_1 */
165 #define ADXL372_STATUS_1_DATA_RDY(x) (((x) >> 0) & 0x1)
166 #define ADXL372_STATUS_1_FIFO_RDY(x) (((x) >> 1) & 0x1)
167 #define ADXL372_STATUS_1_FIFO_FULL(x) (((x) >> 2) & 0x1)
168 #define ADXL372_STATUS_1_FIFO_OVR(x) (((x) >> 3) & 0x1)
169 #define ADXL372_STATUS_1_USR_NVM_BUSY(x) (((x) >> 5) & 0x1)
170 #define ADXL372_STATUS_1_AWAKE(x) (((x) >> 6) & 0x1)
171 #define ADXL372_STATUS_1_ERR_USR_REGS(x) (((x) >> 7) & 0x1)
172 
173 /* ADXL372_INT1_MAP */
174 #define ADXL372_INT1_MAP_DATA_RDY_MSK NO_OS_BIT(0)
175 #define ADXL372_INT1_MAP_DATA_RDY_MODE(x) (((x) & 0x1) << 0)
176 #define ADXL372_INT1_MAP_FIFO_RDY_MSK NO_OS_BIT(1)
177 #define ADXL372_INT1_MAP_FIFO_RDY_MODE(x) (((x) & 0x1) << 1)
178 #define ADXL372_INT1_MAP_FIFO_FULL_MSK NO_OS_BIT(2)
179 #define ADXL372_INT1_MAP_FIFO_FULL_MODE(x) (((x) & 0x1) << 2)
180 #define ADXL372_INT1_MAP_FIFO_OVR_MSK NO_OS_BIT(3)
181 #define ADXL372_INT1_MAP_FIFO_OVR_MODE(x) (((x) & 0x1) << 3)
182 #define ADXL372_INT1_MAP_INACT_MSK NO_OS_BIT(4)
183 #define ADXL372_INT1_MAP_INACT_MODE(x) (((x) & 0x1) << 4)
184 #define ADXL372_INT1_MAP_ACT_MSK NO_OS_BIT(5)
185 #define ADXL372_INT1_MAP_ACT_MODE(x) (((x) & 0x1) << 5)
186 #define ADXL372_INT1_MAP_AWAKE_MSK NO_OS_BIT(6)
187 #define ADXL372_INT1_MAP_AWAKE_MODE(x) (((x) & 0x1) << 6)
188 #define ADXL372_INT1_MAP_LOW_MSK NO_OS_BIT(7)
189 #define ADXL372_INT1_MAP_LOW_MODE(x) (((x) & 0x1) << 7)
190 
191 /* ADXL372_INT2_MAP */
192 #define ADXL372_INT2_MAP_DATA_RDY_MSK NO_OS_BIT(0)
193 #define ADXL372_INT2_MAP_DATA_RDY_MODE(x) (((x) & 0x1) << 0)
194 #define ADXL372_INT2_MAP_FIFO_RDY_MSK NO_OS_BIT(1)
195 #define ADXL372_INT2_MAP_FIFO_RDY_MODE(x) (((x) & 0x1) << 1)
196 #define ADXL372_INT2_MAP_FIFO_FULL_MSK NO_OS_BIT(2)
197 #define ADXL372_INT2_MAP_FIFO_FULL_MODE(x) (((x) & 0x1) << 2)
198 #define ADXL372_INT2_MAP_FIFO_OVR_MSK NO_OS_BIT(3)
199 #define ADXL372_INT2_MAP_FIFO_OVR_MODE(x) (((x) & 0x1) << 3)
200 #define ADXL372_INT2_MAP_INACT_MSK NO_OS_BIT(4)
201 #define ADXL372_INT2_MAP_INACT_MODE(x) (((x) & 0x1) << 4)
202 #define ADXL372_INT2_MAP_ACT_MSK NO_OS_BIT(5)
203 #define ADXL372_INT2_MAP_ACT_MODE(x) (((x) & 0x1) << 5)
204 #define ADXL372_INT2_MAP_AWAKE_MSK NO_OS_BIT(6)
205 #define ADXL372_INT2_MAP_AWAKE_MODE(x) (((x) & 0x1) << 6)
206 #define ADXL372_INT2_MAP_LOW_MSK NO_OS_BIT(7)
207 #define ADXL372_INT2_MAP_LOW_MODE(x) (((x) & 0x1) << 7)
208 
209 static const int adxl372_th_reg_addr_h[3][3] = {
210  {
214  }, {
218  }, {
222  }
223 };
224 
225 static const int adxl372_th_reg_addr_l[3][3] = {
226  {
230  }, {
234  }, {
238  }
239 };
240 
245 };
246 
252 };
253 
260 };
261 
266 };
267 
274 };
275 
279 };
280 
290 };
291 
296 };
297 
301 };
302 
312 };
313 
319 };
320 
324 };
325 
329  uint16_t fifo_samples;
330 };
331 
333  uint16_t thresh;
335  bool enable;
336 };
337 
339  uint16_t x;
340  uint16_t y;
341  uint16_t z;
342 } ;
343 
345  bool data_rdy;
346  bool fifo_rdy;
347  bool fifo_full;
348  bool fifo_ovr;
350  bool activity;
351  bool awake;
353 };
354 
355 struct adxl372_dev;
356 
357 typedef int32_t (*adxl372_reg_read_func)(struct adxl372_dev *dev,
358  uint8_t reg_addr,
359  uint8_t *reg_data);
360 typedef int32_t (*adxl372_reg_write_func)(struct adxl372_dev *dev,
361  uint8_t reg_addr,
362  uint8_t reg_data);
363 typedef int32_t (*adxl372_reg_read_multi_func)(struct adxl372_dev *dev,
364  uint8_t reg_addr,
365  uint8_t *reg_data,
366  uint16_t count);
367 
368 struct adxl372_dev {
369  /* SPI */
371  /* I2C */
373  /* GPIO */
376  /* Device Settings */
387 };
388 
390  /* SPI */
392  /* I2C */
394  /* GPIO */
397  /* Device Settings */
406  uint8_t activity_time;
407  uint16_t inactivity_time;
414 };
415 
416 /******************************************************************************/
417 /************************ Functions Declarations ******************************/
418 /******************************************************************************/
419 int32_t adxl372_spi_reg_read(struct adxl372_dev *dev,
420  uint8_t reg_addr,
421  uint8_t *reg_data);
422 int32_t adxl372_spi_reg_read_multiple(struct adxl372_dev *dev,
423  uint8_t reg_addr,
424  uint8_t *reg_data,
425  uint16_t count);
426 int32_t adxl372_spi_reg_write(struct adxl372_dev *dev,
427  uint8_t reg_addr,
428  uint8_t reg_data);
429 int32_t adxl372_i2c_reg_read(struct adxl372_dev *dev,
430  uint8_t reg_addr,
431  uint8_t *reg_data);
432 int32_t adxl372_i2c_reg_write(struct adxl372_dev *dev,
433  uint8_t reg_addr,
434  uint8_t reg_data);
435 int32_t adxl372_i2c_reg_read_multiple(struct adxl372_dev *dev,
436  uint8_t reg_addr,
437  uint8_t *reg_data,
438  uint16_t count);
439 int32_t adxl372_write_mask(struct adxl372_dev *dev,
440  uint8_t reg_addr,
441  uint32_t mask,
442  uint8_t data);
443 int32_t adxl372_set_activity_threshold(struct adxl372_dev *dev,
444  enum adxl372_th_activity act,
445  uint16_t thresh,
446  bool referenced,
447  bool enable);
448 int32_t adxl372_set_op_mode(struct adxl372_dev *dev,
449  enum adxl372_op_mode op_mode);
450 int32_t adxl372_set_autosleep(struct adxl372_dev *dev, bool enable);
451 int32_t adxl372_set_bandwidth(struct adxl372_dev *dev,
452  enum adxl372_bandwidth bw);
453 int32_t adxl372_set_act_proc_mode(struct adxl372_dev *dev,
454  enum adxl372_act_proc_mode mode);
455 int32_t adxl372_set_odr(struct adxl372_dev *dev,
456  enum adxl372_odr odr);
457 int32_t adxl372_set_instant_on_th(struct adxl372_dev *dev,
458  enum adxl372_instant_on_th_mode mode);
459 int32_t adxl372_set_wakeup_rate(struct adxl372_dev *dev,
460  enum adxl372_wakeup_rate wur);
461 int32_t adxl372_set_activity_time(struct adxl372_dev *dev, uint8_t time);
462 int32_t adxl372_set_inactivity_time(struct adxl372_dev *dev, uint16_t time);
463 int32_t adxl372_interrupt_config(struct adxl372_dev *dev,
464  struct adxl372_irq_config int1,
465  struct adxl372_irq_config int2);
466 int32_t adxl372_set_filter_settle(struct adxl372_dev *dev,
467  enum adxl372_filter_settle mode);
468 int32_t adxl372_get_status(struct adxl372_dev *dev,
469  uint8_t *status1,
470  uint8_t *status2,
471  uint16_t *fifo_entries);
472 int32_t adxl372_reset(struct adxl372_dev *dev);
473 int32_t adxl372_configure_fifo(struct adxl372_dev *dev,
474  enum adxl372_fifo_mode mode,
475  enum adxl372_fifo_format format,
476  uint16_t fifo_samples);
477 int32_t adxl372_get_fifo_xyz_data(struct adxl372_dev *dev,
478  struct adxl372_xyz_accel_data *fifo_data,
479  uint16_t cnt);
480 int32_t adxl372_service_fifo_ev(struct adxl372_dev *dev,
481  struct adxl372_xyz_accel_data *fifo_data,
482  uint16_t *fifo_entries);
483 int32_t adxl372_get_highest_peak_data(struct adxl372_dev *dev,
484  struct adxl372_xyz_accel_data *max_peak);
485 int32_t adxl372_get_accel_data(struct adxl372_dev *dev,
486  struct adxl372_xyz_accel_data *accel_data);
487 int32_t adxl372_init(struct adxl372_dev **device,
489 
490 #endif // ADXL372_H_
adxl372_xyz_accel_data::z
uint16_t z
Definition: adxl372.h:341
ADXL372_Z_THRESH_INACT_H
#define ADXL372_Z_THRESH_INACT_H
Definition: adxl372.h:93
adxl372_init_param::activity2_th
struct adxl372_activity_threshold activity2_th
Definition: adxl372.h:404
adxl372_set_activity_time
int32_t adxl372_set_activity_time(struct adxl372_dev *dev, uint8_t time)
Definition: adxl372.c:344
adxl372_init_param::activity_time
uint8_t activity_time
Definition: adxl372.h:406
ADXL372_Y_THRESH_ACT2_L
#define ADXL372_Y_THRESH_ACT2_L
Definition: adxl372.h:100
adxl372_get_accel_data
int32_t adxl372_get_accel_data(struct adxl372_dev *dev, struct adxl372_xyz_accel_data *accel_data)
Definition: adxl372.c:664
adxl372_interrupt_config
int32_t adxl372_interrupt_config(struct adxl372_dev *dev, struct adxl372_irq_config int1, struct adxl372_irq_config int2)
Definition: adxl372.c:391
ADXL372_TIMING_ODR_MSK
#define ADXL372_TIMING_ODR_MSK
Definition: adxl372.h:147
ADXL372_FIFO_SAMPLES
#define ADXL372_FIFO_SAMPLES
Definition: adxl372.h:104
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:85
adxl372_init_param::comm_type
enum adxl372_comm_type comm_type
Definition: adxl372.h:413
ADXL372_Z_THRESH_ACT2_H
#define ADXL372_Z_THRESH_ACT2_H
Definition: adxl372.h:101
adxl372_init_param::spi_init
no_os_spi_init_param spi_init
Definition: adxl372.h:391
adxl372_spi_reg_write
int32_t adxl372_spi_reg_write(struct adxl372_dev *dev, uint8_t reg_addr, uint8_t reg_data)
Definition: adxl372_spi.c:79
adxl372_fifo_mode
adxl372_fifo_mode
Definition: adxl372.h:314
no_os_i2c_init
int32_t no_os_i2c_init(struct no_os_i2c_desc **desc, const struct no_os_i2c_init_param *param)
Initialize the I2C communication peripheral.
Definition: no_os_i2c.c:51
adxl372_init_param::gpio_int1
struct no_os_gpio_init_param gpio_int1
Definition: adxl372.h:395
ADXL372_Y_THRESH_ACT_L
#define ADXL372_Y_THRESH_ACT_L
Definition: adxl372.h:85
ADXL372_WUR_512ms
@ ADXL372_WUR_512ms
Definition: adxl372.h:285
adxl372_bandwidth
adxl372_bandwidth
Definition: adxl372.h:254
ADXL372_TIMING_WAKE_UP_RATE_MODE
#define ADXL372_TIMING_WAKE_UP_RATE_MODE(x)
Definition: adxl372.h:150
ADXL372_FILTER_SETTLE_16
@ ADXL372_FILTER_SETTLE_16
Definition: adxl372.h:300
adxl372_dev::spi_desc
no_os_spi_desc * spi_desc
Definition: adxl372.h:370
adxl372_spi_reg_read
int32_t adxl372_spi_reg_read(struct adxl372_dev *dev, uint8_t reg_addr, uint8_t *reg_data)
Definition: adxl372_spi.c:53
ADXL372_X_THRESH_INACT_L
#define ADXL372_X_THRESH_INACT_L
Definition: adxl372.h:90
ADXL372_FIFO_OLD_SAVED
@ ADXL372_FIFO_OLD_SAVED
Definition: adxl372.h:318
ADXL372_POWER_CTL_MODE
#define ADXL372_POWER_CTL_MODE(x)
Definition: adxl372.h:134
ADXL372_TIMING_WAKE_UP_RATE_MSK
#define ADXL372_TIMING_WAKE_UP_RATE_MSK
Definition: adxl372.h:149
ADXL372_INT1_MAP_INACT_MODE
#define ADXL372_INT1_MAP_INACT_MODE(x)
Definition: adxl372.h:183
ADXL372_X_AXIS
@ ADXL372_X_AXIS
Definition: adxl372.h:242
ADXL372_YZ_FIFO
@ ADXL372_YZ_FIFO
Definition: adxl372.h:310
no_os_spi.h
Header file of SPI Interface.
adxl372_init_param::gpio_int2
struct no_os_gpio_init_param gpio_int2
Definition: adxl372.h:396
adxl372_set_act_proc_mode
int32_t adxl372_set_act_proc_mode(struct adxl372_dev *dev, enum adxl372_act_proc_mode mode)
Definition: adxl372.c:237
ADXL372_FIFO_TRIGGERED
@ ADXL372_FIFO_TRIGGERED
Definition: adxl372.h:317
ADXL372_MEASURE_BANDWIDTH_MSK
#define ADXL372_MEASURE_BANDWIDTH_MSK
Definition: adxl372.h:143
ADXL372_FIFO_CTL_FORMAT_MODE
#define ADXL372_FIFO_CTL_FORMAT_MODE(x)
Definition: adxl372.h:158
adxl372_get_accel_data
int32_t adxl372_get_accel_data(struct adxl372_dev *dev, struct adxl372_xyz_accel_data *accel_data)
Definition: adxl372.c:664
adxl372_activity_threshold::referenced
bool referenced
Definition: adxl372.h:334
adxl372_dev::i2c_desc
no_os_i2c_desc * i2c_desc
Definition: adxl372.h:372
ADXL372_DEFAULT
@ ADXL372_DEFAULT
Definition: adxl372.h:263
ADXL372_Y_FIFO
@ ADXL372_Y_FIFO
Definition: adxl372.h:306
ADXL372_ACTIVITY2
@ ADXL372_ACTIVITY2
Definition: adxl372.h:294
ADXL372_BW_800HZ
@ ADXL372_BW_800HZ
Definition: adxl372.h:257
ADXL372_Z_THRESH_ACT_L
#define ADXL372_Z_THRESH_ACT_L
Definition: adxl372.h:87
ADXL372_WUR_52ms
@ ADXL372_WUR_52ms
Definition: adxl372.h:282
ADXL372_REVID
#define ADXL372_REVID
Definition: adxl372.h:62
ADXL372_INT1_MAP
#define ADXL372_INT1_MAP
Definition: adxl372.h:106
adxl372_init_param::bw
enum adxl372_bandwidth bw
Definition: adxl372.h:398
no_os_delay.h
Header file of Delay functions.
adxl372_th_activity
adxl372_th_activity
Definition: adxl372.h:292
ADXL372_FIFO_CTL_MODE_MODE
#define ADXL372_FIFO_CTL_MODE_MODE(x)
Definition: adxl372.h:160
ADXL372_MEASURE_LINKLOOP_MODE
#define ADXL372_MEASURE_LINKLOOP_MODE(x)
Definition: adxl372.h:140
ADXL372_X_THRESH_ACT2_H
#define ADXL372_X_THRESH_ACT2_H
Definition: adxl372.h:97
adxl372_init_param::inactivity_th
struct adxl372_activity_threshold inactivity_th
Definition: adxl372.h:405
ADXL372_Y_THRESH_ACT_H
#define ADXL372_Y_THRESH_ACT_H
Definition: adxl372.h:84
adxl372_set_op_mode
int32_t adxl372_set_op_mode(struct adxl372_dev *dev, enum adxl372_op_mode op_mode)
Definition: adxl372.c:175
ADXL372_FIFO_CTL_SAMPLES_MODE
#define ADXL372_FIFO_CTL_SAMPLES_MODE(x)
Definition: adxl372.h:162
ADXL372_TIMING
#define ADXL372_TIMING
Definition: adxl372.h:108
device
Definition: ad9361_util.h:75
adxl372.h
Header file for adxl372 Driver.
adxl372_dev::gpio_int1
struct no_os_gpio_desc * gpio_int1
Definition: adxl372.h:374
ADXL372_LINKED
@ ADXL372_LINKED
Definition: adxl372.h:264
adxl372_init_param::wur
enum adxl372_wakeup_rate wur
Definition: adxl372.h:400
ADXL372_INSTANT_ON
@ ADXL372_INSTANT_ON
Definition: adxl372.h:250
ADXL372_WUR_2048ms
@ ADXL372_WUR_2048ms
Definition: adxl372.h:286
ADXL372_X_MAXPEAK_H
#define ADXL372_X_MAXPEAK_H
Definition: adxl372.h:73
ADXL372_INT1_MAP_LOW_MODE
#define ADXL372_INT1_MAP_LOW_MODE(x)
Definition: adxl372.h:189
ADXL372_Y_THRESH_INACT_H
#define ADXL372_Y_THRESH_INACT_H
Definition: adxl372.h:91
ADXL372_DEVID
#define ADXL372_DEVID
Definition: adxl372.h:59
ADXL372_X_DATA_H
#define ADXL372_X_DATA_H
Definition: adxl372.h:67
ADXL372_INT1_MAP_FIFO_FULL_MODE
#define ADXL372_INT1_MAP_FIFO_FULL_MODE(x)
Definition: adxl372.h:179
adxl372_set_autosleep
int32_t adxl372_set_autosleep(struct adxl372_dev *dev, bool enable)
Definition: adxl372.c:192
ADXL372_WUR_4096ms
@ ADXL372_WUR_4096ms
Definition: adxl372.h:287
adxl372_wakeup_rate
adxl372_wakeup_rate
Definition: adxl372.h:281
adxl372_dev::fifo_config
struct adxl372_fifo_config fifo_config
Definition: adxl372.h:385
NO_OS_ARRAY_SIZE
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:53
adxl372_activity_threshold::enable
bool enable
Definition: adxl372.h:335
no_os_gpio_direction_input
int32_t no_os_gpio_direction_input(struct no_os_gpio_desc *desc)
Enable the input direction of the specified GPIO.
Definition: no_os_gpio.c:108
adxl372_irq_config::fifo_ovr
bool fifo_ovr
Definition: adxl372.h:348
adxl372_dev::reg_read_multiple
adxl372_reg_read_multi_func reg_read_multiple
Definition: adxl372.h:379
ADXL372_STATUS_1_FIFO_OVR
#define ADXL372_STATUS_1_FIFO_OVR(x)
Definition: adxl372.h:168
ADXL372_Y_THRESH_INACT_L
#define ADXL372_Y_THRESH_INACT_L
Definition: adxl372.h:92
adxl372_set_autosleep
int32_t adxl372_set_autosleep(struct adxl372_dev *dev, bool enable)
Definition: adxl372.c:192
ADXL372_BW_400HZ
@ ADXL372_BW_400HZ
Definition: adxl372.h:256
ADXL372_WUR_208ms
@ ADXL372_WUR_208ms
Definition: adxl372.h:284
adxl372_reg_write_func
int32_t(* adxl372_reg_write_func)(struct adxl372_dev *dev, uint8_t reg_addr, uint8_t reg_data)
Definition: adxl372.h:360
adxl372_comm_type
adxl372_comm_type
Definition: adxl372.h:321
adxl372_interrupt_config
int32_t adxl372_interrupt_config(struct adxl372_dev *dev, struct adxl372_irq_config int1, struct adxl372_irq_config int2)
Definition: adxl372.c:391
ADXL372_FIFO_DATA
#define ADXL372_FIFO_DATA
Definition: adxl372.h:113
ADXL372_XZ_FIFO
@ ADXL372_XZ_FIFO
Definition: adxl372.h:309
ADXL372_INT2_MAP_FIFO_RDY_MODE
#define ADXL372_INT2_MAP_FIFO_RDY_MODE(x)
Definition: adxl372.h:195
ADXL372_FIFO_STREAMED
@ ADXL372_FIFO_STREAMED
Definition: adxl372.h:316
ADXL372_RESET
#define ADXL372_RESET
Definition: adxl372.h:112
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: delay.c:130
adxl372_fifo_config
Definition: adxl372.h:326
ADXL372_XYZ_PEAK_FIFO
@ ADXL372_XYZ_PEAK_FIFO
Definition: adxl372.h:311
adxl372_dev::odr
enum adxl372_odr odr
Definition: adxl372.h:381
adxl372_init
int32_t adxl372_init(struct adxl372_dev **device, struct adxl372_init_param init_param)
Definition: adxl372.c:699
adxl372_op_mode
adxl372_op_mode
Definition: adxl372.h:247
I2C
@ I2C
Definition: adxl372.h:323
adxl372_get_highest_peak_data
int32_t adxl372_get_highest_peak_data(struct adxl372_dev *dev, struct adxl372_xyz_accel_data *max_peak)
Definition: adxl372.c:630
adxl372_dev::th_mode
enum adxl372_instant_on_th_mode th_mode
Definition: adxl372.h:384
adxl372_irq_config::inactivity
bool inactivity
Definition: adxl372.h:349
adxl372_irq_config::activity
bool activity
Definition: adxl372.h:350
adxl372_set_filter_settle
int32_t adxl372_set_filter_settle(struct adxl372_dev *dev, enum adxl372_filter_settle mode)
Definition: adxl372.c:375
ADXL372_MEASURE_AUTOSLEEP_MODE
#define ADXL372_MEASURE_AUTOSLEEP_MODE(x)
Definition: adxl372.h:138
adxl372_irq_config::low_operation
bool low_operation
Definition: adxl372.h:352
ADXL372_Z_THRESH_ACT2_L
#define ADXL372_Z_THRESH_ACT2_L
Definition: adxl372.h:102
ADXL372_TIME_INACT_H
#define ADXL372_TIME_INACT_H
Definition: adxl372.h:95
ADXL372_BW_200HZ
@ ADXL372_BW_200HZ
Definition: adxl372.h:255
adxl372_irq_config::fifo_full
bool fifo_full
Definition: adxl372.h:347
ADXL372_WUR_8192ms
@ ADXL372_WUR_8192ms
Definition: adxl372.h:288
adxl372_init_param::act_proc_mode
enum adxl372_act_proc_mode act_proc_mode
Definition: adxl372.h:401
ADXL372_ACTIVITY
@ ADXL372_ACTIVITY
Definition: adxl372.h:293
adxl372_init_param::filter_settle
enum adxl372_filter_settle filter_settle
Definition: adxl372.h:408
adxl372_instant_on_th_mode
adxl372_instant_on_th_mode
Definition: adxl372.h:276
ADXL372_MEASURE_AUTOSLEEP_MSK
#define ADXL372_MEASURE_AUTOSLEEP_MSK
Definition: adxl372.h:137
adxl372_set_bandwidth
int32_t adxl372_set_bandwidth(struct adxl372_dev *dev, enum adxl372_bandwidth bw)
Definition: adxl372.c:211
ADXL372_INT1_MAP_ACT_MODE
#define ADXL372_INT1_MAP_ACT_MODE(x)
Definition: adxl372.h:185
adxl372_act_proc_mode
adxl372_act_proc_mode
Definition: adxl372.h:262
ADXL372_INT2_MAP_ACT_MODE
#define ADXL372_INT2_MAP_ACT_MODE(x)
Definition: adxl372.h:203
adxl372_service_fifo_ev
int32_t adxl372_service_fifo_ev(struct adxl372_dev *dev, struct adxl372_xyz_accel_data *fifo_data, uint16_t *fifo_entries)
Definition: adxl372.c:547
ADXL372_POWER_CTL_MODE_MSK
#define ADXL372_POWER_CTL_MODE_MSK
Definition: adxl372.h:133
adxl372_fifo_config::fifo_mode
enum adxl372_fifo_mode fifo_mode
Definition: adxl372.h:327
adxl372_dev
Definition: adxl372.h:368
ADXL372_STATUS_1_FIFO_FULL
#define ADXL372_STATUS_1_FIFO_FULL(x)
Definition: adxl372.h:167
ADXL372_TIME_INACT_L
#define ADXL372_TIME_INACT_L
Definition: adxl372.h:96
adxl372_init_param::th_mode
enum adxl372_instant_on_th_mode th_mode
Definition: adxl372.h:402
adxl372_read_reg
int32_t adxl372_read_reg(struct adxl372_dev *dev, uint8_t reg_addr, uint8_t *reg_data)
Definition: adxl372.c:60
ADXL372_INSTANT_ON_LOW_TH
@ ADXL372_INSTANT_ON_LOW_TH
Definition: adxl372.h:277
adxl372_activity_threshold
Definition: adxl372.h:332
adxl372_init_param
Definition: adxl372.h:389
adxl372_activity_threshold::thresh
uint16_t thresh
Definition: adxl372.h:333
ADXL372_MEASURE_BANDWIDTH_MODE
#define ADXL372_MEASURE_BANDWIDTH_MODE(x)
Definition: adxl372.h:144
adxl372_i2c_reg_read
int32_t adxl372_i2c_reg_read(struct adxl372_dev *dev, uint8_t reg_addr, uint8_t *reg_data)
Definition: adxl372_i2c.c:53
adxl372_set_activity_threshold
int32_t adxl372_set_activity_threshold(struct adxl372_dev *dev, enum adxl372_th_activity act, uint16_t thresh, bool referenced, bool enable)
Definition: adxl372.c:136
ADXL372_PARTID_VAL
#define ADXL372_PARTID_VAL
Definition: adxl372.h:117
ADXL372_MEASURE_LINKLOOP_MSK
#define ADXL372_MEASURE_LINKLOOP_MSK
Definition: adxl372.h:139
ADXL372_WUR_24576ms
@ ADXL372_WUR_24576ms
Definition: adxl372.h:289
adxl372_dev::reg_write
adxl372_reg_write_func reg_write
Definition: adxl372.h:378
ADXL372_X_THRESH_INACT_H
#define ADXL372_X_THRESH_INACT_H
Definition: adxl372.h:89
adxl372_init
int32_t adxl372_init(struct adxl372_dev **device, struct adxl372_init_param init_param)
Definition: adxl372.c:699
ADXL372_BW_1600HZ
@ ADXL372_BW_1600HZ
Definition: adxl372.h:258
ADXL372_Z_FIFO
@ ADXL372_Z_FIFO
Definition: adxl372.h:308
adxl372_read_reg_multiple
int32_t adxl372_read_reg_multiple(struct adxl372_dev *dev, uint8_t reg_addr, uint8_t *reg_data, uint16_t count)
Definition: adxl372.c:89
adxl372_irq_config::fifo_rdy
bool fifo_rdy
Definition: adxl372.h:346
ADXL372_POWER_CTL_INSTANT_ON_TH_MSK
#define ADXL372_POWER_CTL_INSTANT_ON_TH_MSK
Definition: adxl372.h:125
adxl372_dev::wur
enum adxl372_wakeup_rate wur
Definition: adxl372.h:382
adxl372_init_param::odr
enum adxl372_odr odr
Definition: adxl372.h:399
adxl372_init_param::activity_th
struct adxl372_activity_threshold activity_th
Definition: adxl372.h:403
ADXL372_Z_THRESH_ACT_H
#define ADXL372_Z_THRESH_ACT_H
Definition: adxl372.h:86
adxl372_reset
int32_t adxl372_reset(struct adxl372_dev *dev)
Definition: adxl372.c:457
ADXL372_LOOPED
@ ADXL372_LOOPED
Definition: adxl372.h:265
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:132
adxl372_init_param::fifo_config
struct adxl372_fifo_config fifo_config
Definition: adxl372.h:409
adxl372_reg_read_multi_func
int32_t(* adxl372_reg_read_multi_func)(struct adxl372_dev *dev, uint8_t reg_addr, uint8_t *reg_data, uint16_t count)
Definition: adxl372.h:363
ADXL372_Z_AXIS
@ ADXL372_Z_AXIS
Definition: adxl372.h:244
adxl372_service_fifo_ev
int32_t adxl372_service_fifo_ev(struct adxl372_dev *dev, struct adxl372_xyz_accel_data *fifo_data, uint16_t *fifo_entries)
Definition: adxl372.c:547
adxl372_reset
int32_t adxl372_reset(struct adxl372_dev *dev)
Definition: adxl372.c:457
ADXL372_INT1_MAP_DATA_RDY_MODE
#define ADXL372_INT1_MAP_DATA_RDY_MODE(x)
Definition: adxl372.h:175
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:102
ADXL372_XY_FIFO
@ ADXL372_XY_FIFO
Definition: adxl372.h:307
adxl372_dev::reg_read
adxl372_reg_read_func reg_read
Definition: adxl372.h:377
adxl372_init_param::int2_config
struct adxl372_irq_config int2_config
Definition: adxl372.h:411
ADXL372_XYZ_FIFO
@ ADXL372_XYZ_FIFO
Definition: adxl372.h:304
ADXL372_ODR_1600HZ
@ ADXL372_ODR_1600HZ
Definition: adxl372.h:271
adxl372_filter_settle
adxl372_filter_settle
Definition: adxl372.h:298
ADXL372_POWER_CTL_INSTANT_ON_TH_MODE
#define ADXL372_POWER_CTL_INSTANT_ON_TH_MODE(x)
Definition: adxl372.h:126
adxl372_fifo_config::fifo_format
enum adxl372_fifo_format fifo_format
Definition: adxl372.h:328
no_os_i2c_desc
Structure holding I2C descriptor.
Definition: no_os_i2c.h:81
adxl372_init_param::int1_config
struct adxl372_irq_config int1_config
Definition: adxl372.h:410
ADXL372_INT2_MAP_INACT_MODE
#define ADXL372_INT2_MAP_INACT_MODE(x)
Definition: adxl372.h:201
ADXL372_STATUS_1_FIFO_RDY
#define ADXL372_STATUS_1_FIFO_RDY(x)
Definition: adxl372.h:166
no_os_gpio_get
int32_t no_os_gpio_get(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Obtain the GPIO decriptor.
Definition: no_os_gpio.c:55
ADXL372_INT1_MAP_FIFO_OVR_MODE
#define ADXL372_INT1_MAP_FIFO_OVR_MODE(x)
Definition: adxl372.h:181
no_os_i2c.h
Header file of I2C Interface.
ADXL372_WUR_104ms
@ ADXL372_WUR_104ms
Definition: adxl372.h:283
ADXL372_FIFO_BYPASSED
@ ADXL372_FIFO_BYPASSED
Definition: adxl372.h:315
adxl372_configure_fifo
int32_t adxl372_configure_fifo(struct adxl372_dev *dev, enum adxl372_fifo_mode mode, enum adxl372_fifo_format format, uint16_t fifo_samples)
Definition: adxl372.c:498
ADXL372_FILTER_SETTLE_370
@ ADXL372_FILTER_SETTLE_370
Definition: adxl372.h:299
ADXL372_Y_THRESH_ACT2_H
#define ADXL372_Y_THRESH_ACT2_H
Definition: adxl372.h:99
ADXL372_INT2_MAP_LOW_MODE
#define ADXL372_INT2_MAP_LOW_MODE(x)
Definition: adxl372.h:207
adxl372_get_status
int32_t adxl372_get_status(struct adxl372_dev *dev, uint8_t *status1, uint8_t *status2, uint16_t *fifo_entries)
Definition: adxl372.c:432
adxl372_reg_read_func
int32_t(* adxl372_reg_read_func)(struct adxl372_dev *dev, uint8_t reg_addr, uint8_t *reg_data)
Definition: adxl372.h:357
adxl372_get_highest_peak_data
int32_t adxl372_get_highest_peak_data(struct adxl372_dev *dev, struct adxl372_xyz_accel_data *max_peak)
Definition: adxl372.c:630
ADXL372_INT1_MAP_AWAKE_MODE
#define ADXL372_INT1_MAP_AWAKE_MODE(x)
Definition: adxl372.h:187
ADXL372_INT1_MAP_FIFO_RDY_MODE
#define ADXL372_INT1_MAP_FIFO_RDY_MODE(x)
Definition: adxl372.h:177
adxl372_set_filter_settle
int32_t adxl372_set_filter_settle(struct adxl372_dev *dev, enum adxl372_filter_settle mode)
Definition: adxl372.c:375
ADXL372_FULL_BW_MEASUREMENT
@ ADXL372_FULL_BW_MEASUREMENT
Definition: adxl372.h:251
ADXL372_MEASURE
#define ADXL372_MEASURE
Definition: adxl372.h:109
adxl372_fifo_config::fifo_samples
uint16_t fifo_samples
Definition: adxl372.h:329
adxl372_set_wakeup_rate
int32_t adxl372_set_wakeup_rate(struct adxl372_dev *dev, enum adxl372_wakeup_rate wur)
Definition: adxl372.c:321
ADXL372_INACTIVITY
@ ADXL372_INACTIVITY
Definition: adxl372.h:295
adxl372_irq_config
Definition: adxl372.h:344
adxl372_set_instant_on_th
int32_t adxl372_set_instant_on_th(struct adxl372_dev *dev, enum adxl372_instant_on_th_mode mode)
Definition: adxl372.c:290
adxl372_spi_reg_read_multiple
int32_t adxl372_spi_reg_read_multiple(struct adxl372_dev *dev, uint8_t reg_addr, uint8_t *reg_data, uint16_t count)
Definition: adxl372_spi.c:100
adxl372_dev::gpio_int2
struct no_os_gpio_desc * gpio_int2
Definition: adxl372.h:375
ADXL372_POWER_CTL_FIL_SETTLE_MODE
#define ADXL372_POWER_CTL_FIL_SETTLE_MODE(x)
Definition: adxl372.h:128
no_os_i2c_init_param
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
adxl372_irq_config::awake
bool awake
Definition: adxl372.h:351
ADXL372_FIFO_CTL
#define ADXL372_FIFO_CTL
Definition: adxl372.h:105
adxl372_get_fifo_xyz_data
int32_t adxl372_get_fifo_xyz_data(struct adxl372_dev *dev, struct adxl372_xyz_accel_data *samples, uint16_t cnt)
Definition: adxl372.c:590
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:96
adxl372_i2c_reg_write
int32_t adxl372_i2c_reg_write(struct adxl372_dev *dev, uint8_t reg_addr, uint8_t reg_data)
Definition: adxl372_i2c.c:82
ADXL372_X_FIFO
@ ADXL372_X_FIFO
Definition: adxl372.h:305
adxl372_set_instant_on_th
int32_t adxl372_set_instant_on_th(struct adxl372_dev *dev, enum adxl372_instant_on_th_mode mode)
Definition: adxl372.c:290
ADXL372_ODR_6400HZ
@ ADXL372_ODR_6400HZ
Definition: adxl372.h:273
adxl372_xyz_accel_data::y
uint16_t y
Definition: adxl372.h:340
ADXL372_INT2_MAP_AWAKE_MODE
#define ADXL372_INT2_MAP_AWAKE_MODE(x)
Definition: adxl372.h:205
ADXL372_INSTANT_ON_HIGH_TH
@ ADXL372_INSTANT_ON_HIGH_TH
Definition: adxl372.h:278
adxl372_dev::act_proc_mode
enum adxl372_act_proc_mode act_proc_mode
Definition: adxl372.h:383
adxl372_init_param::i2c_init
no_os_i2c_init_param i2c_init
Definition: adxl372.h:393
adxl372_dev::bw
enum adxl372_bandwidth bw
Definition: adxl372.h:380
adxl372_set_activity_threshold
int32_t adxl372_set_activity_threshold(struct adxl372_dev *dev, enum adxl372_th_activity act, uint16_t thresh, bool referenced, bool enable)
Definition: adxl372.c:136
ADXL372_STATUS_1
#define ADXL372_STATUS_1
Definition: adxl372.h:63
adxl372_dev::comm_type
enum adxl372_comm_type comm_type
Definition: adxl372.h:386
adxl372_set_act_proc_mode
int32_t adxl372_set_act_proc_mode(struct adxl372_dev *dev, enum adxl372_act_proc_mode mode)
Definition: adxl372.c:237
ADXL372_RESET_CODE
#define ADXL372_RESET_CODE
Definition: adxl372.h:119
adxl372_fifo_format
adxl372_fifo_format
Definition: adxl372.h:303
adxl372_get_status
int32_t adxl372_get_status(struct adxl372_dev *dev, uint8_t *status1, uint8_t *status2, uint16_t *fifo_entries)
Definition: adxl372.c:432
ADXL372_DEVID_VAL
#define ADXL372_DEVID_VAL
Definition: adxl372.h:115
ADXL372_STATUS_1_DATA_RDY
#define ADXL372_STATUS_1_DATA_RDY(x)
Definition: adxl372.h:165
no_os_gpio.h
Header file of GPIO Interface.
ADXL372_BW_3200HZ
@ ADXL372_BW_3200HZ
Definition: adxl372.h:259
ADXL372_STANDBY
@ ADXL372_STANDBY
Definition: adxl372.h:248
adxl372_set_wakeup_rate
int32_t adxl372_set_wakeup_rate(struct adxl372_dev *dev, enum adxl372_wakeup_rate wur)
Definition: adxl372.c:321
ADXL372_POWER_CTL_FIL_SETTLE_MSK
#define ADXL372_POWER_CTL_FIL_SETTLE_MSK
Definition: adxl372.h:127
adxl372_irq_config::data_rdy
bool data_rdy
Definition: adxl372.h:345
ADXL372_WAKE_UP
@ ADXL372_WAKE_UP
Definition: adxl372.h:249
no_os_spi_init
int32_t no_os_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: no_os_spi.c:51
ADXL372_INT2_MAP_FIFO_OVR_MODE
#define ADXL372_INT2_MAP_FIFO_OVR_MODE(x)
Definition: adxl372.h:199
adxl372_set_odr
int32_t adxl372_set_odr(struct adxl372_dev *dev, enum adxl372_odr odr)
Definition: adxl372.c:265
ADXL372_X_THRESH_ACT_L
#define ADXL372_X_THRESH_ACT_L
Definition: adxl372.h:83
ADXL372_ODR_400HZ
@ ADXL372_ODR_400HZ
Definition: adxl372.h:269
no_os_util.h
Implementation of utility functions.
ADXL372_INT2_MAP
#define ADXL372_INT2_MAP
Definition: adxl372.h:107
adxl372_axis
adxl372_axis
Definition: adxl372.h:241
ADXL372_X_THRESH_ACT2_L
#define ADXL372_X_THRESH_ACT2_L
Definition: adxl372.h:98
ADXL372_PARTID
#define ADXL372_PARTID
Definition: adxl372.h:61
ADXL372_INT2_MAP_FIFO_FULL_MODE
#define ADXL372_INT2_MAP_FIFO_FULL_MODE(x)
Definition: adxl372.h:197
SPI
@ SPI
Definition: adxl372.h:322
adxl372_init_param::op_mode
enum adxl372_op_mode op_mode
Definition: adxl372.h:412
adxl372_get_fifo_xyz_data
int32_t adxl372_get_fifo_xyz_data(struct adxl372_dev *dev, struct adxl372_xyz_accel_data *fifo_data, uint16_t cnt)
Definition: adxl372.c:590
adxl372_write_mask
int32_t adxl372_write_mask(struct adxl372_dev *dev, uint8_t reg_addr, uint32_t mask, uint8_t data)
Definition: adxl372.c:105
adxl372_set_op_mode
int32_t adxl372_set_op_mode(struct adxl372_dev *dev, enum adxl372_op_mode op_mode)
Definition: adxl372.c:175
adxl372_xyz_accel_data::x
uint16_t x
Definition: adxl372.h:339
adxl372_i2c_reg_read_multiple
int32_t adxl372_i2c_reg_read_multiple(struct adxl372_dev *dev, uint8_t reg_addr, uint8_t *reg_data, uint16_t count)
Definition: adxl372_i2c.c:103
ADXL372_X_THRESH_ACT_H
#define ADXL372_X_THRESH_ACT_H
Definition: adxl372.h:82
adxl372_set_odr
int32_t adxl372_set_odr(struct adxl372_dev *dev, enum adxl372_odr odr)
Definition: adxl372.c:265
dev_id
dev_id
Definition: ad9361.h:3334
adxl372_xyz_accel_data
Definition: adxl372.h:338
adxl372_init_param::inactivity_time
uint16_t inactivity_time
Definition: adxl372.h:407
adxl372_set_bandwidth
int32_t adxl372_set_bandwidth(struct adxl372_dev *dev, enum adxl372_bandwidth bw)
Definition: adxl372.c:211
ADXL372_Z_THRESH_INACT_L
#define ADXL372_Z_THRESH_INACT_L
Definition: adxl372.h:94
ADXL372_INT2_MAP_DATA_RDY_MODE
#define ADXL372_INT2_MAP_DATA_RDY_MODE(x)
Definition: adxl372.h:193
ADXL372_TIME_ACT
#define ADXL372_TIME_ACT
Definition: adxl372.h:88
adxl372_set_inactivity_time
int32_t adxl372_set_inactivity_time(struct adxl372_dev *dev, uint16_t time)
Definition: adxl372.c:356
ADXL372_ODR_3200HZ
@ ADXL372_ODR_3200HZ
Definition: adxl372.h:272
ADXL372_TIMING_ODR_MODE
#define ADXL372_TIMING_ODR_MODE(x)
Definition: adxl372.h:148
adxl372_write_mask
int32_t adxl372_write_mask(struct adxl372_dev *dev, uint8_t reg_addr, uint32_t mask, uint8_t data)
Definition: adxl372.c:105
ADXL372_ODR_800HZ
@ ADXL372_ODR_800HZ
Definition: adxl372.h:270
adxl372_set_activity_time
int32_t adxl372_set_activity_time(struct adxl372_dev *dev, uint8_t time)
Definition: adxl372.c:344
adxl372_write_reg
int32_t adxl372_write_reg(struct adxl372_dev *dev, uint8_t reg_addr, uint8_t reg_data)
Definition: adxl372.c:74
adxl372_odr
adxl372_odr
Definition: adxl372.h:268
ADXL372_Y_AXIS
@ ADXL372_Y_AXIS
Definition: adxl372.h:243
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:112
adxl372_set_inactivity_time
int32_t adxl372_set_inactivity_time(struct adxl372_dev *dev, uint16_t time)
Definition: adxl372.c:356
ADXL372_POWER_CTL
#define ADXL372_POWER_CTL
Definition: adxl372.h:110
adxl372_configure_fifo
int32_t adxl372_configure_fifo(struct adxl372_dev *dev, enum adxl372_fifo_mode mode, enum adxl372_fifo_format format, uint16_t fifo_samples)
Definition: adxl372.c:498