Go to the documentation of this file.
55 #define ADXL355_SPI_READ 0x01
56 #define ADXL355_SPI_WRITE 0x00
57 #define ADXL355_ADDR(x) ((x) & 0xFF)
58 #define GET_ADXL355_TRANSF_LEN(x) (((x) >> 8) & 0x0000FF)
59 #define SET_ADXL355_TRANSF_LEN(x) (((x) << 8) & 0x00FF00)
60 #define GET_ADXL355_RESET_VAL(x) (((x) >> 16) & 0x0000FF)
61 #define SET_ADXL355_RESET_VAL(x) (((x) << 16) & 0xFF0000)
64 #define ADXL355_DEVID_AD (ADXL355_ADDR(0x00) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0xAD))
65 #define ADXL355_DEVID_MST (ADXL355_ADDR(0x01) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x1D))
66 #define ADXL355_PARTID (ADXL355_ADDR(0x02) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0xED))
67 #define ADXL359_PARTID (ADXL355_ADDR(0x02) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0xE9))
68 #define ADXL355_REVID (ADXL355_ADDR(0x03) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x01))
69 #define ADXL355_STATUS (ADXL355_ADDR(0x04) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x00))
70 #define ADXL355_FIFO_ENTRIES (ADXL355_ADDR(0x05) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x00))
71 #define ADXL355_TEMP (ADXL355_ADDR(0x06) | SET_ADXL355_TRANSF_LEN(2))
72 #define ADXL355_XDATA (ADXL355_ADDR(0x08) | SET_ADXL355_TRANSF_LEN(3))
73 #define ADXL355_YDATA (ADXL355_ADDR(0x0B) | SET_ADXL355_TRANSF_LEN(3))
74 #define ADXL355_ZDATA (ADXL355_ADDR(0x0E) | SET_ADXL355_TRANSF_LEN(3))
75 #define ADXL355_FIFO_DATA (ADXL355_ADDR(0x11) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x00))
76 #define ADXL355_OFFSET_X (ADXL355_ADDR(0x1E) | SET_ADXL355_TRANSF_LEN(2))
77 #define ADXL355_OFFSET_Y (ADXL355_ADDR(0x20) | SET_ADXL355_TRANSF_LEN(2))
78 #define ADXL355_OFFSET_Z (ADXL355_ADDR(0x22) | SET_ADXL355_TRANSF_LEN(2))
79 #define ADXL355_ACT_EN (ADXL355_ADDR(0x24) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x00))
80 #define ADXL355_ACT_THRESH (ADXL355_ADDR(0x25) | SET_ADXL355_TRANSF_LEN(2))
81 #define ADXL355_ACT_CNT (ADXL355_ADDR(0x27) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x01))
82 #define ADXL355_FILTER (ADXL355_ADDR(0x28) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x00))
83 #define ADXL355_FIFO_SAMPLES (ADXL355_ADDR(0x29) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x60))
84 #define ADXL355_INT_MAP (ADXL355_ADDR(0x2A) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x00))
85 #define ADXL355_SYNC (ADXL355_ADDR(0x2B) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x00))
86 #define ADXL355_RANGE (ADXL355_ADDR(0x2C) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x81))
87 #define ADXL355_POWER_CTL (ADXL355_ADDR(0x2D) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x01))
88 #define ADXL355_SELF_TEST (ADXL355_ADDR(0x2E) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x00))
89 #define ADXL355_RESET (ADXL355_ADDR(0x2F) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x00))
91 #define ADXL355_SHADOW_REGISTER_BASE_ADDR (ADXL355_ADDR(0x50) | SET_ADXL355_TRANSF_LEN(5))
92 #define ADXL355_MAX_FIFO_SAMPLES_VAL 0x60
93 #define ADXL355_SELF_TEST_TRIGGER_VAL 0x03
94 #define ADXL355_RESET_CODE 0x52
102 #define ADXL355_ACC_SCALE_FACTOR_MUL (int64_t) 38245
103 #define ADXL355_ACC_SCALE_FACTOR_DIV (int32_t)1000000000
111 #define ADXL359_ACC_SCALE_FACTOR_MUL (int64_t) 191229
112 #define ADXL359_ACC_SCALE_FACTOR_DIV (int32_t)1000000000
123 #define ADXL355_TEMP_OFFSET -211125
124 #define ADXL355_TEMP_OFFSET_DIV 100
130 #define ADXL355_TEMP_SCALE_FACTOR -110497238
131 #define ADXL355_TEMP_SCALE_FACTOR_DIV 1000000
142 #define ADXL359_TEMP_OFFSET -207825
143 #define ADXL359_TEMP_OFFSET_DIV 100
149 #define ADXL359_TEMP_SCALE_FACTOR -110497238
150 #define ADXL359_TEMP_SCALE_FACTOR_DIV 1000000
152 #define ADXL355_NEG_ACC_MSK NO_OS_GENMASK(31, 20)
153 #define ADXL355_RANGE_FIELD_MSK NO_OS_GENMASK( 1, 0)
154 #define ADXL355_ODR_LPF_FIELD_MSK NO_OS_GENMASK( 3, 0)
155 #define ADXL355_HPF_FIELD_MSK NO_OS_GENMASK( 6, 4)
156 #define ADXL355_INT_POL_FIELD_MSK NO_OS_BIT(6)
356 uint16_t y_offset, uint16_t z_offset);
360 uint32_t *raw_y, uint32_t *raw_z);
384 uint32_t *raw_x, uint32_t *raw_y, uint32_t *raw_z);
int adxl355_config_int_pins(struct adxl355_dev *dev, union adxl355_int_mask int_conf)
Configures the interrupt map for INT1 and INT2 pins.
Definition: adxl355.c:873
#define ADXL355_FIFO_ENTRIES
Definition: adxl355.h:70
int adxl355_get_fifo_data(struct adxl355_dev *dev, uint8_t *fifo_entries, struct adxl355_frac_repr *x, struct adxl355_frac_repr *y, struct adxl355_frac_repr *z)
Reads fifo data and returns the values converted in m/s^2.
Definition: adxl355.c:773
int adxl355_write_device_data(struct adxl355_dev *dev, uint8_t base_address, uint16_t size, uint8_t *write_data)
Writes to the device.
Definition: adxl355.c:113
uint8_t ACT_X
Definition: adxl355.h:272
Structure holding the parameters for ADXL355 device initialization.
Definition: adxl355.h:232
adxl355_hpf_corner
Definition: adxl355.h:183
int adxl355_get_temp(struct adxl355_dev *dev, struct adxl355_frac_repr *temp)
Reads the raw temperature data and converts it to millidegrees Celsius.
Definition: adxl355.c:631
int adxl355_get_raw_temp(struct adxl355_dev *dev, uint16_t *raw_temp)
Reads the raw temperature.
Definition: adxl355.c:607
#define ADXL355_ACC_SCALE_FACTOR_DIV
Definition: adxl355.h:103
uint16_t y_offset
Definition: adxl355.h:311
uint8_t ACT_EN2
Definition: adxl355.h:249
#define ADXL355_ACT_EN
Definition: adxl355.h:79
int64_t no_os_div_s64_rem(int64_t dividend, int32_t divisor, int32_t *remainder)
int adxl355_get_fifo_data(struct adxl355_dev *dev, uint8_t *fifo_entries, struct adxl355_frac_repr *x, struct adxl355_frac_repr *y, struct adxl355_frac_repr *z)
Reads fifo data and returns the values converted in m/s^2.
Definition: adxl355.c:773
#define ADXL355_FILTER
Definition: adxl355.h:82
struct _adxl355_int_mask fields
Definition: adxl355.h:253
int32_t no_os_i2c_write(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C Write data to slave device.
Definition: no_os_i2c.c:97
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
int adxl355_set_odr_lpf(struct adxl355_dev *dev, enum adxl355_odr_lpf odr_lpf_val)
Writes the low-pass filter settings.
Definition: adxl355.c:392
@ ADXL355_ODR_500HZ
Definition: adxl355.h:197
#define GET_ADXL355_RESET_VAL(x)
Definition: adxl355.h:60
int adxl355_get_raw_fifo_data(struct adxl355_dev *dev, uint8_t *fifo_entries, uint32_t *raw_x, uint32_t *raw_y, uint32_t *raw_z)
Reads fifo data and returns the raw values.
Definition: adxl355.c:731
int adxl355_get_raw_temp(struct adxl355_dev *dev, uint16_t *raw_temp)
Reads the raw temperature.
Definition: adxl355.c:607
#define ADXL355_OFFSET_Z
Definition: adxl355.h:78
int adxl355_get_sts_reg(struct adxl355_dev *dev, union adxl355_sts_reg_flags *status_flags)
Reads the status register value.
Definition: adxl355.c:667
#define NO_OS_GENMASK(h, l)
Definition: no_os_util.h:86
Definition: adxl355.h:266
adxl355_type
Definition: adxl355.h:161
#define ADXL355_INT_MAP
Definition: adxl355.h:84
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:95
union adxl355_act_en_flags act_en
Definition: adxl355.h:314
@ ADXL355_HPF_24_7
Definition: adxl355.h:185
int adxl355_set_act_cnt_reg(struct adxl355_dev *dev, uint8_t act_cnt)
Writes the activity count register value.
Definition: adxl355.c:854
#define ADXL355_SELF_TEST_TRIGGER_VAL
Definition: adxl355.h:93
uint8_t FIFO_FULL
Definition: adxl355.h:259
int adxl355_soft_reset(struct adxl355_dev *dev)
Performs a soft reset of the device.
Definition: adxl355.c:300
uint16_t z_offset
Definition: adxl355.h:312
Header file of SPI Interface.
uint8_t FIFO_OVR
Definition: adxl355.h:260
int adxl355_conf_act_en(struct adxl355_dev *dev, union adxl355_act_en_flags act_config)
Configures the activity enable register.
Definition: adxl355.c:809
uint8_t FULL_EN1
Definition: adxl355.h:243
int adxl355_get_raw_xyz(struct adxl355_dev *dev, uint32_t *raw_x, uint32_t *raw_y, uint32_t *raw_z)
Reads the raw output data.
Definition: adxl355.c:538
int adxl355_get_sts_reg(struct adxl355_dev *dev, union adxl355_sts_reg_flags *status_flags)
Reads the status register value.
Definition: adxl355.c:667
#define ADXL355_HPF_FIELD_MSK
Definition: adxl355.h:155
#define ADXL355_TEMP_OFFSET
Definition: adxl355.h:123
struct no_os_i2c_init_param i2c_init
Definition: adxl355.h:223
@ ADXL355_ODR_7_813HZ
Definition: adxl355.h:203
@ ADXL355_INT_ACTIVE_LOW
Definition: adxl355.h:217
int32_t no_os_i2c_remove(struct no_os_i2c_desc *desc)
Free the resources allocated by no_os_i2c_init().
Definition: no_os_i2c.c:76
#define ADXL355_PARTID
Definition: adxl355.h:66
union adxl355_comm_init_param comm_init
Definition: adxl355.h:234
@ ADXL355_ODR_2000HZ
Definition: adxl355.h:195
int adxl355_get_raw_xyz(struct adxl355_dev *dev, uint32_t *raw_x, uint32_t *raw_y, uint32_t *raw_z)
Reads the raw output data.
Definition: adxl355.c:538
@ ADXL355_ODR_250HZ
Definition: adxl355.h:198
#define ADXL355_POWER_CTL
Definition: adxl355.h:87
Header file of Delay functions.
enum adxl355_odr_lpf odr_lpf
Definition: adxl355.h:307
int adxl355_get_nb_of_fifo_entries(struct adxl355_dev *dev, uint8_t *reg_value)
Reads the number of FIFO entries register value.
Definition: adxl355.c:690
@ ADXL355_HPF_0_3862
Definition: adxl355.h:188
int adxl355_set_self_test(struct adxl355_dev *dev)
Triggers the self-test feature.
Definition: adxl355.c:345
adxl355_op_mode
Definition: adxl355.h:167
uint8_t RDY_EN1
Definition: adxl355.h:242
@ ADXL355_HPF_0_0238
Definition: adxl355.h:190
uint8_t value
Definition: adxl355.h:280
#define ADXL355_STATUS
Definition: adxl355.h:69
enum adxl355_comm_type comm_type
Definition: adxl355.h:236
Definition: ad9361_util.h:75
Header file of ADXL355 Driver.
int adxl355_soft_reset(struct adxl355_dev *dev)
Performs a soft reset of the device.
Definition: adxl355.c:300
#define ADXL359_TEMP_SCALE_FACTOR
Definition: adxl355.h:149
#define ADXL355_SELF_TEST
Definition: adxl355.h:88
int adxl355_remove(struct adxl355_dev *dev)
Free the resources allocated by adxl355_init().
Definition: adxl355.c:236
adxl355_range
Definition: adxl355.h:207
@ ADXL355_STDBY_TEMP_ON_DRDY_OFF
Definition: adxl355.h:173
int adxl355_get_op_mode(struct adxl355_dev *dev, enum adxl355_op_mode *read_op_mode)
Gets the current operation mode of the device.
Definition: adxl355.c:279
void * no_os_calloc(size_t nitems, size_t size)
Definition: adxl355.h:271
uint8_t Activity
Definition: adxl355.h:261
union adxl355_comm_desc com_desc
Definition: adxl355.h:303
@ ADXL355_ODR_4000HZ
Definition: adxl355.h:194
int64_t integer
Definition: adxl355.h:284
#define ADXL359_PARTID
Definition: adxl355.h:67
int adxl355_config_int_pins(struct adxl355_dev *dev, union adxl355_int_mask int_conf)
Configures the interrupt map for INT1 and INT2 pins.
Definition: adxl355.c:873
#define ADXL355_ODR_LPF_FIELD_MSK
Definition: adxl355.h:154
@ ADXL355_ODR_1000HZ
Definition: adxl355.h:196
uint8_t RDY_EN2
Definition: adxl355.h:246
#define GET_ADXL355_TRANSF_LEN(x)
Definition: adxl355.h:58
int adxl355_get_xyz(struct adxl355_dev *dev, struct adxl355_frac_repr *x, struct adxl355_frac_repr *y, struct adxl355_frac_repr *z)
Reads the raw output data of each axis and converts it to g.
Definition: adxl355.c:577
int adxl355_set_int_pol(struct adxl355_dev *dev, enum adxl355_int_pol int_pol)
Sets the interrupt polarity.
Definition: adxl355.c:890
ADXL355 Device structure.
Definition: adxl355.h:299
int adxl355_set_self_test(struct adxl355_dev *dev)
Triggers the self-test feature.
Definition: adxl355.c:345
#define ADXL355_SHADOW_REGISTER_BASE_ADDR
Definition: adxl355.h:91
#define ADXL355_TEMP
Definition: adxl355.h:71
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:132
@ ADXL355_MEAS_TEMP_OFF_DRDY_ON
Definition: adxl355.h:170
int adxl355_set_offset(struct adxl355_dev *dev, uint16_t x_offset, uint16_t y_offset, uint16_t z_offset)
Sets an offset value for each axis (Offset Calibration).
Definition: adxl355.c:495
#define ADXL355_XDATA
Definition: adxl355.h:72
Definition: adxl355.h:221
int adxl355_remove(struct adxl355_dev *dev)
Free the resources allocated by adxl355_init().
Definition: adxl355.c:236
#define ADXL355_ACT_CNT
Definition: adxl355.h:81
#define ADXL359_TEMP_OFFSET_DIV
Definition: adxl355.h:143
@ ADXL355_INT_ACTIVE_HIGH
Definition: adxl355.h:218
#define ADXL355_ZDATA
Definition: adxl355.h:74
int adxl355_set_offset(struct adxl355_dev *dev, uint16_t x_offset, uint16_t y_offset, uint16_t z_offset)
Sets an offset value for each axis (Offset Calibration).
Definition: adxl355.c:495
uint8_t DATA_RDY
Definition: adxl355.h:258
#define ADXL355_FIFO_SAMPLES
Definition: adxl355.h:83
int adxl355_conf_act_en(struct adxl355_dev *dev, union adxl355_act_en_flags act_config)
Configures the activity enable register.
Definition: adxl355.c:809
struct no_os_i2c_desc * i2c_desc
Definition: adxl355.h:290
int adxl355_get_xyz(struct adxl355_dev *dev, struct adxl355_frac_repr *x, struct adxl355_frac_repr *y, struct adxl355_frac_repr *z)
Reads the raw output data of each axis and converts it to g.
Definition: adxl355.c:577
uint8_t OVR_EN2
Definition: adxl355.h:248
@ ADXL355_ODR_62_5HZ
Definition: adxl355.h:200
uint8_t ACT_EN1
Definition: adxl355.h:245
uint16_t act_thr
Definition: adxl355.h:316
uint32_t no_os_get_unaligned_be24(uint8_t *buf)
#define ADXL355_YDATA
Definition: adxl355.h:73
Definition: adxl355.h:241
enum adxl355_type dev_type
Definition: adxl355.h:301
@ ADXL355_ODR_15_625HZ
Definition: adxl355.h:202
#define ADXL355_ADDR(x)
Definition: adxl355.h:57
@ ADXL355_MEAS_TEMP_OFF_DRDY_OFF
Definition: adxl355.h:174
adxl355_int_pol
Definition: adxl355.h:216
uint8_t reserved
Definition: adxl355.h:275
#define ADXL355_RANGE_FIELD_MSK
Definition: adxl355.h:153
int adxl355_get_op_mode(struct adxl355_dev *dev, enum adxl355_op_mode *op_mode)
Gets the current operation mode of the device.
Definition: adxl355.c:279
@ ADXL355_STDBY_TEMP_OFF_DRDY_ON
Definition: adxl355.h:171
uint8_t FULL_EN2
Definition: adxl355.h:247
#define ADXL355_DEVID_AD
Definition: adxl355.h:64
uint8_t ACT_Z
Definition: adxl355.h:274
Structure holding SPI descriptor.
Definition: no_os_spi.h:143
uint8_t comm_buff[289]
Definition: adxl355.h:317
uint8_t fifo_samples
Definition: adxl355.h:313
#define ADXL359_TEMP_SCALE_FACTOR_DIV
Definition: adxl355.h:150
#define ADXL355_RANGE
Definition: adxl355.h:86
#define ADXL355_TEMP_OFFSET_DIV
Definition: adxl355.h:124
@ ADXL355_HPF_6_2084
Definition: adxl355.h:186
@ ADXL355_ODR_125HZ
Definition: adxl355.h:199
uint8_t act_cnt
Definition: adxl355.h:315
uint8_t ACT_Y
Definition: adxl355.h:273
#define ADXL355_DEVID_MST
Definition: adxl355.h:65
@ ADXL355_STDBY_TEMP_OFF_DRDY_OFF
Definition: adxl355.h:175
enum adxl355_type dev_type
Definition: adxl355.h:238
Definition: adxl355.h:278
#define ADXL355_NEG_ACC_MSK
Definition: adxl355.h:152
#define ADXL355_ACC_SCALE_FACTOR_MUL
Definition: adxl355.h:102
int adxl355_set_fifo_samples(struct adxl355_dev *dev, uint8_t reg_value)
Sets the number of FIFO samples register value.
Definition: adxl355.c:704
@ ADXL359_RANGE_40G
Definition: adxl355.h:213
Structure holding I2C descriptor.
Definition: no_os_i2c.h:81
enum adxl355_op_mode op_mode
Definition: adxl355.h:306
Definition: adxl355.h:283
struct _adxl355_sts_reg_flags fields
Definition: adxl355.h:267
#define ADXL355_FIFO_DATA
Definition: adxl355.h:75
int32_t no_os_i2c_read(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C Read data from slave device.
Definition: no_os_i2c.c:122
int adxl355_conf_act_thr(struct adxl355_dev *dev, uint16_t act_thr)
Configures the activity threshold registers.
Definition: adxl355.c:832
int adxl355_set_int_pol(struct adxl355_dev *dev, enum adxl355_int_pol int_pol)
Sets the interrupt polarity.
Definition: adxl355.c:890
Header file of I2C Interface.
@ ADXL355_I2C_COMM
Definition: adxl355.h:180
int adxl355_set_fifo_samples(struct adxl355_dev *dev, uint8_t reg_value)
Sets the number of FIFO samples register value.
Definition: adxl355.c:704
Definition: adxl355.h:288
uint16_t x_offset
Definition: adxl355.h:310
adxl355_comm_type
Definition: adxl355.h:178
@ ADXL355_ODR_3_906HZ
Definition: adxl355.h:204
#define NO_OS_BIT(x)
Definition: no_os_util.h:51
int adxl355_conf_act_thr(struct adxl355_dev *dev, uint16_t act_thr)
Configures the activity threshold registers.
Definition: adxl355.c:832
int adxl355_set_hpf_corner(struct adxl355_dev *dev, enum adxl355_hpf_corner hpf_corner_val)
Writes the high-pass filter settings.
Definition: adxl355.c:443
#define ADXL359_ACC_SCALE_FACTOR_MUL
Definition: adxl355.h:111
void no_os_free(void *ptr)
int adxl355_get_nb_of_fifo_entries(struct adxl355_dev *dev, uint8_t *reg_value)
Reads the number of FIFO entries register value.
Definition: adxl355.c:690
uint8_t value
Definition: adxl355.h:254
#define ADXL355_MAX_FIFO_SAMPLES_VAL
Definition: adxl355.h:92
uint8_t NVM_BUSY
Definition: adxl355.h:262
#define ADXL355_RESET
Definition: adxl355.h:89
@ ADXL355_MEAS_TEMP_ON_DRDY_OFF
Definition: adxl355.h:172
@ ADXL355_SPI_COMM
Definition: adxl355.h:179
@ ADXL355_RANGE_8G
Definition: adxl355.h:212
uint8_t value
Definition: adxl355.h:268
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
int adxl355_set_hpf_corner(struct adxl355_dev *dev, enum adxl355_hpf_corner hpf_corner_val)
Writes the high-pass filter settings.
Definition: adxl355.c:443
@ ADXL355_STDBY_TEMP_ON_DRDY_ON
Definition: adxl355.h:169
#define ADXL355_OFFSET_X
Definition: adxl355.h:76
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:96
@ ID_ADXL355
Definition: adxl355.h:162
@ ADXL355_MEAS_TEMP_ON_DRDY_ON
Definition: adxl355.h:168
struct _adxl355_act_en_flags fields
Definition: adxl355.h:279
@ ADXL355_HPF_0_0954
Definition: adxl355.h:189
#define ADXL355_TEMP_SCALE_FACTOR_DIV
Definition: adxl355.h:131
@ ID_ADXL357
Definition: adxl355.h:163
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:77
@ ID_ADXL359
Definition: adxl355.h:164
int adxl355_init(struct adxl355_dev **device, struct adxl355_init_param init_param)
Initializes the communication peripheral and checks if the ADXL355 part is present.
Definition: adxl355.c:143
#define ADXL355_TEMP_SCALE_FACTOR
Definition: adxl355.h:130
enum adxl355_hpf_corner hpf_corner
Definition: adxl355.h:308
int adxl355_read_device_data(struct adxl355_dev *dev, uint8_t base_address, uint16_t size, uint8_t *read_data)
Reads from the device.
Definition: adxl355.c:81
enum adxl355_range range
Definition: adxl355.h:309
int adxl355_set_op_mode(struct adxl355_dev *dev, enum adxl355_op_mode op_mode)
Places the device into the given operation mode.
Definition: adxl355.c:258
struct no_os_spi_desc * spi_desc
Definition: adxl355.h:292
struct no_os_spi_init_param spi_init
Definition: adxl355.h:225
@ ADXL359_RANGE_10G
Definition: adxl355.h:209
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
int adxl355_init(struct adxl355_dev **device, struct adxl355_init_param init_param)
Initializes the communication peripheral and checks if the ADXL355 part is present.
Definition: adxl355.c:143
@ ADXL355_RANGE_2G
Definition: adxl355.h:208
uint8_t OVR_EN1
Definition: adxl355.h:244
Definition: adxl355.h:252
#define ADXL359_TEMP_OFFSET
Definition: adxl355.h:142
Definition: adxl355.h:257
Header file of utility functions.
int adxl355_get_temp(struct adxl355_dev *dev, struct adxl355_frac_repr *temp)
Reads the raw temperature data and converts it to millidegrees Celsius.
Definition: adxl355.c:631
int adxl355_set_op_mode(struct adxl355_dev *dev, enum adxl355_op_mode op_mode)
Places the device into the given operation mode.
Definition: adxl355.c:258
#define ADXL355_OFFSET_Y
Definition: adxl355.h:77
#define ADXL355_ACT_THRESH
Definition: adxl355.h:80
#define ADXL355_SPI_WRITE
Definition: adxl355.h:56
int adxl355_set_range(struct adxl355_dev *dev, enum adxl355_range range_val)
Sets the measurement range register value.
Definition: adxl355.c:361
#define ADXL355_RESET_CODE
Definition: adxl355.h:94
int adxl355_set_odr_lpf(struct adxl355_dev *dev, enum adxl355_odr_lpf odr_lpf_val)
Writes the low-pass filter settings.
Definition: adxl355.c:392
@ ADXL355_ODR_31_25HZ
Definition: adxl355.h:201
@ ADXL359_RANGE_20G
Definition: adxl355.h:211
int adxl355_get_raw_fifo_data(struct adxl355_dev *dev, uint8_t *fifo_entries, uint32_t *raw_x, uint32_t *raw_y, uint32_t *raw_z)
Reads fifo data and returns the raw values.
Definition: adxl355.c:731
@ ADXL355_HPF_OFF
Definition: adxl355.h:184
enum adxl355_comm_type comm_type
Definition: adxl355.h:305
uint8_t reserved
Definition: adxl355.h:263
#define ADXL355_INT_POL_FIELD_MSK
Definition: adxl355.h:156
@ ADXL355_RANGE_4G
Definition: adxl355.h:210
Error macro definition for ARM Compiler.
int32_t fractional
Definition: adxl355.h:285
#define ADXL355_SPI_READ
Definition: adxl355.h:55
int adxl355_set_act_cnt_reg(struct adxl355_dev *dev, uint8_t act_cnt)
Writes the activity count register value.
Definition: adxl355.c:854
adxl355_odr_lpf
Definition: adxl355.h:193
int adxl355_set_range(struct adxl355_dev *dev, enum adxl355_range range_val)
Sets the measurement range register value.
Definition: adxl355.c:361
@ ADXL355_HPF_1_5545
Definition: adxl355.h:187
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:121