no-OS
iio_adxl367.h
Go to the documentation of this file.
1 /***************************************************************************/
39 #ifndef IIO_ADXL367_H
40 #define IIO_ADXL367_H
41 
42 /******************************************************************************/
43 /***************************** Include Files **********************************/
44 /******************************************************************************/
45 #include "iio.h"
46 
47 /******************************************************************************/
48 /*************************** Types Declarations *******************************/
49 /******************************************************************************/
53  uint32_t active_channels;
55 };
56 
59 };
60 
61 /******************************************************************************/
62 /************************ Functions Declarations ******************************/
63 /******************************************************************************/
64 int adxl367_iio_init(struct adxl367_iio_dev **iio_dev,
66 
67 int adxl367_iio_remove(struct adxl367_iio_dev *desc);
68 
69 #endif
IIO_ACCEL
@ IIO_ACCEL
Definition: iio_types.h:77
adxl367_read_raw_temp
int adxl367_read_raw_temp(struct adxl367_dev *dev, int16_t *raw_temp)
Reads the raw temperature of the device. If ADXL367_TEMP_EN is not set, use adxl367_temp_read_en() fi...
Definition: adxl367.c:694
iio_adxl367.h
Header file of IIO ADXL367 Driver.
END_ATTRIBUTES_ARRAY
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:118
adxl367_temp_read_en
int adxl367_temp_read_en(struct adxl367_dev *dev, bool enable)
Enables temperature reading.
Definition: adxl367.c:650
adxl367_dev::range
enum adxl367_range range
Definition: adxl367.h:440
ADXL367_OP_STANDBY
@ ADXL367_OP_STANDBY
Definition: adxl367.h:311
IIO_VAL_INT
@ IIO_VAL_INT
Definition: iio_types.h:56
iio_channel
Struct describing the scan type.
Definition: iio_types.h:170
IIO_VAL_INT_PLUS_NANO
@ IIO_VAL_INT_PLUS_NANO
Definition: iio_types.h:58
adxl367_set_offset
int adxl367_set_offset(struct adxl367_dev *dev, uint16_t x_offset, uint16_t y_offset, uint16_t z_offset)
Sets offset for each axis.
Definition: adxl367.c:508
scan_type::sign
char sign
Definition: iio_types.h:155
IIO_SHARED_BY_TYPE
@ IIO_SHARED_BY_TYPE
Definition: iio_types.h:122
adxl367_get_register_value
int adxl367_get_register_value(struct adxl367_dev *dev, uint8_t *read_data, uint8_t register_address, uint8_t register_nb)
Performs a burst read of a specified number of registers.
Definition: adxl367.c:269
iio_ch_info
Structure holding channel attributess.
Definition: iio_types.h:105
adxl367_iio_init
int adxl367_iio_init(struct adxl367_iio_dev **iio_dev, struct adxl367_iio_init_param *init_param)
Initializes the ADXL367 IIO driver.
Definition: iio_adxl367.c:726
adxl367_iio_dev::no_of_active_channels
uint8_t no_of_active_channels
Definition: iio_adxl367.h:54
IIO_VAL_INT_PLUS_MICRO
@ IIO_VAL_INT_PLUS_MICRO
Definition: iio_types.h:57
ADXL367_ODR_400HZ
@ ADXL367_ODR_400HZ
Definition: adxl367.h:335
IIO_VAL_FRACTIONAL
@ IIO_VAL_FRACTIONAL
Definition: iio_types.h:61
adxl367_iio_init
int adxl367_iio_init(struct adxl367_iio_dev **iio_dev, struct adxl367_iio_init_param *init_param)
Initializes the ADXL367 IIO driver.
Definition: iio_adxl367.c:726
adxl367_dev
ADXL367 Device structure.
Definition: adxl367.h:430
ADXL367_2G_RANGE
@ ADXL367_2G_RANGE
Definition: adxl367.h:320
NO_OS_ARRAY_SIZE
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:53
adxl367_set_output_rate
int adxl367_set_output_rate(struct adxl367_dev *dev, enum adxl367_odr odr)
Selects the Output Data Rate of the device.
Definition: adxl367.c:481
adxl367_init_param
Structure holding the parameters for ADXL367 device initialization.
Definition: adxl367.h:457
adxl367_dev::odr
enum adxl367_odr odr
Definition: adxl367.h:442
adxl367_iio_dev
Definition: iio_adxl367.h:50
adxl367_iio_init_param
Definition: iio_adxl367.h:57
adxl367_set_range
int adxl367_set_range(struct adxl367_dev *dev, enum adxl367_range range)
Selects the measurement range.
Definition: adxl367.c:450
adxl367_remove
int adxl367_remove(struct adxl367_dev *dev)
Frees the resources allocated by adxl367_init().
Definition: adxl367.c:142
iio.h
Header file of iio.
no_os_error.h
Error codes definition.
adxl367_init
int adxl367_init(struct adxl367_dev **device, struct adxl367_init_param init_param)
Initializes communication with the device and checks if the part is present by reading the device id.
Definition: adxl367.c:69
iio_attribute::name
const char * name
Definition: iio_types.h:133
adxl367_dev::y_offset
uint16_t y_offset
Definition: adxl367.h:449
adxl367_iio_remove
int adxl367_iio_remove(struct adxl367_iio_dev *desc)
Free the resources allocated by adxl367_iio_init().
Definition: iio_adxl367.c:778
ADXL367_OP_MEASURE
@ ADXL367_OP_MEASURE
Definition: adxl367.h:312
iio_attribute
Structure holding pointers to show and store functions.
Definition: iio_types.h:131
adxl367_iio_remove
int adxl367_iio_remove(struct adxl367_iio_dev *desc)
Free the resources allocated by adxl367_iio_init().
Definition: iio_adxl367.c:778
adxl367_range
adxl367_range
Enum for selecting range.
Definition: adxl367.h:319
iio_parse_value
int32_t iio_parse_value(char *buf, enum iio_val fmt, int32_t *val, int32_t *val2)
Definition: iio.c:582
adxl367_get_raw_xyz
int adxl367_get_raw_xyz(struct adxl367_dev *dev, int16_t *x, int16_t *y, int16_t *z)
Reads the 3-axis raw data from the accelerometer.
Definition: adxl367.c:547
adxl367_iio_dev::active_channels
uint32_t active_channels
Definition: iio_adxl367.h:53
adxl367_iio_init_param::adxl367_initial_param
struct adxl367_init_param * adxl367_initial_param
Definition: iio_adxl367.h:58
adxl367_dev::z_offset
uint16_t z_offset
Definition: adxl367.h:450
iio_format_value
int iio_format_value(char *buf, uint32_t len, enum iio_val fmt, int32_t size, int32_t *vals)
Definition: iio.c:633
ADXL367_4G_RANGE
@ ADXL367_4G_RANGE
Definition: adxl367.h:321
NO_OS_BIT
#define NO_OS_BIT(x)
Definition: no_os_util.h:51
adxl367.h
Header file of ADXL367 Driver.
adxl367_iio_dev::iio_dev
struct iio_device * iio_dev
Definition: iio_adxl367.h:52
adxl367_iio_dev::adxl367_dev
struct adxl367_dev * adxl367_dev
Definition: iio_adxl367.h:51
IIO_TEMP
@ IIO_TEMP
Definition: iio_types.h:75
iio_ch_info::type
enum iio_chan_type type
Definition: iio_types.h:111
adxl367_set_register_value
int adxl367_set_register_value(struct adxl367_dev *dev, uint8_t register_value, uint8_t register_address)
Writes data into a register.
Definition: adxl367.c:240
NULL
#define NULL
Definition: wrapper.h:64
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:96
iio_ch_info::ch_num
int16_t ch_num
Definition: iio_types.h:107
iio_device
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
adxl367_dev::x_offset
uint16_t x_offset
Definition: adxl367.h:448
ADXL367_ACCEL_CHANNEL
#define ADXL367_ACCEL_CHANNEL(index, axis)
Definition: iio_adxl367.c:864
scan_type
Definition: iio_types.h:153
no_os_util.h
Header file of utility functions.
adxl367_set_power_mode
int adxl367_set_power_mode(struct adxl367_dev *dev, enum adxl367_op_mode mode)
Places the device into standby/measure mode.
Definition: adxl367.c:418
no_os_sign_extend32
int32_t no_os_sign_extend32(uint32_t value, int index)
ADXL367_8G_RANGE
@ ADXL367_8G_RANGE
Definition: adxl367.h:322