no-OS
adxl362.h
Go to the documentation of this file.
1 /***************************************************************************/
40 #ifndef __ADXL362_H__
41 #define __ADXL362_H__
42 
43 /******************************************************************************/
44 /***************************** Include Files **********************************/
45 /******************************************************************************/
46 #include <stdint.h>
47 #include "no_os_spi.h"
48 
49 /******************************************************************************/
50 /********************************* ADXL362 ************************************/
51 /******************************************************************************/
52 
53 /* ADXL362 communication commands */
54 #define ADXL362_WRITE_REG 0x0A
55 #define ADXL362_READ_REG 0x0B
56 #define ADXL362_WRITE_FIFO 0x0D
57 
58 /* Registers */
59 #define ADXL362_REG_DEVID_AD 0x00
60 #define ADXL362_REG_DEVID_MST 0x01
61 #define ADXL362_REG_PARTID 0x02
62 #define ADXL362_REG_REVID 0x03
63 #define ADXL362_REG_XDATA 0x08
64 #define ADXL362_REG_YDATA 0x09
65 #define ADXL362_REG_ZDATA 0x0A
66 #define ADXL362_REG_STATUS 0x0B
67 #define ADXL362_REG_FIFO_L 0x0C
68 #define ADXL362_REG_FIFO_H 0x0D
69 #define ADXL362_REG_XDATA_L 0x0E
70 #define ADXL362_REG_XDATA_H 0x0F
71 #define ADXL362_REG_YDATA_L 0x10
72 #define ADXL362_REG_YDATA_H 0x11
73 #define ADXL362_REG_ZDATA_L 0x12
74 #define ADXL362_REG_ZDATA_H 0x13
75 #define ADXL362_REG_TEMP_L 0x14
76 #define ADXL362_REG_TEMP_H 0x15
77 #define ADXL362_REG_SOFT_RESET 0x1F
78 #define ADXL362_REG_THRESH_ACT_L 0x20
79 #define ADXL362_REG_THRESH_ACT_H 0x21
80 #define ADXL362_REG_TIME_ACT 0x22
81 #define ADXL362_REG_THRESH_INACT_L 0x23
82 #define ADXL362_REG_THRESH_INACT_H 0x24
83 #define ADXL362_REG_TIME_INACT_L 0x25
84 #define ADXL362_REG_TIME_INACT_H 0x26
85 #define ADXL362_REG_ACT_INACT_CTL 0x27
86 #define ADXL362_REG_FIFO_CTL 0x28
87 #define ADXL362_REG_FIFO_SAMPLES 0x29
88 #define ADXL362_REG_INTMAP1 0x2A
89 #define ADXL362_REG_INTMAP2 0x2B
90 #define ADXL362_REG_FILTER_CTL 0x2C
91 #define ADXL362_REG_POWER_CTL 0x2D
92 #define ADXL362_REG_SELF_TEST 0x2E
93 
94 /* ADXL362_REG_STATUS definitions */
95 #define ADXL362_STATUS_ERR_USER_REGS (1 << 7)
96 #define ADXL362_STATUS_AWAKE (1 << 6)
97 #define ADXL362_STATUS_INACT (1 << 5)
98 #define ADXL362_STATUS_ACT (1 << 4)
99 #define ADXL362_STATUS_FIFO_OVERRUN (1 << 3)
100 #define ADXL362_STATUS_FIFO_WATERMARK (1 << 2)
101 #define ADXL362_STATUS_FIFO_RDY (1 << 1)
102 #define ADXL362_STATUS_DATA_RDY (1 << 0)
103 
104 /* ADXL362_REG_ACT_INACT_CTL definitions */
105 #define ADXL362_ACT_INACT_CTL_LINKLOOP(x) (((x) & 0x3) << 4)
106 #define ADXL362_ACT_INACT_CTL_INACT_REF (1 << 3)
107 #define ADXL362_ACT_INACT_CTL_INACT_EN (1 << 2)
108 #define ADXL362_ACT_INACT_CTL_ACT_REF (1 << 1)
109 #define ADXL362_ACT_INACT_CTL_ACT_EN (1 << 0)
110 
111 /* ADXL362_ACT_INACT_CTL_LINKLOOP(x) options */
112 #define ADXL362_MODE_DEFAULT 0
113 #define ADXL362_MODE_LINK 1
114 #define ADXL362_MODE_LOOP 3
115 
116 /* ADXL362_REG_FIFO_CTL */
117 #define ADXL362_FIFO_CTL_AH (1 << 3)
118 #define ADXL362_FIFO_CTL_FIFO_TEMP (1 << 2)
119 #define ADXL362_FIFO_CTL_FIFO_MODE(x) (((x) & 0x3) << 0)
120 
121 /* ADXL362_FIFO_CTL_FIFO_MODE(x) options */
122 #define ADXL362_FIFO_DISABLE 0
123 #define ADXL362_FIFO_OLDEST_SAVED 1
124 #define ADXL362_FIFO_STREAM 2
125 #define ADXL362_FIFO_TRIGGERED 3
126 
127 /* ADXL362_REG_INTMAP1 */
128 #define ADXL362_INTMAP1_INT_LOW (1 << 7)
129 #define ADXL362_INTMAP1_AWAKE (1 << 6)
130 #define ADXL362_INTMAP1_INACT (1 << 5)
131 #define ADXL362_INTMAP1_ACT (1 << 4)
132 #define ADXL362_INTMAP1_FIFO_OVERRUN (1 << 3)
133 #define ADXL362_INTMAP1_FIFO_WATERMARK (1 << 2)
134 #define ADXL362_INTMAP1_FIFO_READY (1 << 1)
135 #define ADXL362_INTMAP1_DATA_READY (1 << 0)
136 
137 /* ADXL362_REG_INTMAP2 definitions */
138 #define ADXL362_INTMAP2_INT_LOW (1 << 7)
139 #define ADXL362_INTMAP2_AWAKE (1 << 6)
140 #define ADXL362_INTMAP2_INACT (1 << 5)
141 #define ADXL362_INTMAP2_ACT (1 << 4)
142 #define ADXL362_INTMAP2_FIFO_OVERRUN (1 << 3)
143 #define ADXL362_INTMAP2_FIFO_WATERMARK (1 << 2)
144 #define ADXL362_INTMAP2_FIFO_READY (1 << 1)
145 #define ADXL362_INTMAP2_DATA_READY (1 << 0)
146 
147 /* ADXL362_REG_FILTER_CTL definitions */
148 #define ADXL362_FILTER_CTL_RANGE(x) (((x) & 0x3) << 6)
149 #define ADXL362_FILTER_CTL_RES (1 << 5)
150 #define ADXL362_FILTER_CTL_HALF_BW (1 << 4)
151 #define ADXL362_FILTER_CTL_EXT_SAMPLE (1 << 3)
152 #define ADXL362_FILTER_CTL_ODR(x) (((x) & 0x7) << 0)
153 
154 /* ADXL362_FILTER_CTL_RANGE(x) options */
155 #define ADXL362_RANGE_2G 0 /* +/-2 g */
156 #define ADXL362_RANGE_4G 1 /* +/-4 g */
157 #define ADXL362_RANGE_8G 2 /* +/-8 g */
158 
159 /* ADXL362_FILTER_CTL_ODR(x) options */
160 #define ADXL362_ODR_12_5_HZ 0 /* 12.5 Hz */
161 #define ADXL362_ODR_25_HZ 1 /* 25 Hz */
162 #define ADXL362_ODR_50_HZ 2 /* 50 Hz */
163 #define ADXL362_ODR_100_HZ 3 /* 100 Hz */
164 #define ADXL362_ODR_200_HZ 4 /* 200 Hz */
165 #define ADXL362_ODR_400_HZ 5 /* 400 Hz */
166 
167 /* ADXL362_REG_POWER_CTL definitions */
168 #define ADXL362_POWER_CTL_RES (1 << 7)
169 #define ADXL362_POWER_CTL_EXT_CLK (1 << 6)
170 #define ADXL362_POWER_CTL_LOW_NOISE(x) (((x) & 0x3) << 4)
171 #define ADXL362_POWER_CTL_WAKEUP (1 << 3)
172 #define ADXL362_POWER_CTL_AUTOSLEEP (1 << 2)
173 #define ADXL362_POWER_CTL_MEASURE(x) (((x) & 0x3) << 0)
174 
175 /* ADXL362_POWER_CTL_LOW_NOISE(x) options */
176 #define ADXL362_NOISE_MODE_NORMAL 0
177 #define ADXL362_NOISE_MODE_LOW 1
178 #define ADXL362_NOISE_MODE_ULTRALOW 2
179 
180 /* ADXL362_POWER_CTL_MEASURE(x) options */
181 #define ADXL362_MEASURE_STANDBY 0
182 #define ADXL362_MEASURE_ON 2
183 
184 /* ADXL362_REG_SELF_TEST */
185 #define ADXL362_SELF_TEST_ST (1 << 0)
186 
187 /* ADXL362 device information */
188 #define ADXL362_DEVICE_AD 0xAD
189 #define ADXL362_DEVICE_MST 0x1D
190 #define ADXL362_PART_ID 0xF2
191 
192 /* ADXL362 Reset settings */
193 #define ADXL362_RESET_KEY 0x52
194 
195 /******************************************************************************/
196 /*************************** Types Declarations *******************************/
197 /******************************************************************************/
198 
203 struct adxl362_dev {
207  uint8_t selected_range;
208 };
209 
217 };
218 
219 /******************************************************************************/
220 /************************ Functions Declarations ******************************/
221 /******************************************************************************/
222 
224 int32_t adxl362_init(struct adxl362_dev **device,
226 
228 int32_t adxl362_remove(struct adxl362_dev *dev);
229 
231 void adxl362_set_register_value(struct adxl362_dev *dev,
232  uint16_t register_value,
233  uint8_t register_address,
234  uint8_t bytes_number);
235 
237 void adxl362_get_register_value(struct adxl362_dev *dev,
238  uint8_t *read_data,
239  uint8_t register_address,
240  uint8_t bytes_number);
241 
243 void adxl362_get_fifo_value(struct adxl362_dev *dev,
244  uint8_t *buffer,
245  uint16_t bytes_number);
246 
248 void adxl362_software_reset(struct adxl362_dev *dev);
249 
251 void adxl362_set_power_mode(struct adxl362_dev *dev,
252  uint8_t pwr_mode);
253 
255 void adxl362_set_range(struct adxl362_dev *dev,
256  uint8_t g_range);
257 
259 void adxl362_set_output_rate(struct adxl362_dev *dev,
260  uint8_t out_rate);
261 
263 void adxl362_get_xyz(struct adxl362_dev *dev,
264  int16_t *x,
265  int16_t *y,
266  int16_t *z);
267 
269 void adxl362_get_g_xyz(struct adxl362_dev *dev,
270  float* x,
271  float* y,
272  float* z);
273 
275 float adxl362_read_temperature(struct adxl362_dev *dev);
276 
278 void adxl362_fifo_setup(struct adxl362_dev *dev,
279  uint8_t mode,
280  uint16_t water_mark_lvl,
281  uint8_t en_temp_read);
282 
285  uint8_t ref_or_abs,
286  uint16_t threshold,
287  uint8_t time);
288 
291  uint8_t ref_or_abs,
292  uint16_t threshold,
293  uint16_t time);
294 
295 #endif /* __ADXL362_H__ */
iio_adxl355_trigger_init
int iio_adxl355_trigger_init(struct adxl355_iio_trig **iio_trig, struct adxl355_iio_trig_init_param *init_param)
Initialize ADXL355 device trigger.
Definition: iio_adxl355_trig.c:148
adxl355_iio_trig::name
char name[TRIG_MAX_NAME_SIZE+1]
Definition: iio_adxl355.h:74
adxl355_iio_trigger_desc
struct iio_trigger adxl355_iio_trigger_desc
Definition: iio_adxl355_trig.c:62
END_ATTRIBUTES_ARRAY
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:108
adxl362_software_reset
void adxl362_software_reset(struct adxl362_dev *dev)
Resets the device via SPI communication bus.
Definition: adxl362.c:194
ADXL362_REG_TEMP_L
#define ADXL362_REG_TEMP_L
Definition: adxl362.h:75
ADXL362_REG_THRESH_ACT_L
#define ADXL362_REG_THRESH_ACT_L
Definition: adxl362.h:78
adxl362_fifo_setup
void adxl362_fifo_setup(struct adxl362_dev *dev, uint8_t mode, uint16_t water_mark_lvl, uint8_t en_temp_read)
Configures the FIFO feature.
Definition: adxl362.c:388
adxl362_setup_activity_detection
void adxl362_setup_activity_detection(struct adxl362_dev *dev, uint8_t ref_or_abs, uint16_t threshold, uint8_t time)
Configures activity detection.
Definition: adxl362.c:423
no_os_spi_write_and_read
int32_t no_os_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI.
Definition: no_os_spi.c:82
ADXL362_POWER_CTL_MEASURE
#define ADXL362_POWER_CTL_MEASURE(x)
Definition: adxl362.h:173
adxl362_dev
ADXL362 Device structure.
Definition: adxl362.h:203
no_os_callback_desc
Structure describing a callback to be registered.
Definition: no_os_irq.h:133
adxl362_read_temperature
float adxl362_read_temperature(struct adxl362_dev *dev)
Reads the temperature of the device.
Definition: adxl362.c:355
iio_adxl355_trigger_remove
void iio_adxl355_trigger_remove(struct adxl355_iio_trig *trig)
Free the resources allocated by iio_adxl355_trigger_init().
Definition: iio_adxl355_trig.c:227
no_os_spi.h
Header file of SPI Interface.
ADXL362_MEASURE_ON
#define ADXL362_MEASURE_ON
Definition: adxl362.h:182
no_os_irq_register_callback
int32_t no_os_irq_register_callback(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *callback_desc)
Register a callback to handle the irq events.
Definition: no_os_irq.c:82
ADXL362_REG_THRESH_INACT_L
#define ADXL362_REG_THRESH_INACT_L
Definition: adxl362.h:81
adxl362_dev::spi_desc
no_os_spi_desc * spi_desc
Definition: adxl362.h:205
iio_ch_info
Structure holding channel attributess.
Definition: iio_types.h:95
adxl355_iio_trig::iio_desc
struct iio_desc ** iio_desc
Definition: iio_adxl355.h:71
ADXL362_WRITE_FIFO
#define ADXL362_WRITE_FIFO
Definition: adxl362.h:56
adxl355_iio_trig_init_param
Definition: iio_adxl355.h:77
ADXL362_ACT_INACT_CTL_INACT_EN
#define ADXL362_ACT_INACT_CTL_INACT_EN
Definition: adxl362.h:107
device
Definition: ad9361_util.h:75
adxl355_iio_software_trigger_desc
struct iio_trigger adxl355_iio_software_trigger_desc
Definition: iio_adxl355_trig.c:76
adxl362_set_output_rate
void adxl362_set_output_rate(struct adxl362_dev *dev, uint8_t out_rate)
Selects the Output Data Rate of the device.
Definition: adxl362.c:275
adxl362_set_register_value
void adxl362_set_register_value(struct adxl362_dev *dev, uint16_t register_value, uint8_t register_address, uint8_t bytes_number)
Writes data into a register.
Definition: adxl362.c:114
adxl362_get_xyz
void adxl362_get_xyz(struct adxl362_dev *dev, int16_t *x, int16_t *y, int16_t *z)
Reads the 3-axis raw data from the accelerometer.
Definition: adxl362.c:303
adxl362_get_xyz
void adxl362_get_xyz(struct adxl362_dev *dev, int16_t *x, int16_t *y, int16_t *z)
Reads the 3-axis raw data from the accelerometer.
Definition: adxl362.c:303
ADXL362_RESET_KEY
#define ADXL362_RESET_KEY
Definition: adxl362.h:193
ADXL362_FIFO_CTL_FIFO_TEMP
#define ADXL362_FIFO_CTL_FIFO_TEMP
Definition: adxl362.h:118
adxl362_init_param::spi_init
no_os_spi_init_param spi_init
Definition: adxl362.h:216
adxl362_get_g_xyz
void adxl362_get_g_xyz(struct adxl362_dev *dev, float *x, float *y, float *z)
Reads the 3-axis raw data from the accelerometer and converts it to g.
Definition: adxl362.c:329
ADXL362_PART_ID
#define ADXL362_PART_ID
Definition: adxl362.h:190
iio.h
Header file of iio.
no_os_error.h
Error codes definition.
ADXL362_FILTER_CTL_RANGE
#define ADXL362_FILTER_CTL_RANGE(x)
Definition: adxl362.h:148
adxl355_iio_trig::irq_init_param
struct no_os_irq_init_param * irq_init_param
Definition: iio_adxl355.h:73
iio_attribute::name
const char * name
Definition: iio_types.h:134
ADXL362_REG_POWER_CTL
#define ADXL362_REG_POWER_CTL
Definition: adxl362.h:91
TRIG_MAX_NAME_SIZE
#define TRIG_MAX_NAME_SIZE
Definition: iio_trigger.h:53
adxl362_get_fifo_value
void adxl362_get_fifo_value(struct adxl362_dev *dev, uint8_t *buffer, uint16_t bytes_number)
Reads multiple bytes from the device's FIFO buffer.
Definition: adxl362.c:169
adxl362_read_temperature
float adxl362_read_temperature(struct adxl362_dev *dev)
Reads the temperature of the device.
Definition: adxl362.c:355
ADXL362_REG_FIFO_CTL
#define ADXL362_REG_FIFO_CTL
Definition: adxl362.h:86
adxl355_iio_trig
Definition: iio_adxl355.h:70
adxl362_init_param
Structure holding the parameters for ADXL362 device initialization.
Definition: adxl362.h:214
ADXL362_ACT_INACT_CTL_ACT_EN
#define ADXL362_ACT_INACT_CTL_ACT_EN
Definition: adxl362.h:109
no_os_irq_init_param::irq_ctrl_id
uint32_t irq_ctrl_id
Definition: no_os_irq.h:102
iio_attribute
Structure holding pointers to show and store functions.
Definition: iio_types.h:132
ADXL362_REG_SOFT_RESET
#define ADXL362_REG_SOFT_RESET
Definition: adxl362.h:77
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:132
iio_adxl355.h
Header file of IIO ADXL355 Driver.
adxl362_get_register_value
void adxl362_get_register_value(struct adxl362_dev *dev, uint8_t *read_data, uint8_t register_address, uint8_t bytes_number)
Performs a burst read of a specified number of registers.
Definition: adxl362.c:140
no_os_callback_desc::callback
void(* callback)(void *context)
Definition: no_os_irq.h:135
adxl355_iio_trig::irq_ctrl
struct no_os_irq_ctrl_desc * irq_ctrl
Definition: iio_adxl355.h:72
ADXL362_REG_ACT_INACT_CTL
#define ADXL362_REG_ACT_INACT_CTL
Definition: adxl362.h:85
adxl362_set_register_value
void adxl362_set_register_value(struct adxl362_dev *dev, uint16_t register_value, uint8_t register_address, uint8_t bytes_number)
Writes data into a register.
Definition: adxl362.c:114
adxl362_get_register_value
void adxl362_get_register_value(struct adxl362_dev *dev, uint8_t *read_data, uint8_t register_address, uint8_t bytes_number)
Performs a burst read of a specified number of registers.
Definition: adxl362.c:140
adxl362_init
int32_t adxl362_init(struct adxl362_dev **device, struct adxl362_init_param init_param)
Initializes communication with the device and checks if the part is present by reading the device id.
Definition: adxl362.c:61
iio_process_trigger_type
int iio_process_trigger_type(struct iio_desc *desc, char *trigger_name)
Searches for trigger name and processes the trigger based on its type (sync or async with the interru...
Definition: iio.c:994
adxl362_dev::selected_range
uint8_t selected_range
Definition: adxl362.h:207
adxl362_get_g_xyz
void adxl362_get_g_xyz(struct adxl362_dev *dev, float *x, float *y, float *z)
Reads the 3-axis raw data from the accelerometer and converts it to g.
Definition: adxl362.c:329
ADXL362_REG_PARTID
#define ADXL362_REG_PARTID
Definition: adxl362.h:61
adxl355_iio_sw_trig_init_param
Definition: iio_adxl355.h:84
ADXL362_FIFO_CTL_FIFO_MODE
#define ADXL362_FIFO_CTL_FIFO_MODE(x)
Definition: adxl362.h:119
iio_adxl355_software_trigger_init
int iio_adxl355_software_trigger_init(struct adxl355_iio_trig **iio_trig, struct adxl355_iio_sw_trig_init_param *init_param)
Initialize ADXL355 software trigger.
Definition: iio_adxl355_trig.c:201
adxl362_fifo_setup
void adxl362_fifo_setup(struct adxl362_dev *dev, uint8_t mode, uint16_t water_mark_lvl, uint8_t en_temp_read)
Configures the FIFO feature.
Definition: adxl362.c:388
iio_trigger
Definition: iio_types.h:225
adxl362_get_fifo_value
void adxl362_get_fifo_value(struct adxl362_dev *dev, uint8_t *buffer, uint16_t bytes_number)
Reads multiple bytes from the device's FIFO buffer.
Definition: adxl362.c:169
no_os_irq_ctrl_desc::irq_ctrl_id
uint32_t irq_ctrl_id
Definition: no_os_irq.h:118
adxl362_setup_inactivity_detection
void adxl362_setup_inactivity_detection(struct adxl362_dev *dev, uint8_t ref_or_abs, uint16_t threshold, uint16_t time)
Configures inactivity detection.
Definition: adxl362.c:470
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:96
adxl362_setup_activity_detection
void adxl362_setup_activity_detection(struct adxl362_dev *dev, uint8_t ref_or_abs, uint16_t threshold, uint8_t time)
Configures activity detection.
Definition: adxl362.c:423
NO_OS_EVT_GPIO
@ NO_OS_EVT_GPIO
Definition: no_os_irq.h:68
adxl362_set_range
void adxl362_set_range(struct adxl362_dev *dev, uint8_t g_range)
Selects the measurement range.
Definition: adxl362.c:242
NO_OS_IRQ_EDGE_RISING
@ NO_OS_IRQ_EDGE_RISING
Definition: no_os_irq.h:79
adxl362_set_output_rate
void adxl362_set_output_rate(struct adxl362_dev *dev, uint8_t out_rate)
Selects the Output Data Rate of the device.
Definition: adxl362.c:275
ADXL362_REG_TIME_INACT_L
#define ADXL362_REG_TIME_INACT_L
Definition: adxl362.h:83
adxl362_init
int32_t adxl362_init(struct adxl362_dev **device, struct adxl362_init_param init_param)
Initializes communication with the device and checks if the part is present by reading the device id.
Definition: adxl362.c:61
adxl362_set_power_mode
void adxl362_set_power_mode(struct adxl362_dev *dev, uint8_t pwr_mode)
Places the device into standby/measure mode.
Definition: adxl362.c:212
ADXL362_WRITE_REG
#define ADXL362_WRITE_REG
Definition: adxl362.h:54
adxl362_remove
int32_t adxl362_remove(struct adxl362_dev *dev)
Free the resources allocated by adxl362_init().
Definition: adxl362.c:93
no_os_spi_remove
int32_t no_os_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: no_os_spi.c:70
no_os_irq_enable
int32_t no_os_irq_enable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Enable specific interrupt.
Definition: no_os_irq.c:144
adxl362.h
Header file of ADXL362 Driver.
adxl362_set_power_mode
void adxl362_set_power_mode(struct adxl362_dev *dev, uint8_t pwr_mode)
Places the device into standby/measure mode.
Definition: adxl362.c:212
NO_OS_GPIO_IRQ
@ NO_OS_GPIO_IRQ
Definition: no_os_irq.h:84
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
ADXL362_REG_FIFO_SAMPLES
#define ADXL362_REG_FIFO_SAMPLES
Definition: adxl362.h:87
iio_trigger::is_synchronous
bool is_synchronous
Definition: iio_types.h:228
ADXL362_REG_FILTER_CTL
#define ADXL362_REG_FILTER_CTL
Definition: adxl362.h:90
adxl362_setup_inactivity_detection
void adxl362_setup_inactivity_detection(struct adxl362_dev *dev, uint8_t ref_or_abs, uint16_t threshold, uint16_t time)
Configures inactivity detection.
Definition: adxl362.c:470
ADXL362_ACT_INACT_CTL_ACT_REF
#define ADXL362_ACT_INACT_CTL_ACT_REF
Definition: adxl362.h:108
adxl362_set_range
void adxl362_set_range(struct adxl362_dev *dev, uint8_t g_range)
Selects the measurement range.
Definition: adxl362.c:242
adxl362_software_reset
void adxl362_software_reset(struct adxl362_dev *dev)
Resets the device via SPI communication bus.
Definition: adxl362.c:194
ADXL362_FILTER_CTL_ODR
#define ADXL362_FILTER_CTL_ODR(x)
Definition: adxl362.h:152
no_os_irq_trigger_level_set
int32_t no_os_irq_trigger_level_set(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, enum no_os_irq_trig_level trig)
Set interrupt trigger level.
Definition: no_os_irq.c:128
no_os_irq_disable
int32_t no_os_irq_disable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Disable specific interrupt.
Definition: no_os_irq.c:155
ADXL362_READ_REG
#define ADXL362_READ_REG
Definition: adxl362.h:55
adxl362_remove
int32_t adxl362_remove(struct adxl362_dev *dev)
Free the resources allocated by adxl362_init().
Definition: adxl362.c:93
ADXL362_REG_TIME_ACT
#define ADXL362_REG_TIME_ACT
Definition: adxl362.h:80
ADXL362_ACT_INACT_CTL_INACT_REF
#define ADXL362_ACT_INACT_CTL_INACT_REF
Definition: adxl362.h:106
ADXL362_REG_XDATA_L
#define ADXL362_REG_XDATA_L
Definition: adxl362.h:69
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:112