Go to the documentation of this file.
53 #define ADXL372_DEVID 0x00u
54 #define ADXL372_DEVID_MST 0x01u
55 #define ADXL372_PARTID 0x02u
56 #define ADXL372_REVID 0x03u
57 #define ADXL372_STATUS_1 0x04u
58 #define ADXL372_STATUS_2 0x05u
59 #define ADXL372_FIFO_ENTRIES_2 0x06u
60 #define ADXL372_FIFO_ENTRIES_1 0x07u
61 #define ADXL372_X_DATA_H 0x08u
62 #define ADXL372_X_DATA_L 0x09u
63 #define ADXL372_Y_DATA_H 0x0Au
64 #define ADXL372_Y_DATA_L 0x0Bu
65 #define ADXL372_Z_DATA_H 0x0Cu
66 #define ADXL372_Z_DATA_L 0x0Du
67 #define ADXL372_X_MAXPEAK_H 0x15u
68 #define ADXL372_X_MAXPEAK_L 0x16u
69 #define ADXL372_Y_MAXPEAK_H 0x17u
70 #define ADXL372_Y_MAXPEAK_L 0x18u
71 #define ADXL372_Z_MAXPEAK_H 0x19u
72 #define ADXL372_Z_MAXPEAK_L 0x1Au
73 #define ADXL372_OFFSET_X 0x20u
74 #define ADXL372_OFFSET_Y 0x21u
75 #define ADXL372_OFFSET_Z 0x22u
76 #define ADXL372_X_THRESH_ACT_H 0x23u
77 #define ADXL372_X_THRESH_ACT_L 0x24u
78 #define ADXL372_Y_THRESH_ACT_H 0x25u
79 #define ADXL372_Y_THRESH_ACT_L 0x26u
80 #define ADXL372_Z_THRESH_ACT_H 0x27u
81 #define ADXL372_Z_THRESH_ACT_L 0x28u
82 #define ADXL372_TIME_ACT 0x29u
83 #define ADXL372_X_THRESH_INACT_H 0x2Au
84 #define ADXL372_X_THRESH_INACT_L 0x2Bu
85 #define ADXL372_Y_THRESH_INACT_H 0x2Cu
86 #define ADXL372_Y_THRESH_INACT_L 0x2Du
87 #define ADXL372_Z_THRESH_INACT_H 0x2Eu
88 #define ADXL372_Z_THRESH_INACT_L 0x2Fu
89 #define ADXL372_TIME_INACT_H 0x30u
90 #define ADXL372_TIME_INACT_L 0x31u
91 #define ADXL372_X_THRESH_ACT2_H 0x32u
92 #define ADXL372_X_THRESH_ACT2_L 0x33u
93 #define ADXL372_Y_THRESH_ACT2_H 0x34u
94 #define ADXL372_Y_THRESH_ACT2_L 0x35u
95 #define ADXL372_Z_THRESH_ACT2_H 0x36u
96 #define ADXL372_Z_THRESH_ACT2_L 0x37u
97 #define ADXL372_HPF 0x38u
98 #define ADXL372_FIFO_SAMPLES 0x39u
99 #define ADXL372_FIFO_CTL 0x3Au
100 #define ADXL372_INT1_MAP 0x3Bu
101 #define ADXL372_INT2_MAP 0x3Cu
102 #define ADXL372_TIMING 0x3Du
103 #define ADXL372_MEASURE 0x3Eu
104 #define ADXL372_POWER_CTL 0x3Fu
105 #define ADXL372_SELF_TEST 0x40u
106 #define ADXL372_RESET 0x41u
107 #define ADXL372_FIFO_DATA 0x42u
109 #define ADXL372_DEVID_VAL 0xADu
110 #define ADXL372_MST_DEVID_VAL 0x1Du
111 #define ADXL372_PARTID_VAL 0xFAu
112 #define ADXL372_REVID_VAL 0x02u
113 #define ADXL372_RESET_CODE 0x52u
115 #define ADXL372_REG_READ(x) (((x & 0xFF) << 1) | 0x01)
116 #define ADXL372_REG_WRITE(x) ((x & 0xFF) << 1)
119 #define ADXL372_POWER_CTL_INSTANT_ON_TH_MSK NO_OS_BIT(5)
120 #define ADXL372_POWER_CTL_INSTANT_ON_TH_MODE(x) (((x) & 0x1) << 5)
121 #define ADXL372_POWER_CTL_FIL_SETTLE_MSK NO_OS_BIT(4)
122 #define ADXL372_POWER_CTL_FIL_SETTLE_MODE(x) (((x) & 0x1) << 4)
123 #define ADXL372_POWER_CTL_LPF_DIS_MSK NO_OS_BIT(3)
124 #define ADXL372_POWER_CTL_LPF_DIS_MODE(x) (((x) & 0x1) << 3)
125 #define ADXL372_POWER_CTL_HPF_DIS_MSK NO_OS_BIT(2)
126 #define ADXL372_POWER_CTL_HPF_DIS_MODE(x) (((x) & 0x1) << 2)
127 #define ADXL372_POWER_CTL_MODE_MSK NO_OS_GENMASK(1, 0)
128 #define ADXL372_POWER_CTL_MODE(x) (((x) & 0x3) << 0)
131 #define ADXL372_MEASURE_AUTOSLEEP_MSK NO_OS_BIT(6)
132 #define ADXL372_MEASURE_AUTOSLEEP_MODE(x) (((x) & 0x1) << 6)
133 #define ADXL372_MEASURE_LINKLOOP_MSK NO_OS_GENMASK(5, 4)
134 #define ADXL372_MEASURE_LINKLOOP_MODE(x) (((x) & 0x3) << 4)
135 #define ADXL372_MEASURE_LOW_NOISE_MSK NO_OS_BIT(3)
136 #define ADXL372_MEASURE_LOW_NOISE_MODE(x) (((x) & 0x1) << 3)
137 #define ADXL372_MEASURE_BANDWIDTH_MSK NO_OS_GENMASK(2, 0)
138 #define ADXL372_MEASURE_BANDWIDTH_MODE(x) (((x) & 0x7) << 0)
141 #define ADXL372_TIMING_ODR_MSK NO_OS_GENMASK(7, 5)
142 #define ADXL372_TIMING_ODR_MODE(x) (((x) & 0x7) << 5)
143 #define ADXL372_TIMING_WAKE_UP_RATE_MSK NO_OS_GENMASK(4, 2)
144 #define ADXL372_TIMING_WAKE_UP_RATE_MODE(x) (((x) & 0x7) << 2)
145 #define ADXL372_TIMING_EXT_CLK_MSK NO_OS_BIT(1)
146 #define ADXL372_TIMING_EXT_CLK_MODE(x) (((x) & 0x1) << 1)
147 #define ADXL372_TIMING_EXT_SYNC_MSK NO_OS_BIT(0)
148 #define ADXL372_TIMING_EXT_SYNC_MODE(x) (((x) & 0x1) << 0)
151 #define ADXL372_FIFO_CTL_FORMAT_MSK NO_OS_GENMASK(5, 3)
152 #define ADXL372_FIFO_CTL_FORMAT_MODE(x) (((x) & 0x7) << 3)
153 #define ADXL372_FIFO_CTL_MODE_MSK NO_OS_GENMASK(2, 1)
154 #define ADXL372_FIFO_CTL_MODE_MODE(x) (((x) & 0x3) << 1)
155 #define ADXL372_FIFO_CTL_SAMPLES_MSK NO_OS_BIT(0)
156 #define ADXL372_FIFO_CTL_SAMPLES_MODE(x) (((x) > 0xFF) ? 1 : 0)
159 #define ADXL372_STATUS_1_DATA_RDY(x) (((x) >> 0) & 0x1)
160 #define ADXL372_STATUS_1_FIFO_RDY(x) (((x) >> 1) & 0x1)
161 #define ADXL372_STATUS_1_FIFO_FULL(x) (((x) >> 2) & 0x1)
162 #define ADXL372_STATUS_1_FIFO_OVR(x) (((x) >> 3) & 0x1)
163 #define ADXL372_STATUS_1_USR_NVM_BUSY(x) (((x) >> 5) & 0x1)
164 #define ADXL372_STATUS_1_AWAKE(x) (((x) >> 6) & 0x1)
165 #define ADXL372_STATUS_1_ERR_USR_REGS(x) (((x) >> 7) & 0x1)
168 #define ADXL372_INT1_MAP_DATA_RDY_MSK NO_OS_BIT(0)
169 #define ADXL372_INT1_MAP_DATA_RDY_MODE(x) (((x) & 0x1) << 0)
170 #define ADXL372_INT1_MAP_FIFO_RDY_MSK NO_OS_BIT(1)
171 #define ADXL372_INT1_MAP_FIFO_RDY_MODE(x) (((x) & 0x1) << 1)
172 #define ADXL372_INT1_MAP_FIFO_FULL_MSK NO_OS_BIT(2)
173 #define ADXL372_INT1_MAP_FIFO_FULL_MODE(x) (((x) & 0x1) << 2)
174 #define ADXL372_INT1_MAP_FIFO_OVR_MSK NO_OS_BIT(3)
175 #define ADXL372_INT1_MAP_FIFO_OVR_MODE(x) (((x) & 0x1) << 3)
176 #define ADXL372_INT1_MAP_INACT_MSK NO_OS_BIT(4)
177 #define ADXL372_INT1_MAP_INACT_MODE(x) (((x) & 0x1) << 4)
178 #define ADXL372_INT1_MAP_ACT_MSK NO_OS_BIT(5)
179 #define ADXL372_INT1_MAP_ACT_MODE(x) (((x) & 0x1) << 5)
180 #define ADXL372_INT1_MAP_AWAKE_MSK NO_OS_BIT(6)
181 #define ADXL372_INT1_MAP_AWAKE_MODE(x) (((x) & 0x1) << 6)
182 #define ADXL372_INT1_MAP_LOW_MSK NO_OS_BIT(7)
183 #define ADXL372_INT1_MAP_LOW_MODE(x) (((x) & 0x1) << 7)
186 #define ADXL372_INT2_MAP_DATA_RDY_MSK NO_OS_BIT(0)
187 #define ADXL372_INT2_MAP_DATA_RDY_MODE(x) (((x) & 0x1) << 0)
188 #define ADXL372_INT2_MAP_FIFO_RDY_MSK NO_OS_BIT(1)
189 #define ADXL372_INT2_MAP_FIFO_RDY_MODE(x) (((x) & 0x1) << 1)
190 #define ADXL372_INT2_MAP_FIFO_FULL_MSK NO_OS_BIT(2)
191 #define ADXL372_INT2_MAP_FIFO_FULL_MODE(x) (((x) & 0x1) << 2)
192 #define ADXL372_INT2_MAP_FIFO_OVR_MSK NO_OS_BIT(3)
193 #define ADXL372_INT2_MAP_FIFO_OVR_MODE(x) (((x) & 0x1) << 3)
194 #define ADXL372_INT2_MAP_INACT_MSK NO_OS_BIT(4)
195 #define ADXL372_INT2_MAP_INACT_MODE(x) (((x) & 0x1) << 4)
196 #define ADXL372_INT2_MAP_ACT_MSK NO_OS_BIT(5)
197 #define ADXL372_INT2_MAP_ACT_MODE(x) (((x) & 0x1) << 5)
198 #define ADXL372_INT2_MAP_AWAKE_MSK NO_OS_BIT(6)
199 #define ADXL372_INT2_MAP_AWAKE_MODE(x) (((x) & 0x1) << 6)
200 #define ADXL372_INT2_MAP_LOW_MSK NO_OS_BIT(7)
201 #define ADXL372_INT2_MAP_LOW_MODE(x) (((x) & 0x1) << 7)
203 static const int adxl372_th_reg_addr_h[3][3] = {
219 static const int adxl372_th_reg_addr_l[3][3] = {
465 uint16_t *fifo_entries);
470 uint16_t fifo_samples);
476 uint16_t *fifo_entries);
uint16_t z
Definition: adxl372.h:335
#define ADXL372_Z_THRESH_INACT_H
Definition: adxl372.h:87
struct adxl372_activity_threshold activity2_th
Definition: adxl372.h:398
int32_t adxl372_set_activity_time(struct adxl372_dev *dev, uint8_t time)
Definition: adxl372.c:339
uint8_t activity_time
Definition: adxl372.h:400
#define ADXL372_Y_THRESH_ACT2_L
Definition: adxl372.h:94
int32_t adxl372_get_accel_data(struct adxl372_dev *dev, struct adxl372_xyz_accel_data *accel_data)
Definition: adxl372.c:659
int32_t adxl372_interrupt_config(struct adxl372_dev *dev, struct adxl372_irq_config int1, struct adxl372_irq_config int2)
Definition: adxl372.c:386
#define ADXL372_TIMING_ODR_MSK
Definition: adxl372.h:141
#define ADXL372_FIFO_SAMPLES
Definition: adxl372.h:98
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
enum adxl372_comm_type comm_type
Definition: adxl372.h:407
#define ADXL372_Z_THRESH_ACT2_H
Definition: adxl372.h:95
int32_t adxl372_spi_reg_write(struct adxl372_dev *dev, uint8_t reg_addr, uint8_t reg_data)
Definition: adxl372_spi.c:73
adxl372_fifo_mode
Definition: adxl372.h:308
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:52
struct no_os_gpio_init_param gpio_int1
Definition: adxl372.h:389
#define ADXL372_Y_THRESH_ACT_L
Definition: adxl372.h:79
@ ADXL372_WUR_512ms
Definition: adxl372.h:279
adxl372_bandwidth
Definition: adxl372.h:248
#define ADXL372_TIMING_WAKE_UP_RATE_MODE(x)
Definition: adxl372.h:144
@ ADXL372_FILTER_SETTLE_16
Definition: adxl372.h:294
int32_t adxl372_spi_reg_read(struct adxl372_dev *dev, uint8_t reg_addr, uint8_t *reg_data)
Definition: adxl372_spi.c:47
#define ADXL372_X_THRESH_INACT_L
Definition: adxl372.h:84
@ ADXL372_FIFO_OLD_SAVED
Definition: adxl372.h:312
#define ADXL372_POWER_CTL_MODE(x)
Definition: adxl372.h:128
#define ADXL372_TIMING_WAKE_UP_RATE_MSK
Definition: adxl372.h:143
#define ADXL372_INT1_MAP_INACT_MODE(x)
Definition: adxl372.h:177
@ ADXL372_X_AXIS
Definition: adxl372.h:236
@ ADXL372_YZ_FIFO
Definition: adxl372.h:304
Header file of SPI Interface.
struct no_os_gpio_init_param gpio_int2
Definition: adxl372.h:390
int32_t adxl372_set_act_proc_mode(struct adxl372_dev *dev, enum adxl372_act_proc_mode mode)
Definition: adxl372.c:232
@ ADXL372_FIFO_TRIGGERED
Definition: adxl372.h:311
struct no_os_spi_init_param spi_init
Definition: adxl372.h:385
#define ADXL372_MEASURE_BANDWIDTH_MSK
Definition: adxl372.h:137
#define ADXL372_FIFO_CTL_FORMAT_MODE(x)
Definition: adxl372.h:152
int32_t adxl372_get_accel_data(struct adxl372_dev *dev, struct adxl372_xyz_accel_data *accel_data)
Definition: adxl372.c:659
bool referenced
Definition: adxl372.h:328
@ ADXL372_DEFAULT
Definition: adxl372.h:257
@ ADXL372_Y_FIFO
Definition: adxl372.h:300
@ ADXL372_ACTIVITY2
Definition: adxl372.h:288
@ ADXL372_BW_800HZ
Definition: adxl372.h:251
#define ADXL372_Z_THRESH_ACT_L
Definition: adxl372.h:81
@ ADXL372_WUR_52ms
Definition: adxl372.h:276
#define ADXL372_REVID
Definition: adxl372.h:56
#define ADXL372_INT1_MAP
Definition: adxl372.h:100
enum adxl372_bandwidth bw
Definition: adxl372.h:392
Header file of Delay functions.
adxl372_th_activity
Definition: adxl372.h:286
#define ADXL372_FIFO_CTL_MODE_MODE(x)
Definition: adxl372.h:154
#define ADXL372_MEASURE_LINKLOOP_MODE(x)
Definition: adxl372.h:134
#define ADXL372_X_THRESH_ACT2_H
Definition: adxl372.h:91
struct adxl372_activity_threshold inactivity_th
Definition: adxl372.h:399
#define ADXL372_Y_THRESH_ACT_H
Definition: adxl372.h:78
int32_t adxl372_set_op_mode(struct adxl372_dev *dev, enum adxl372_op_mode op_mode)
Definition: adxl372.c:170
#define ADXL372_FIFO_CTL_SAMPLES_MODE(x)
Definition: adxl372.h:156
#define ADXL372_TIMING
Definition: adxl372.h:102
Definition: ad9361_util.h:69
Header file for adxl372 Driver.
struct no_os_gpio_desc * gpio_int1
Definition: adxl372.h:368
@ ADXL372_LINKED
Definition: adxl372.h:258
enum adxl372_wakeup_rate wur
Definition: adxl372.h:394
@ ADXL372_INSTANT_ON
Definition: adxl372.h:244
@ ADXL372_WUR_2048ms
Definition: adxl372.h:280
#define ADXL372_X_MAXPEAK_H
Definition: adxl372.h:67
#define ADXL372_INT1_MAP_LOW_MODE(x)
Definition: adxl372.h:183
#define ADXL372_Y_THRESH_INACT_H
Definition: adxl372.h:85
#define ADXL372_DEVID
Definition: adxl372.h:53
#define ADXL372_X_DATA_H
Definition: adxl372.h:61
#define ADXL372_INT1_MAP_FIFO_FULL_MODE(x)
Definition: adxl372.h:173
int32_t adxl372_set_autosleep(struct adxl372_dev *dev, bool enable)
Definition: adxl372.c:187
@ ADXL372_WUR_4096ms
Definition: adxl372.h:281
adxl372_wakeup_rate
Definition: adxl372.h:275
struct adxl372_fifo_config fifo_config
Definition: adxl372.h:379
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:49
bool enable
Definition: adxl372.h:329
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:124
bool fifo_ovr
Definition: adxl372.h:342
adxl372_reg_read_multi_func reg_read_multiple
Definition: adxl372.h:373
#define ADXL372_STATUS_1_FIFO_OVR(x)
Definition: adxl372.h:162
#define ADXL372_Y_THRESH_INACT_L
Definition: adxl372.h:86
int32_t adxl372_set_autosleep(struct adxl372_dev *dev, bool enable)
Definition: adxl372.c:187
@ ADXL372_BW_400HZ
Definition: adxl372.h:250
@ ADXL372_WUR_208ms
Definition: adxl372.h:278
int32_t(* adxl372_reg_write_func)(struct adxl372_dev *dev, uint8_t reg_addr, uint8_t reg_data)
Definition: adxl372.h:354
adxl372_comm_type
Definition: adxl372.h:315
int32_t adxl372_interrupt_config(struct adxl372_dev *dev, struct adxl372_irq_config int1, struct adxl372_irq_config int2)
Definition: adxl372.c:386
#define ADXL372_FIFO_DATA
Definition: adxl372.h:107
@ ADXL372_XZ_FIFO
Definition: adxl372.h:303
#define ADXL372_INT2_MAP_FIFO_RDY_MODE(x)
Definition: adxl372.h:189
@ ADXL372_FIFO_STREAMED
Definition: adxl372.h:310
#define ADXL372_RESET
Definition: adxl372.h:106
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
Definition: adxl372.h:320
@ ADXL372_XYZ_PEAK_FIFO
Definition: adxl372.h:305
enum adxl372_odr odr
Definition: adxl372.h:375
int32_t adxl372_init(struct adxl372_dev **device, struct adxl372_init_param init_param)
Definition: adxl372.c:694
adxl372_op_mode
Definition: adxl372.h:241
@ I2C
Definition: adxl372.h:317
int32_t adxl372_get_highest_peak_data(struct adxl372_dev *dev, struct adxl372_xyz_accel_data *max_peak)
Definition: adxl372.c:625
enum adxl372_instant_on_th_mode th_mode
Definition: adxl372.h:378
bool inactivity
Definition: adxl372.h:343
bool activity
Definition: adxl372.h:344
int32_t adxl372_set_filter_settle(struct adxl372_dev *dev, enum adxl372_filter_settle mode)
Definition: adxl372.c:370
#define ADXL372_MEASURE_AUTOSLEEP_MODE(x)
Definition: adxl372.h:132
bool low_operation
Definition: adxl372.h:346
#define ADXL372_Z_THRESH_ACT2_L
Definition: adxl372.h:96
#define ADXL372_TIME_INACT_H
Definition: adxl372.h:89
@ ADXL372_BW_200HZ
Definition: adxl372.h:249
bool fifo_full
Definition: adxl372.h:341
@ ADXL372_WUR_8192ms
Definition: adxl372.h:282
enum adxl372_act_proc_mode act_proc_mode
Definition: adxl372.h:395
@ ADXL372_ACTIVITY
Definition: adxl372.h:287
enum adxl372_filter_settle filter_settle
Definition: adxl372.h:402
adxl372_instant_on_th_mode
Definition: adxl372.h:270
#define ADXL372_MEASURE_AUTOSLEEP_MSK
Definition: adxl372.h:131
int32_t adxl372_set_bandwidth(struct adxl372_dev *dev, enum adxl372_bandwidth bw)
Definition: adxl372.c:206
#define ADXL372_INT1_MAP_ACT_MODE(x)
Definition: adxl372.h:179
adxl372_act_proc_mode
Definition: adxl372.h:256
#define ADXL372_INT2_MAP_ACT_MODE(x)
Definition: adxl372.h:197
int32_t adxl372_service_fifo_ev(struct adxl372_dev *dev, struct adxl372_xyz_accel_data *fifo_data, uint16_t *fifo_entries)
Definition: adxl372.c:542
#define ADXL372_POWER_CTL_MODE_MSK
Definition: adxl372.h:127
enum adxl372_fifo_mode fifo_mode
Definition: adxl372.h:321
Definition: adxl372.h:362
#define ADXL372_STATUS_1_FIFO_FULL(x)
Definition: adxl372.h:161
#define ADXL372_TIME_INACT_L
Definition: adxl372.h:90
enum adxl372_instant_on_th_mode th_mode
Definition: adxl372.h:396
int32_t adxl372_read_reg(struct adxl372_dev *dev, uint8_t reg_addr, uint8_t *reg_data)
Definition: adxl372.c:55
@ ADXL372_INSTANT_ON_LOW_TH
Definition: adxl372.h:271
Definition: adxl372.h:326
Definition: adxl372.h:383
uint16_t thresh
Definition: adxl372.h:327
#define ADXL372_MEASURE_BANDWIDTH_MODE(x)
Definition: adxl372.h:138
int32_t adxl372_i2c_reg_read(struct adxl372_dev *dev, uint8_t reg_addr, uint8_t *reg_data)
Definition: adxl372_i2c.c:47
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:131
#define ADXL372_PARTID_VAL
Definition: adxl372.h:111
#define ADXL372_MEASURE_LINKLOOP_MSK
Definition: adxl372.h:133
@ ADXL372_WUR_24576ms
Definition: adxl372.h:283
adxl372_reg_write_func reg_write
Definition: adxl372.h:372
#define ADXL372_X_THRESH_INACT_H
Definition: adxl372.h:83
int32_t adxl372_init(struct adxl372_dev **device, struct adxl372_init_param init_param)
Definition: adxl372.c:694
@ ADXL372_BW_1600HZ
Definition: adxl372.h:252
@ ADXL372_Z_FIFO
Definition: adxl372.h:302
int32_t adxl372_read_reg_multiple(struct adxl372_dev *dev, uint8_t reg_addr, uint8_t *reg_data, uint16_t count)
Definition: adxl372.c:84
bool fifo_rdy
Definition: adxl372.h:340
#define ADXL372_POWER_CTL_INSTANT_ON_TH_MSK
Definition: adxl372.h:119
enum adxl372_wakeup_rate wur
Definition: adxl372.h:376
enum adxl372_odr odr
Definition: adxl372.h:393
struct adxl372_activity_threshold activity_th
Definition: adxl372.h:397
#define ADXL372_Z_THRESH_ACT_H
Definition: adxl372.h:80
int32_t adxl372_reset(struct adxl372_dev *dev)
Definition: adxl372.c:452
@ ADXL372_LOOPED
Definition: adxl372.h:259
struct no_os_i2c_init_param i2c_init
Definition: adxl372.h:387
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
struct adxl372_fifo_config fifo_config
Definition: adxl372.h:403
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:357
@ ADXL372_Z_AXIS
Definition: adxl372.h:238
int32_t adxl372_service_fifo_ev(struct adxl372_dev *dev, struct adxl372_xyz_accel_data *fifo_data, uint16_t *fifo_entries)
Definition: adxl372.c:542
int32_t adxl372_reset(struct adxl372_dev *dev)
Definition: adxl372.c:452
#define ADXL372_INT1_MAP_DATA_RDY_MODE(x)
Definition: adxl372.h:169
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
@ ADXL372_XY_FIFO
Definition: adxl372.h:301
adxl372_reg_read_func reg_read
Definition: adxl372.h:371
struct adxl372_irq_config int2_config
Definition: adxl372.h:405
@ ADXL372_XYZ_FIFO
Definition: adxl372.h:298
@ ADXL372_ODR_1600HZ
Definition: adxl372.h:265
adxl372_filter_settle
Definition: adxl372.h:292
#define ADXL372_POWER_CTL_INSTANT_ON_TH_MODE(x)
Definition: adxl372.h:120
enum adxl372_fifo_format fifo_format
Definition: adxl372.h:322
Structure holding I2C address descriptor.
Definition: no_os_i2c.h:101
struct adxl372_irq_config int1_config
Definition: adxl372.h:404
#define ADXL372_INT2_MAP_INACT_MODE(x)
Definition: adxl372.h:195
#define ADXL372_STATUS_1_FIFO_RDY(x)
Definition: adxl372.h:160
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:49
#define ADXL372_INT1_MAP_FIFO_OVR_MODE(x)
Definition: adxl372.h:175
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
Header file of I2C Interface.
@ ADXL372_WUR_104ms
Definition: adxl372.h:277
@ ADXL372_FIFO_BYPASSED
Definition: adxl372.h:309
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:493
@ ADXL372_FILTER_SETTLE_370
Definition: adxl372.h:293
#define ADXL372_Y_THRESH_ACT2_H
Definition: adxl372.h:93
#define ADXL372_INT2_MAP_LOW_MODE(x)
Definition: adxl372.h:201
int32_t adxl372_get_status(struct adxl372_dev *dev, uint8_t *status1, uint8_t *status2, uint16_t *fifo_entries)
Definition: adxl372.c:427
int32_t(* adxl372_reg_read_func)(struct adxl372_dev *dev, uint8_t reg_addr, uint8_t *reg_data)
Definition: adxl372.h:351
int32_t adxl372_get_highest_peak_data(struct adxl372_dev *dev, struct adxl372_xyz_accel_data *max_peak)
Definition: adxl372.c:625
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
#define ADXL372_INT1_MAP_AWAKE_MODE(x)
Definition: adxl372.h:181
#define ADXL372_INT1_MAP_FIFO_RDY_MODE(x)
Definition: adxl372.h:171
int32_t adxl372_set_filter_settle(struct adxl372_dev *dev, enum adxl372_filter_settle mode)
Definition: adxl372.c:370
@ ADXL372_FULL_BW_MEASUREMENT
Definition: adxl372.h:245
#define ADXL372_MEASURE
Definition: adxl372.h:103
uint16_t fifo_samples
Definition: adxl372.h:323
int32_t adxl372_set_wakeup_rate(struct adxl372_dev *dev, enum adxl372_wakeup_rate wur)
Definition: adxl372.c:316
@ ADXL372_INACTIVITY
Definition: adxl372.h:289
Definition: adxl372.h:338
int32_t adxl372_set_instant_on_th(struct adxl372_dev *dev, enum adxl372_instant_on_th_mode mode)
Definition: adxl372.c:285
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:94
struct no_os_gpio_desc * gpio_int2
Definition: adxl372.h:369
#define ADXL372_POWER_CTL_FIL_SETTLE_MODE(x)
Definition: adxl372.h:122
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
bool awake
Definition: adxl372.h:345
#define ADXL372_FIFO_CTL
Definition: adxl372.h:99
int32_t adxl372_get_fifo_xyz_data(struct adxl372_dev *dev, struct adxl372_xyz_accel_data *samples, uint16_t cnt)
Definition: adxl372.c:585
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
int32_t adxl372_i2c_reg_write(struct adxl372_dev *dev, uint8_t reg_addr, uint8_t reg_data)
Definition: adxl372_i2c.c:76
@ ADXL372_X_FIFO
Definition: adxl372.h:299
int32_t adxl372_set_instant_on_th(struct adxl372_dev *dev, enum adxl372_instant_on_th_mode mode)
Definition: adxl372.c:285
@ ADXL372_ODR_6400HZ
Definition: adxl372.h:267
uint16_t y
Definition: adxl372.h:334
#define ADXL372_INT2_MAP_AWAKE_MODE(x)
Definition: adxl372.h:199
@ ADXL372_INSTANT_ON_HIGH_TH
Definition: adxl372.h:272
enum adxl372_act_proc_mode act_proc_mode
Definition: adxl372.h:377
enum adxl372_bandwidth bw
Definition: adxl372.h:374
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:131
#define ADXL372_STATUS_1
Definition: adxl372.h:57
enum adxl372_comm_type comm_type
Definition: adxl372.h:380
int32_t adxl372_set_act_proc_mode(struct adxl372_dev *dev, enum adxl372_act_proc_mode mode)
Definition: adxl372.c:232
#define ADXL372_RESET_CODE
Definition: adxl372.h:113
adxl372_fifo_format
Definition: adxl372.h:297
int32_t adxl372_get_status(struct adxl372_dev *dev, uint8_t *status1, uint8_t *status2, uint16_t *fifo_entries)
Definition: adxl372.c:427
#define ADXL372_DEVID_VAL
Definition: adxl372.h:109
#define ADXL372_STATUS_1_DATA_RDY(x)
Definition: adxl372.h:159
Header file of GPIO Interface.
@ ADXL372_BW_3200HZ
Definition: adxl372.h:253
struct no_os_i2c_desc * i2c_desc
Definition: adxl372.h:366
@ ADXL372_STANDBY
Definition: adxl372.h:242
int32_t adxl372_set_wakeup_rate(struct adxl372_dev *dev, enum adxl372_wakeup_rate wur)
Definition: adxl372.c:316
#define ADXL372_POWER_CTL_FIL_SETTLE_MSK
Definition: adxl372.h:121
bool data_rdy
Definition: adxl372.h:339
@ ADXL372_WAKE_UP
Definition: adxl372.h:243
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:52
#define ADXL372_INT2_MAP_FIFO_OVR_MODE(x)
Definition: adxl372.h:193
int32_t adxl372_set_odr(struct adxl372_dev *dev, enum adxl372_odr odr)
Definition: adxl372.c:260
#define ADXL372_X_THRESH_ACT_L
Definition: adxl372.h:77
@ ADXL372_ODR_400HZ
Definition: adxl372.h:263
Header file of utility functions.
#define ADXL372_INT2_MAP
Definition: adxl372.h:101
adxl372_axis
Definition: adxl372.h:235
#define ADXL372_X_THRESH_ACT2_L
Definition: adxl372.h:92
#define ADXL372_PARTID
Definition: adxl372.h:55
#define ADXL372_INT2_MAP_FIFO_FULL_MODE(x)
Definition: adxl372.h:191
@ SPI
Definition: adxl372.h:316
enum adxl372_op_mode op_mode
Definition: adxl372.h:406
int32_t adxl372_get_fifo_xyz_data(struct adxl372_dev *dev, struct adxl372_xyz_accel_data *fifo_data, uint16_t cnt)
Definition: adxl372.c:585
int32_t adxl372_write_mask(struct adxl372_dev *dev, uint8_t reg_addr, uint32_t mask, uint8_t data)
Definition: adxl372.c:100
int32_t adxl372_set_op_mode(struct adxl372_dev *dev, enum adxl372_op_mode op_mode)
Definition: adxl372.c:170
uint16_t x
Definition: adxl372.h:333
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:97
#define ADXL372_X_THRESH_ACT_H
Definition: adxl372.h:76
int32_t adxl372_set_odr(struct adxl372_dev *dev, enum adxl372_odr odr)
Definition: adxl372.c:260
dev_id
Definition: ad9361.h:3328
Definition: adxl372.h:332
uint16_t inactivity_time
Definition: adxl372.h:401
int32_t adxl372_set_bandwidth(struct adxl372_dev *dev, enum adxl372_bandwidth bw)
Definition: adxl372.c:206
#define ADXL372_Z_THRESH_INACT_L
Definition: adxl372.h:88
#define ADXL372_INT2_MAP_DATA_RDY_MODE(x)
Definition: adxl372.h:187
#define ADXL372_TIME_ACT
Definition: adxl372.h:82
int32_t adxl372_set_inactivity_time(struct adxl372_dev *dev, uint16_t time)
Definition: adxl372.c:351
@ ADXL372_ODR_3200HZ
Definition: adxl372.h:266
#define ADXL372_TIMING_ODR_MODE(x)
Definition: adxl372.h:142
int32_t adxl372_write_mask(struct adxl372_dev *dev, uint8_t reg_addr, uint32_t mask, uint8_t data)
Definition: adxl372.c:100
@ ADXL372_ODR_800HZ
Definition: adxl372.h:264
int32_t adxl372_set_activity_time(struct adxl372_dev *dev, uint8_t time)
Definition: adxl372.c:339
int32_t adxl372_write_reg(struct adxl372_dev *dev, uint8_t reg_addr, uint8_t reg_data)
Definition: adxl372.c:69
adxl372_odr
Definition: adxl372.h:262
struct no_os_spi_desc * spi_desc
Definition: adxl372.h:364
@ ADXL372_Y_AXIS
Definition: adxl372.h:237
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
int32_t adxl372_set_inactivity_time(struct adxl372_dev *dev, uint16_t time)
Definition: adxl372.c:351
#define ADXL372_POWER_CTL
Definition: adxl372.h:104
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:493