no-OS
iio_adxl355.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef IIO_ADXL355_H
34 #define IIO_ADXL355_H
35 
36 /******************************************************************************/
37 /***************************** Include Files **********************************/
38 /******************************************************************************/
39 #include "iio.h"
40 #include "no_os_irq.h"
41 
42 /******************************************************************************/
43 /********************** Macros and Constants Definitions **********************/
44 /******************************************************************************/
46 
47 /******************************************************************************/
48 /*************************** Types Declarations *******************************/
49 /******************************************************************************/
54  uint32_t active_channels;
56 };
57 
60 };
61 
62 /******************************************************************************/
63 /************************ Functions Declarations ******************************/
64 /******************************************************************************/
65 int adxl355_iio_init(struct adxl355_iio_dev **iio_dev,
67 
68 int adxl355_iio_remove(struct adxl355_iio_dev *desc);
69 
70 #endif
IIO_ACCEL
@ IIO_ACCEL
Definition: iio_types.h:71
adxl355_init_param
Structure holding the parameters for ADXL355 device initialization.
Definition: adxl355.h:226
no_os_alloc.h
END_ATTRIBUTES_ARRAY
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
adxl355_dev::y_offset
uint16_t y_offset
Definition: adxl355.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
adxl355_iio_dev::active_channels
uint32_t active_channels
Definition: iio_adxl355.h:54
IIO_VAL_INT_PLUS_NANO
@ IIO_VAL_INT_PLUS_NANO
Definition: iio_types.h:52
scan_type::sign
char sign
Definition: iio_types.h:153
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:386
adxl355_get_raw_temp
int adxl355_get_raw_temp(struct adxl355_dev *dev, uint16_t *raw_temp)
Reads the raw temperature.
Definition: adxl355.c:601
IIO_SHARED_BY_TYPE
@ IIO_SHARED_BY_TYPE
Definition: iio_types.h:120
iio_device_data::dev
void * dev
Definition: iio_types.h:227
adxl355_dev::z_offset
uint16_t z_offset
Definition: adxl355.h:306
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:532
iio_ch_info
Structure holding channel attributess.
Definition: iio_types.h:103
adxl355_iio_dev_init_param::adxl355_dev_init
struct adxl355_init_param * adxl355_dev_init
Definition: iio_adxl355.h:59
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:51
IIO_VAL_FRACTIONAL
@ IIO_VAL_FRACTIONAL
Definition: iio_types.h:55
adxl355_dev::odr_lpf
enum adxl355_odr_lpf odr_lpf
Definition: adxl355.h:301
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:75
adxl355_op_mode
adxl355_op_mode
Definition: adxl355.h:161
ACCEL_AXIS_Y
#define ACCEL_AXIS_Y
Definition: iio_adxl355.c:50
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:294
adxl355_remove
int adxl355_remove(struct adxl355_dev *dev)
Free the resources allocated by adxl355_init().
Definition: adxl355.c:230
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:44
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
adxl355_dev
ADXL355 Device structure.
Definition: adxl355.h:293
iio.h
Header file of iio.
no_os_error.h
Error codes definition.
chan_y
@ chan_y
Definition: iio_adxl355.c:82
iio_attribute::name
const char * name
Definition: iio_types.h:131
adxl355_iio_dev
Definition: iio_adxl355.h:50
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:489
ADXL355_ACCEL_CHANNEL
#define ADXL355_ACCEL_CHANNEL(index, reg, axis)
Definition: iio_adxl355.c:192
adxl355_dev::dev_type
enum adxl355_type dev_type
Definition: adxl355.h:295
adxl355_iio_remove
int adxl355_iio_remove(struct adxl355_iio_dev *desc)
Free the resources allocated by adxl355_iio_init().
Definition: iio_adxl355.c:1092
iio_attribute
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
iio_buffer::active_mask
uint32_t active_mask
Definition: iio_types.h:211
ACCEL_AXIS_X
#define ACCEL_AXIS_X
Definition: iio_adxl355.c:49
iio_adxl355.h
Header file of IIO ADXL355 Driver.
chan_z
@ chan_z
Definition: iio_adxl355.c:83
iio_parse_value
int32_t iio_parse_value(char *buf, enum iio_val fmt, int32_t *val, int32_t *val2)
Definition: iio.c:610
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:1038
adxl355_iio_accel_chans
adxl355_iio_accel_chans
Definition: iio_adxl355.c:80
ADXL355_STDBY_TEMP_OFF_DRDY_OFF
@ ADXL355_STDBY_TEMP_OFF_DRDY_OFF
Definition: adxl355.h:169
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:300
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:661
iio_ch_info::address
uint32_t address
Definition: iio_types.h:113
adxl355_dev::x_offset
uint16_t x_offset
Definition: adxl355.h:304
adxl355_iio_dev::iio_dev
struct iio_device * iio_dev
Definition: iio_adxl355.h:52
ACCEL_AXIS_Z
#define ACCEL_AXIS_Z
Definition: iio_adxl355.c:51
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
IIO_TEMP
@ IIO_TEMP
Definition: iio_types.h:69
iio_ch_info::type
enum iio_chan_type type
Definition: iio_types.h:109
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:437
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
ID_ADXL355
@ ID_ADXL355
Definition: adxl355.h:156
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:162
adxl355_iio_remove
int adxl355_iio_remove(struct adxl355_iio_dev *desc)
Free the resources allocated by adxl355_iio_init().
Definition: iio_adxl355.c:1092
chan_x
@ chan_x
Definition: iio_adxl355.c:81
ID_ADXL357
@ ID_ADXL357
Definition: adxl355.h:157
ID_ADXL359
@ ID_ADXL359
Definition: adxl355.h:158
adxl355_dev::hpf_corner
enum adxl355_hpf_corner hpf_corner
Definition: adxl355.h:302
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:107
scan_type
Definition: iio_types.h:151
TERA
#define TERA
Definition: no_os_units.h:40
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:137
MEGA
#define MEGA
Definition: no_os_units.h:42
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:252
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:1038
no_os_sign_extend32
int32_t no_os_sign_extend32(uint32_t value, int index)
adxl355_iio_dev_init_param
Definition: iio_adxl355.h:58
adxl355_iio_dev::no_of_active_channels
uint8_t no_of_active_channels
Definition: iio_adxl355.h:55
adxl355_iio_dev::adxl355_hpf_3db_table
int adxl355_hpf_3db_table[7][2]
Definition: iio_adxl355.h:53
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:51
no_os_div_u64
uint64_t no_os_div_u64(uint64_t dividend, uint32_t divisor)