no-OS
iio_adxl355.h
Go to the documentation of this file.
1 /***************************************************************************/
39 #ifndef IIO_ADXL355_H
40 #define IIO_ADXL355_H
41 
42 /******************************************************************************/
43 /***************************** Include Files **********************************/
44 /******************************************************************************/
45 #include "iio.h"
46 #include "no_os_irq.h"
47 
48 /******************************************************************************/
49 /********************** Macros and Constants Definitions **********************/
50 /******************************************************************************/
52 
53 /******************************************************************************/
54 /*************************** Types Declarations *******************************/
55 /******************************************************************************/
60  uint32_t active_channels;
62 };
63 
66 };
67 
68 /******************************************************************************/
69 /************************ Functions Declarations ******************************/
70 /******************************************************************************/
71 int adxl355_iio_init(struct adxl355_iio_dev **iio_dev,
73 
74 int adxl355_iio_remove(struct adxl355_iio_dev *desc);
75 
76 #endif
IIO_ACCEL
@ IIO_ACCEL
Definition: iio_types.h:77
adxl355_init_param
Structure holding the parameters for ADXL355 device initialization.
Definition: adxl355.h:232
no_os_alloc.h
END_ATTRIBUTES_ARRAY
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:118
adxl355_dev::y_offset
uint16_t y_offset
Definition: adxl355.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
adxl355_iio_dev::active_channels
uint32_t active_channels
Definition: iio_adxl355.h:60
IIO_VAL_INT_PLUS_NANO
@ IIO_VAL_INT_PLUS_NANO
Definition: iio_types.h:58
scan_type::sign
char sign
Definition: iio_types.h:155
adxl355_set_odr_lpf
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_get_raw_temp
int adxl355_get_raw_temp(struct adxl355_dev *dev, uint16_t *raw_temp)
Reads the raw temperature.
Definition: adxl355.c:607
IIO_SHARED_BY_TYPE
@ IIO_SHARED_BY_TYPE
Definition: iio_types.h:122
iio_device_data::dev
void * dev
Definition: iio_types.h:227
adxl355_dev::z_offset
uint16_t z_offset
Definition: adxl355.h:312
no_os_irq.h
Header file of IRQ interface.
adxl355_get_raw_xyz
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
iio_ch_info
Structure holding channel attributess.
Definition: iio_types.h:105
adxl355_iio_dev_init_param::adxl355_dev_init
struct adxl355_init_param * adxl355_dev_init
Definition: iio_adxl355.h:65
no_os_mul_u64_u32_shr
uint64_t no_os_mul_u64_u32_shr(uint64_t a, uint32_t mul, unsigned int shift)
no_os_units.h
Header file of Units.
IIO_VAL_INT_PLUS_MICRO
@ IIO_VAL_INT_PLUS_MICRO
Definition: iio_types.h:57
IIO_VAL_FRACTIONAL
@ IIO_VAL_FRACTIONAL
Definition: iio_types.h:61
adxl355_dev::odr_lpf
enum adxl355_odr_lpf odr_lpf
Definition: adxl355.h:307
adxl355_read_device_data
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
adxl355_op_mode
adxl355_op_mode
Definition: adxl355.h:167
ACCEL_AXIS_Y
#define ACCEL_AXIS_Y
Definition: iio_adxl355.c:56
adxl355.h
Header file of ADXL355 Driver.
adxl355_soft_reset
int adxl355_soft_reset(struct adxl355_dev *dev)
Performs a soft reset of the device.
Definition: adxl355.c:300
adxl355_remove
int adxl355_remove(struct adxl355_dev *dev)
Free the resources allocated by adxl355_init().
Definition: adxl355.c:236
no_os_div64_u64_rem
uint64_t no_os_div64_u64_rem(uint64_t dividend, uint64_t divisor, uint64_t *remainder)
adxl355_iio_trig_desc
struct iio_trigger adxl355_iio_trig_desc
Definition: iio_adxl355_trig.c:50
no_os_calloc
void * no_os_calloc(size_t nitems, size_t size)
NO_OS_ARRAY_SIZE
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:53
adxl355_dev
ADXL355 Device structure.
Definition: adxl355.h:299
iio.h
Header file of iio.
no_os_error.h
Error codes definition.
chan_y
@ chan_y
Definition: iio_adxl355.c:88
iio_attribute::name
const char * name
Definition: iio_types.h:133
adxl355_iio_dev
Definition: iio_adxl355.h:56
adxl355_set_offset
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
ADXL355_ACCEL_CHANNEL
#define ADXL355_ACCEL_CHANNEL(index, reg, axis)
Definition: iio_adxl355.c:198
adxl355_dev::dev_type
enum adxl355_type dev_type
Definition: adxl355.h:301
adxl355_iio_remove
int adxl355_iio_remove(struct adxl355_iio_dev *desc)
Free the resources allocated by adxl355_iio_init().
Definition: iio_adxl355.c:1098
iio_attribute
Structure holding pointers to show and store functions.
Definition: iio_types.h:131
iio_buffer::active_mask
uint32_t active_mask
Definition: iio_types.h:213
ACCEL_AXIS_X
#define ACCEL_AXIS_X
Definition: iio_adxl355.c:55
iio_adxl355.h
Header file of IIO ADXL355 Driver.
chan_z
@ chan_z
Definition: iio_adxl355.c:89
iio_parse_value
int32_t iio_parse_value(char *buf, enum iio_val fmt, int32_t *val, int32_t *val2)
Definition: iio.c:607
adxl355_iio_init
int adxl355_iio_init(struct adxl355_iio_dev **iio_dev, struct adxl355_iio_dev_init_param *init_param)
Initializes the ADXL355 IIO driver.
Definition: iio_adxl355.c:1044
adxl355_iio_accel_chans
adxl355_iio_accel_chans
Definition: iio_adxl355.c:86
ADXL355_STDBY_TEMP_OFF_DRDY_OFF
@ ADXL355_STDBY_TEMP_OFF_DRDY_OFF
Definition: adxl355.h:175
iio_device_data::buffer
struct iio_buffer * buffer
Definition: iio_types.h:228
adxl355_dev::op_mode
enum adxl355_op_mode op_mode
Definition: adxl355.h:306
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:658
iio_ch_info::address
uint32_t address
Definition: iio_types.h:115
adxl355_dev::x_offset
uint16_t x_offset
Definition: adxl355.h:310
adxl355_iio_dev::iio_dev
struct iio_device * iio_dev
Definition: iio_adxl355.h:58
ACCEL_AXIS_Z
#define ACCEL_AXIS_Z
Definition: iio_adxl355.c:57
NO_OS_BIT
#define NO_OS_BIT(x)
Definition: no_os_util.h:51
no_os_free
void no_os_free(void *ptr)
IIO_TEMP
@ IIO_TEMP
Definition: iio_types.h:75
iio_ch_info::type
enum iio_chan_type type
Definition: iio_types.h:111
iio_trigger
Definition: iio_types.h:231
NULL
#define NULL
Definition: wrapper.h:64
adxl355_set_hpf_corner
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
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:96
ID_ADXL355
@ ID_ADXL355
Definition: adxl355.h:162
iio_device
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
ADXL355_MEAS_TEMP_ON_DRDY_ON
@ ADXL355_MEAS_TEMP_ON_DRDY_ON
Definition: adxl355.h:168
adxl355_iio_remove
int adxl355_iio_remove(struct adxl355_iio_dev *desc)
Free the resources allocated by adxl355_iio_init().
Definition: iio_adxl355.c:1098
chan_x
@ chan_x
Definition: iio_adxl355.c:87
ID_ADXL357
@ ID_ADXL357
Definition: adxl355.h:163
ID_ADXL359
@ ID_ADXL359
Definition: adxl355.h:164
adxl355_dev::hpf_corner
enum adxl355_hpf_corner hpf_corner
Definition: adxl355.h:308
adxl355_write_device_data
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
scan_type
Definition: iio_types.h:153
TERA
#define TERA
Definition: no_os_units.h:46
adxl355_init
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
MEGA
#define MEGA
Definition: no_os_units.h:48
no_os_util.h
Header file of utility functions.
iio_device_data
Definition: iio_types.h:226
adxl355_set_op_mode
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
adxl355_iio_init
int adxl355_iio_init(struct adxl355_iio_dev **iio_dev, struct adxl355_iio_dev_init_param *init_param)
Initializes the ADXL355 IIO driver.
Definition: iio_adxl355.c:1044
no_os_sign_extend32
int32_t no_os_sign_extend32(uint32_t value, int index)
adxl355_iio_dev_init_param
Definition: iio_adxl355.h:64
adxl355_iio_dev::no_of_active_channels
uint8_t no_of_active_channels
Definition: iio_adxl355.h:61
adxl355_iio_dev::adxl355_hpf_3db_table
int adxl355_hpf_3db_table[7][2]
Definition: iio_adxl355.h:59
iio_buffer_push_scan
int iio_buffer_push_scan(struct iio_buffer *buffer, void *data)
Definition: iio.c:1407
adxl355_iio_dev::adxl355_dev
struct adxl355_dev * adxl355_dev
Definition: iio_adxl355.h:57
no_os_div_u64
uint64_t no_os_div_u64(uint64_t dividend, uint32_t divisor)