Go to the documentation of this file.
49 #define ADXL355_SPI_READ 0x01
50 #define ADXL355_SPI_WRITE 0x00
51 #define ADXL355_ADDR(x) ((x) & 0xFF)
52 #define GET_ADXL355_TRANSF_LEN(x) (((x) >> 8) & 0x0000FF)
53 #define SET_ADXL355_TRANSF_LEN(x) (((x) << 8) & 0x00FF00)
54 #define GET_ADXL355_RESET_VAL(x) (((x) >> 16) & 0x0000FF)
55 #define SET_ADXL355_RESET_VAL(x) (((x) << 16) & 0xFF0000)
58 #define ADXL355_DEVID_AD (ADXL355_ADDR(0x00) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0xAD))
59 #define ADXL355_DEVID_MST (ADXL355_ADDR(0x01) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x1D))
60 #define ADXL355_PARTID (ADXL355_ADDR(0x02) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0xED))
61 #define ADXL359_PARTID (ADXL355_ADDR(0x02) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0xE9))
62 #define ADXL355_REVID (ADXL355_ADDR(0x03) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x01))
63 #define ADXL355_STATUS (ADXL355_ADDR(0x04) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x00))
64 #define ADXL355_FIFO_ENTRIES (ADXL355_ADDR(0x05) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x00))
65 #define ADXL355_TEMP (ADXL355_ADDR(0x06) | SET_ADXL355_TRANSF_LEN(2))
66 #define ADXL355_XDATA (ADXL355_ADDR(0x08) | SET_ADXL355_TRANSF_LEN(3))
67 #define ADXL355_YDATA (ADXL355_ADDR(0x0B) | SET_ADXL355_TRANSF_LEN(3))
68 #define ADXL355_ZDATA (ADXL355_ADDR(0x0E) | SET_ADXL355_TRANSF_LEN(3))
69 #define ADXL355_FIFO_DATA (ADXL355_ADDR(0x11) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x00))
70 #define ADXL355_OFFSET_X (ADXL355_ADDR(0x1E) | SET_ADXL355_TRANSF_LEN(2))
71 #define ADXL355_OFFSET_Y (ADXL355_ADDR(0x20) | SET_ADXL355_TRANSF_LEN(2))
72 #define ADXL355_OFFSET_Z (ADXL355_ADDR(0x22) | SET_ADXL355_TRANSF_LEN(2))
73 #define ADXL355_ACT_EN (ADXL355_ADDR(0x24) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x00))
74 #define ADXL355_ACT_THRESH (ADXL355_ADDR(0x25) | SET_ADXL355_TRANSF_LEN(2))
75 #define ADXL355_ACT_CNT (ADXL355_ADDR(0x27) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x01))
76 #define ADXL355_FILTER (ADXL355_ADDR(0x28) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x00))
77 #define ADXL355_FIFO_SAMPLES (ADXL355_ADDR(0x29) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x60))
78 #define ADXL355_INT_MAP (ADXL355_ADDR(0x2A) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x00))
79 #define ADXL355_SYNC (ADXL355_ADDR(0x2B) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x00))
80 #define ADXL355_RANGE (ADXL355_ADDR(0x2C) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x81))
81 #define ADXL355_POWER_CTL (ADXL355_ADDR(0x2D) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x01))
82 #define ADXL355_SELF_TEST (ADXL355_ADDR(0x2E) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x00))
83 #define ADXL355_RESET (ADXL355_ADDR(0x2F) | SET_ADXL355_TRANSF_LEN(1) | SET_ADXL355_RESET_VAL(0x00))
85 #define ADXL355_SHADOW_REGISTER_BASE_ADDR (ADXL355_ADDR(0x50) | SET_ADXL355_TRANSF_LEN(5))
86 #define ADXL355_MAX_FIFO_SAMPLES_VAL 0x60
87 #define ADXL355_SELF_TEST_TRIGGER_VAL 0x03
88 #define ADXL355_RESET_CODE 0x52
96 #define ADXL355_ACC_SCALE_FACTOR_MUL (int64_t) 38245
97 #define ADXL355_ACC_SCALE_FACTOR_DIV (int32_t)1000000000
105 #define ADXL359_ACC_SCALE_FACTOR_MUL (int64_t) 191229
106 #define ADXL359_ACC_SCALE_FACTOR_DIV (int32_t)1000000000
117 #define ADXL355_TEMP_OFFSET -211125
118 #define ADXL355_TEMP_OFFSET_DIV 100
124 #define ADXL355_TEMP_SCALE_FACTOR -110497238
125 #define ADXL355_TEMP_SCALE_FACTOR_DIV 1000000
136 #define ADXL359_TEMP_OFFSET -207825
137 #define ADXL359_TEMP_OFFSET_DIV 100
143 #define ADXL359_TEMP_SCALE_FACTOR -110497238
144 #define ADXL359_TEMP_SCALE_FACTOR_DIV 1000000
146 #define ADXL355_NEG_ACC_MSK NO_OS_GENMASK(31, 20)
147 #define ADXL355_RANGE_FIELD_MSK NO_OS_GENMASK( 1, 0)
148 #define ADXL355_ODR_LPF_FIELD_MSK NO_OS_GENMASK( 3, 0)
149 #define ADXL355_HPF_FIELD_MSK NO_OS_GENMASK( 6, 4)
150 #define ADXL355_INT_POL_FIELD_MSK NO_OS_BIT(6)
350 uint16_t y_offset, uint16_t z_offset);
354 uint32_t *raw_y, uint32_t *raw_z);
378 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:867
#define ADXL355_FIFO_ENTRIES
Definition: adxl355.h:64
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:767
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:107
uint8_t ACT_X
Definition: adxl355.h:266
Structure holding the parameters for ADXL355 device initialization.
Definition: adxl355.h:226
adxl355_hpf_corner
Definition: adxl355.h:177
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:625
int adxl355_get_raw_temp(struct adxl355_dev *dev, uint16_t *raw_temp)
Reads the raw temperature.
Definition: adxl355.c:601
#define ADXL355_ACC_SCALE_FACTOR_DIV
Definition: adxl355.h:97
uint16_t y_offset
Definition: adxl355.h:305
uint8_t ACT_EN2
Definition: adxl355.h:243
#define ADXL355_ACT_EN
Definition: adxl355.h:73
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:767
#define ADXL355_FILTER
Definition: adxl355.h:76
struct _adxl355_int_mask fields
Definition: adxl355.h:247
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:159
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
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:386
@ ADXL355_ODR_500HZ
Definition: adxl355.h:191
#define GET_ADXL355_RESET_VAL(x)
Definition: adxl355.h:54
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:725
int adxl355_get_raw_temp(struct adxl355_dev *dev, uint16_t *raw_temp)
Reads the raw temperature.
Definition: adxl355.c:601
#define ADXL355_OFFSET_Z
Definition: adxl355.h:72
int adxl355_get_sts_reg(struct adxl355_dev *dev, union adxl355_sts_reg_flags *status_flags)
Reads the status register value.
Definition: adxl355.c:661
#define NO_OS_GENMASK(h, l)
Definition: no_os_util.h:82
Definition: adxl355.h:260
adxl355_type
Definition: adxl355.h:155
#define ADXL355_INT_MAP
Definition: adxl355.h:78
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:159
union adxl355_act_en_flags act_en
Definition: adxl355.h:308
@ ADXL355_HPF_24_7
Definition: adxl355.h:179
int adxl355_set_act_cnt_reg(struct adxl355_dev *dev, uint8_t act_cnt)
Writes the activity count register value.
Definition: adxl355.c:848
#define ADXL355_SELF_TEST_TRIGGER_VAL
Definition: adxl355.h:87
uint8_t FIFO_FULL
Definition: adxl355.h:253
int adxl355_soft_reset(struct adxl355_dev *dev)
Performs a soft reset of the device.
Definition: adxl355.c:294
uint16_t z_offset
Definition: adxl355.h:306
Header file of SPI Interface.
uint8_t FIFO_OVR
Definition: adxl355.h:254
int adxl355_conf_act_en(struct adxl355_dev *dev, union adxl355_act_en_flags act_config)
Configures the activity enable register.
Definition: adxl355.c:803
uint8_t FULL_EN1
Definition: adxl355.h:237
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:532
int adxl355_get_sts_reg(struct adxl355_dev *dev, union adxl355_sts_reg_flags *status_flags)
Reads the status register value.
Definition: adxl355.c:661
#define ADXL355_HPF_FIELD_MSK
Definition: adxl355.h:149
#define ADXL355_TEMP_OFFSET
Definition: adxl355.h:117
struct no_os_i2c_init_param i2c_init
Definition: adxl355.h:217
@ ADXL355_ODR_7_813HZ
Definition: adxl355.h:197
@ ADXL355_INT_ACTIVE_LOW
Definition: adxl355.h:211
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:113
#define ADXL355_PARTID
Definition: adxl355.h:60
union adxl355_comm_init_param comm_init
Definition: adxl355.h:228
@ ADXL355_ODR_2000HZ
Definition: adxl355.h:189
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:532
@ ADXL355_ODR_250HZ
Definition: adxl355.h:192
#define ADXL355_POWER_CTL
Definition: adxl355.h:81
Header file of Delay functions.
enum adxl355_odr_lpf odr_lpf
Definition: adxl355.h:301
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:684
@ ADXL355_HPF_0_3862
Definition: adxl355.h:182
int adxl355_set_self_test(struct adxl355_dev *dev)
Triggers the self-test feature.
Definition: adxl355.c:339
adxl355_op_mode
Definition: adxl355.h:161
uint8_t RDY_EN1
Definition: adxl355.h:236
@ ADXL355_HPF_0_0238
Definition: adxl355.h:184
uint8_t value
Definition: adxl355.h:274
#define ADXL355_STATUS
Definition: adxl355.h:63
enum adxl355_comm_type comm_type
Definition: adxl355.h:230
Definition: ad9361_util.h:69
Header file of ADXL355 Driver.
int adxl355_soft_reset(struct adxl355_dev *dev)
Performs a soft reset of the device.
Definition: adxl355.c:294
#define ADXL359_TEMP_SCALE_FACTOR
Definition: adxl355.h:143
#define ADXL355_SELF_TEST
Definition: adxl355.h:82
int adxl355_remove(struct adxl355_dev *dev)
Free the resources allocated by adxl355_init().
Definition: adxl355.c:230
adxl355_range
Definition: adxl355.h:201
@ ADXL355_STDBY_TEMP_ON_DRDY_OFF
Definition: adxl355.h:167
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:273
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
Definition: adxl355.h:265
uint8_t Activity
Definition: adxl355.h:255
union adxl355_comm_desc com_desc
Definition: adxl355.h:297
@ ADXL355_ODR_4000HZ
Definition: adxl355.h:188
int64_t integer
Definition: adxl355.h:278
#define ADXL359_PARTID
Definition: adxl355.h:61
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:867
#define ADXL355_ODR_LPF_FIELD_MSK
Definition: adxl355.h:148
@ ADXL355_ODR_1000HZ
Definition: adxl355.h:190
uint8_t RDY_EN2
Definition: adxl355.h:240
#define GET_ADXL355_TRANSF_LEN(x)
Definition: adxl355.h:52
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:571
int adxl355_set_int_pol(struct adxl355_dev *dev, enum adxl355_int_pol int_pol)
Sets the interrupt polarity.
Definition: adxl355.c:884
ADXL355 Device structure.
Definition: adxl355.h:293
int adxl355_set_self_test(struct adxl355_dev *dev)
Triggers the self-test feature.
Definition: adxl355.c:339
#define ADXL355_SHADOW_REGISTER_BASE_ADDR
Definition: adxl355.h:85
#define ADXL355_TEMP
Definition: adxl355.h:65
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
@ ADXL355_MEAS_TEMP_OFF_DRDY_ON
Definition: adxl355.h:164
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:489
#define ADXL355_XDATA
Definition: adxl355.h:66
Definition: adxl355.h:215
int adxl355_remove(struct adxl355_dev *dev)
Free the resources allocated by adxl355_init().
Definition: adxl355.c:230
#define ADXL355_ACT_CNT
Definition: adxl355.h:75
#define ADXL359_TEMP_OFFSET_DIV
Definition: adxl355.h:137
@ ADXL355_INT_ACTIVE_HIGH
Definition: adxl355.h:212
#define ADXL355_ZDATA
Definition: adxl355.h:68
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:489
uint8_t DATA_RDY
Definition: adxl355.h:252
#define ADXL355_FIFO_SAMPLES
Definition: adxl355.h:77
int adxl355_conf_act_en(struct adxl355_dev *dev, union adxl355_act_en_flags act_config)
Configures the activity enable register.
Definition: adxl355.c:803
struct no_os_i2c_desc * i2c_desc
Definition: adxl355.h:284
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:571
uint8_t OVR_EN2
Definition: adxl355.h:242
@ ADXL355_ODR_62_5HZ
Definition: adxl355.h:194
uint8_t ACT_EN1
Definition: adxl355.h:239
uint16_t act_thr
Definition: adxl355.h:310
uint32_t no_os_get_unaligned_be24(uint8_t *buf)
#define ADXL355_YDATA
Definition: adxl355.h:67
Definition: adxl355.h:235
enum adxl355_type dev_type
Definition: adxl355.h:295
@ ADXL355_ODR_15_625HZ
Definition: adxl355.h:196
#define ADXL355_ADDR(x)
Definition: adxl355.h:51
@ ADXL355_MEAS_TEMP_OFF_DRDY_OFF
Definition: adxl355.h:168
adxl355_int_pol
Definition: adxl355.h:210
uint8_t reserved
Definition: adxl355.h:269
#define ADXL355_RANGE_FIELD_MSK
Definition: adxl355.h:147
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:273
@ ADXL355_STDBY_TEMP_OFF_DRDY_ON
Definition: adxl355.h:165
uint8_t FULL_EN2
Definition: adxl355.h:241
#define ADXL355_DEVID_AD
Definition: adxl355.h:58
uint8_t ACT_Z
Definition: adxl355.h:268
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
uint8_t comm_buff[289]
Definition: adxl355.h:311
uint8_t fifo_samples
Definition: adxl355.h:307
#define ADXL359_TEMP_SCALE_FACTOR_DIV
Definition: adxl355.h:144
#define ADXL355_RANGE
Definition: adxl355.h:80
#define ADXL355_TEMP_OFFSET_DIV
Definition: adxl355.h:118
@ ADXL355_HPF_6_2084
Definition: adxl355.h:180
@ ADXL355_ODR_125HZ
Definition: adxl355.h:193
uint8_t act_cnt
Definition: adxl355.h:309
uint8_t ACT_Y
Definition: adxl355.h:267
#define ADXL355_DEVID_MST
Definition: adxl355.h:59
@ ADXL355_STDBY_TEMP_OFF_DRDY_OFF
Definition: adxl355.h:169
enum adxl355_type dev_type
Definition: adxl355.h:232
Definition: adxl355.h:272
#define ADXL355_NEG_ACC_MSK
Definition: adxl355.h:146
#define ADXL355_ACC_SCALE_FACTOR_MUL
Definition: adxl355.h:96
int adxl355_set_fifo_samples(struct adxl355_dev *dev, uint8_t reg_value)
Sets the number of FIFO samples register value.
Definition: adxl355.c:698
@ ADXL359_RANGE_40G
Definition: adxl355.h:207
Structure holding I2C address descriptor.
Definition: no_os_i2c.h:101
enum adxl355_op_mode op_mode
Definition: adxl355.h:300
Definition: adxl355.h:277
struct _adxl355_sts_reg_flags fields
Definition: adxl355.h:261
#define ADXL355_FIFO_DATA
Definition: adxl355.h:69
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:190
int adxl355_conf_act_thr(struct adxl355_dev *dev, uint16_t act_thr)
Configures the activity threshold registers.
Definition: adxl355.c:826
int adxl355_set_int_pol(struct adxl355_dev *dev, enum adxl355_int_pol int_pol)
Sets the interrupt polarity.
Definition: adxl355.c:884
Header file of I2C Interface.
@ ADXL355_I2C_COMM
Definition: adxl355.h:174
int adxl355_set_fifo_samples(struct adxl355_dev *dev, uint8_t reg_value)
Sets the number of FIFO samples register value.
Definition: adxl355.c:698
Definition: adxl355.h:282
uint16_t x_offset
Definition: adxl355.h:304
adxl355_comm_type
Definition: adxl355.h:172
@ ADXL355_ODR_3_906HZ
Definition: adxl355.h:198
#define NO_OS_BIT(x)
Definition: no_os_util.h:45
int adxl355_conf_act_thr(struct adxl355_dev *dev, uint16_t act_thr)
Configures the activity threshold registers.
Definition: adxl355.c:826
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:437
#define ADXL359_ACC_SCALE_FACTOR_MUL
Definition: adxl355.h:105
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
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:684
uint8_t value
Definition: adxl355.h:248
#define ADXL355_MAX_FIFO_SAMPLES_VAL
Definition: adxl355.h:86
uint8_t NVM_BUSY
Definition: adxl355.h:256
#define ADXL355_RESET
Definition: adxl355.h:83
@ ADXL355_MEAS_TEMP_ON_DRDY_OFF
Definition: adxl355.h:166
@ ADXL355_SPI_COMM
Definition: adxl355.h:173
@ ADXL355_RANGE_8G
Definition: adxl355.h:206
uint8_t value
Definition: adxl355.h:262
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:437
@ ADXL355_STDBY_TEMP_ON_DRDY_ON
Definition: adxl355.h:163
#define ADXL355_OFFSET_X
Definition: adxl355.h:70
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
@ ID_ADXL355
Definition: adxl355.h:156
@ ADXL355_MEAS_TEMP_ON_DRDY_ON
Definition: adxl355.h:162
struct _adxl355_act_en_flags fields
Definition: adxl355.h:273
@ ADXL355_HPF_0_0954
Definition: adxl355.h:183
#define ADXL355_TEMP_SCALE_FACTOR_DIV
Definition: adxl355.h:125
@ ID_ADXL357
Definition: adxl355.h:157
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:116
@ ID_ADXL359
Definition: adxl355.h:158
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:137
#define ADXL355_TEMP_SCALE_FACTOR
Definition: adxl355.h:124
enum adxl355_hpf_corner hpf_corner
Definition: adxl355.h:302
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:75
enum adxl355_range range
Definition: adxl355.h:303
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:252
struct no_os_spi_desc * spi_desc
Definition: adxl355.h:286
struct no_os_spi_init_param spi_init
Definition: adxl355.h:219
@ ADXL359_RANGE_10G
Definition: adxl355.h:203
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
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:137
@ ADXL355_RANGE_2G
Definition: adxl355.h:202
uint8_t OVR_EN1
Definition: adxl355.h:238
Definition: adxl355.h:246
#define ADXL359_TEMP_OFFSET
Definition: adxl355.h:136
Definition: adxl355.h:251
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:625
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:252
#define ADXL355_OFFSET_Y
Definition: adxl355.h:71
#define ADXL355_ACT_THRESH
Definition: adxl355.h:74
#define ADXL355_SPI_WRITE
Definition: adxl355.h:50
int adxl355_set_range(struct adxl355_dev *dev, enum adxl355_range range_val)
Sets the measurement range register value.
Definition: adxl355.c:355
#define ADXL355_RESET_CODE
Definition: adxl355.h:88
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:386
@ ADXL355_ODR_31_25HZ
Definition: adxl355.h:195
@ ADXL359_RANGE_20G
Definition: adxl355.h:205
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:725
@ ADXL355_HPF_OFF
Definition: adxl355.h:178
enum adxl355_comm_type comm_type
Definition: adxl355.h:299
uint8_t reserved
Definition: adxl355.h:257
#define ADXL355_INT_POL_FIELD_MSK
Definition: adxl355.h:150
@ ADXL355_RANGE_4G
Definition: adxl355.h:204
Error macro definition for ARM Compiler.
int32_t fractional
Definition: adxl355.h:279
#define ADXL355_SPI_READ
Definition: adxl355.h:49
int adxl355_set_act_cnt_reg(struct adxl355_dev *dev, uint8_t act_cnt)
Writes the activity count register value.
Definition: adxl355.c:848
adxl355_odr_lpf
Definition: adxl355.h:187
int adxl355_set_range(struct adxl355_dev *dev, enum adxl355_range range_val)
Sets the measurement range register value.
Definition: adxl355.c:355
@ ADXL355_HPF_1_5545
Definition: adxl355.h:181
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140