no-OS
iio_adxl367.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef IIO_ADXL367_H
34 #define IIO_ADXL367_H
35 
36 /******************************************************************************/
37 /***************************** Include Files **********************************/
38 /******************************************************************************/
39 #include "iio.h"
40 
41 /******************************************************************************/
42 /*************************** Types Declarations *******************************/
43 /******************************************************************************/
47  uint32_t active_channels;
49 };
50 
53 };
54 
55 /******************************************************************************/
56 /************************ Functions Declarations ******************************/
57 /******************************************************************************/
58 int adxl367_iio_init(struct adxl367_iio_dev **iio_dev,
60 
61 int adxl367_iio_remove(struct adxl367_iio_dev *desc);
62 
63 #endif
IIO_ACCEL
@ IIO_ACCEL
Definition: iio_types.h:71
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:709
iio_adxl367.h
Header file of IIO ADXL367 Driver.
no_os_alloc.h
END_ATTRIBUTES_ARRAY
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
adxl367_temp_read_en
int adxl367_temp_read_en(struct adxl367_dev *dev, bool enable)
Enables temperature reading.
Definition: adxl367.c:665
adxl367_dev::range
enum adxl367_range range
Definition: adxl367.h:434
ADXL367_OP_STANDBY
@ ADXL367_OP_STANDBY
Definition: adxl367.h:305
IIO_VAL_INT
@ IIO_VAL_INT
Definition: iio_types.h:50
iio_channel
Struct describing the scan type.
Definition: iio_types.h:168
IIO_VAL_INT_PLUS_NANO
@ IIO_VAL_INT_PLUS_NANO
Definition: iio_types.h:52
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:523
scan_type::sign
char sign
Definition: iio_types.h:153
IIO_SHARED_BY_TYPE
@ IIO_SHARED_BY_TYPE
Definition: iio_types.h:120
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:284
iio_ch_info
Structure holding channel attributess.
Definition: iio_types.h:103
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:721
adxl367_iio_dev::no_of_active_channels
uint8_t no_of_active_channels
Definition: iio_adxl367.h:48
IIO_VAL_INT_PLUS_MICRO
@ IIO_VAL_INT_PLUS_MICRO
Definition: iio_types.h:51
ADXL367_ODR_400HZ
@ ADXL367_ODR_400HZ
Definition: adxl367.h:329
IIO_VAL_FRACTIONAL
@ IIO_VAL_FRACTIONAL
Definition: iio_types.h:55
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:721
adxl367_dev
ADXL367 Device structure.
Definition: adxl367.h:424
ADXL367_2G_RANGE
@ ADXL367_2G_RANGE
Definition: adxl367.h:314
no_os_calloc
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
NO_OS_ARRAY_SIZE
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:49
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:496
adxl367_init_param
Structure holding the parameters for ADXL367 device initialization.
Definition: adxl367.h:451
adxl367_dev::odr
enum adxl367_odr odr
Definition: adxl367.h:436
adxl367_iio_dev
Definition: iio_adxl367.h:44
adxl367_iio_init_param
Definition: iio_adxl367.h:51
adxl367_set_range
int adxl367_set_range(struct adxl367_dev *dev, enum adxl367_range range)
Selects the measurement range.
Definition: adxl367.c:465
adxl367_remove
int adxl367_remove(struct adxl367_dev *dev)
Frees the resources allocated by adxl367_init().
Definition: adxl367.c:138
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:65
iio_attribute::name
const char * name
Definition: iio_types.h:131
adxl367_dev::y_offset
uint16_t y_offset
Definition: adxl367.h:443
adxl367_iio_remove
int adxl367_iio_remove(struct adxl367_iio_dev *desc)
Free the resources allocated by adxl367_iio_init().
Definition: iio_adxl367.c:773
ADXL367_OP_MEASURE
@ ADXL367_OP_MEASURE
Definition: adxl367.h:306
iio_attribute
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
adxl367_iio_remove
int adxl367_iio_remove(struct adxl367_iio_dev *desc)
Free the resources allocated by adxl367_iio_init().
Definition: iio_adxl367.c:773
adxl367_range
adxl367_range
Enum for selecting range.
Definition: adxl367.h:313
iio_parse_value
int32_t iio_parse_value(char *buf, enum iio_val fmt, int32_t *val, int32_t *val2)
Definition: iio.c:630
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:562
adxl367_iio_dev::active_channels
uint32_t active_channels
Definition: iio_adxl367.h:47
adxl367_iio_init_param::adxl367_initial_param
struct adxl367_init_param * adxl367_initial_param
Definition: iio_adxl367.h:52
adxl367_dev::z_offset
uint16_t z_offset
Definition: adxl367.h:444
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:686
ADXL367_4G_RANGE
@ ADXL367_4G_RANGE
Definition: adxl367.h:315
NO_OS_BIT
#define NO_OS_BIT(x)
Definition: no_os_util.h:45
no_os_free
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
adxl367.h
Header file of ADXL367 Driver.
adxl367_iio_dev::iio_dev
struct iio_device * iio_dev
Definition: iio_adxl367.h:46
adxl367_iio_dev::adxl367_dev
struct adxl367_dev * adxl367_dev
Definition: iio_adxl367.h:45
IIO_TEMP
@ IIO_TEMP
Definition: iio_types.h:69
iio_ch_info::type
enum iio_chan_type type
Definition: iio_types.h:109
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:255
NULL
#define NULL
Definition: wrapper.h:64
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
iio_ch_info::ch_num
int16_t ch_num
Definition: iio_types.h:105
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:442
ADXL367_ACCEL_CHANNEL
#define ADXL367_ACCEL_CHANNEL(index, axis)
Definition: iio_adxl367.c:859
scan_type
Definition: iio_types.h:151
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:433
no_os_sign_extend32
int32_t no_os_sign_extend32(uint32_t value, int index)
ADXL367_8G_RANGE
@ ADXL367_8G_RANGE
Definition: adxl367.h:316