no-OS
iio_adxl313.h
Go to the documentation of this file.
1 /***************************************************************************/
39 #ifndef IIO_ADXL313_H
40 #define IIO_ADXL313_H
41 
42 /******************************************************************************/
43 /***************************** Include Files **********************************/
44 /******************************************************************************/
45 #include "iio.h"
46 
47 /******************************************************************************/
48 /********************** Macros and Constants Definitions **********************/
49 /******************************************************************************/
50 
51 /******************************************************************************/
52 /*************************** Types Declarations *******************************/
53 /******************************************************************************/
57  uint32_t active_channels;
59 };
60 
63 };
64 
65 /******************************************************************************/
66 /************************ Functions Declarations ******************************/
67 /******************************************************************************/
68 int adxl313_iio_init(struct adxl313_iio_dev **iio_dev,
70 
71 int adxl313_iio_remove(struct adxl313_iio_dev *desc);
72 
73 #endif
IIO_ACCEL
@ IIO_ACCEL
Definition: iio_types.h:77
no_os_sign_extend16
int16_t no_os_sign_extend16(uint16_t value, int index)
no_os_alloc.h
END_ATTRIBUTES_ARRAY
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:122
ADXL313_RANGE_FACTOR
#define ADXL313_RANGE_FACTOR
Definition: adxl313.h:234
IIO_VAL_INT
@ IIO_VAL_INT
Definition: iio_types.h:56
iio_channel
Struct describing the scan type.
Definition: iio_types.h:174
scan_type::sign
char sign
Definition: iio_types.h:159
IIO_SHARED_BY_TYPE
@ IIO_SHARED_BY_TYPE
Definition: iio_types.h:126
adxl313_iio_dev::active_channels
uint32_t active_channels
Definition: iio_adxl313.h:57
adxl313_op_mode
adxl313_op_mode
Enum for operating mode.
Definition: adxl313.h:269
adxl313_init_param
Structure holding the parameters for ADXL313 device initialization.
Definition: adxl313.h:403
iio_ch_info
Structure holding channel attributess.
Definition: iio_types.h:109
adxl313_remove
int adxl313_remove(struct adxl313_dev *dev)
Definition: adxl313.c:358
adxl313_set_range
int adxl313_set_range(struct adxl313_dev *dev, enum adxl313_range range)
Definition: adxl313.c:2043
IIO_VAL_INT_PLUS_MICRO
@ IIO_VAL_INT_PLUS_MICRO
Definition: iio_types.h:57
CHAN_Y
@ CHAN_Y
Definition: iio_adxl313.c:97
adxl313_set_raw_offset
int adxl313_set_raw_offset(struct adxl313_dev *dev, int32_t offset_raw, enum adxl313_axis axis)
Definition: adxl313.c:606
IIO_VAL_FRACTIONAL
@ IIO_VAL_FRACTIONAL
Definition: iio_types.h:61
adxl313_iio_dev::iio_dev
struct iio_device * iio_dev
Definition: iio_adxl313.h:56
adxl313_dev
ADXL313 Device structure.
Definition: adxl313.h:494
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:60
NO_OS_ARRAY_SIZE
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:55
ID_ADXL312
@ ID_ADXL312
Definition: adxl313.h:251
adxl313_iio_dev
Definition: iio_adxl313.h:54
SCALE_FACTOR
#define SCALE_FACTOR
Definition: iio_adxl313.c:54
ADXL313_Z_AXIS
@ ADXL313_Z_AXIS
Definition: adxl313.h:346
adxl313_iio_remove
int adxl313_iio_remove(struct adxl313_iio_dev *desc)
Definition: iio_adxl313.c:1103
adxl313_dev::range
enum adxl313_range range
Definition: adxl313.h:502
adxl313_enable_full_res
int adxl313_enable_full_res(struct adxl313_dev *dev)
Definition: adxl313.c:1965
iio.h
Header file of iio.
no_os_error.h
Error codes definition.
ADXL313_MEAS
@ ADXL313_MEAS
Definition: adxl313.h:271
adxl313_iio_init
int adxl313_iio_init(struct adxl313_iio_dev **iio_dev, struct adxl313_iio_dev_init_param *init_param)
Definition: iio_adxl313.c:1036
iio_attribute::name
const char * name
Definition: iio_types.h:137
adxl313_iio_accel_chans
adxl313_iio_accel_chans
Definition: iio_adxl313.c:95
ID_ADXL313
@ ID_ADXL313
Definition: adxl313.h:252
ADXL313_4G_RANGE
@ ADXL313_4G_RANGE
Definition: adxl313.h:303
MIN_SHIFT
#define MIN_SHIFT
Definition: iio_adxl313.c:55
iio_attribute
Structure holding pointers to show and store functions.
Definition: iio_types.h:135
adxl313_iio_dev::no_of_active_channels
uint8_t no_of_active_channels
Definition: iio_adxl313.h:58
ADXL313_12G_RANGE
@ ADXL313_12G_RANGE
Definition: adxl313.h:307
adxl313_iio_dev::adxl313_dev
struct adxl313_dev * adxl313_dev
Definition: iio_adxl313.h:55
CHAN_X
@ CHAN_X
Definition: iio_adxl313.c:96
iio_parse_value
int32_t iio_parse_value(char *buf, enum iio_val fmt, int32_t *val, int32_t *val2)
Definition: iio.c:616
adxl313_write
int adxl313_write(struct adxl313_dev *dev, uint8_t base_address, uint16_t size, uint8_t *write_data)
Definition: adxl313.c:107
adxl313_dev::dev_type
enum adxl313_type dev_type
Definition: adxl313.h:500
ADXL313_1_5G_RANGE
@ ADXL313_1_5G_RANGE
Definition: adxl313.h:304
ADXL313_X_AXIS
@ ADXL313_X_AXIS
Definition: adxl313.h:344
adxl313_get_raw_xyz
int adxl313_get_raw_xyz(struct adxl313_dev *dev, int16_t *x_raw, int16_t *y_raw, int16_t *z_raw)
Definition: adxl313.c:748
ADXL313_BYPAS_MODE
@ ADXL313_BYPAS_MODE
Definition: adxl313.h:354
adxl313_set_odr
int adxl313_set_odr(struct adxl313_dev *dev, enum adxl313_odr odr)
Definition: adxl313.c:1374
ADXL313_0_5G_RANGE
@ ADXL313_0_5G_RANGE
Definition: adxl313.h:300
adxl313_get_full_res_setting
int adxl313_get_full_res_setting(struct adxl313_dev *dev, uint8_t *full_res)
Definition: adxl313.c:2019
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:667
ADXL313_Y_AXIS
@ ADXL313_Y_AXIS
Definition: adxl313.h:345
iio_ch_info::address
uint32_t address
Definition: iio_types.h:119
NO_OS_BIT
#define NO_OS_BIT(x)
Definition: no_os_util.h:51
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:75
adxl313_dev::resolution
enum adxl313_resolution resolution
Definition: adxl313.h:504
iio_ch_info::type
enum iio_chan_type type
Definition: iio_types.h:115
adxl313_dev::op_mode
enum adxl313_op_mode op_mode
Definition: adxl313.h:506
adxl313_set_fifo_mode
int adxl313_set_fifo_mode(struct adxl313_dev *dev, enum adxl313_fifo_mode mode)
Definition: adxl313.c:869
NULL
#define NULL
Definition: wrapper.h:64
adxl313_dev::odr
enum adxl313_odr odr
Definition: adxl313.h:510
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:119
adxl313_iio_dev_init_param
Definition: iio_adxl313.h:61
iio_device
Structure holding channels and attributes of a device.
Definition: iio_types.h:253
adxl313_set_op_mode
int adxl313_set_op_mode(struct adxl313_dev *dev, enum adxl313_op_mode op_mode)
Definition: adxl313.c:425
scan_type
Definition: iio_types.h:157
adxl313_disable_full_res
int adxl313_disable_full_res(struct adxl313_dev *dev)
Definition: adxl313.c:1991
ADXL313_ACCEL_CHANNEL
#define ADXL313_ACCEL_CHANNEL(index, reg, axis)
Definition: iio_adxl313.c:198
adxl313_iio_remove
int adxl313_iio_remove(struct adxl313_iio_dev *desc)
Definition: iio_adxl313.c:1103
adxl313_iio_init
int adxl313_iio_init(struct adxl313_iio_dev **iio_dev, struct adxl313_iio_dev_init_param *init_param)
Definition: iio_adxl313.c:1036
adxl313_read
int adxl313_read(struct adxl313_dev *dev, uint8_t base_address, uint16_t size, uint8_t *read_data)
Definition: adxl313.c:72
CHAN_Z
@ CHAN_Z
Definition: iio_adxl313.c:98
no_os_util.h
Header file of utility functions.
no_os_hweight32
unsigned int no_os_hweight32(uint32_t word)
adxl313.h
Header file of ADXL313 Driver.
adxl313_get_raw_offset
int adxl313_get_raw_offset(struct adxl313_dev *dev, int32_t *offset_raw, enum adxl313_axis axis)
Definition: adxl313.c:700
iio_adxl313.h
Header file of IIO ADXL355 Driver.
ADXL313_STDBY
@ ADXL313_STDBY
Definition: adxl313.h:270
adxl313_init
int adxl313_init(struct adxl313_dev **device, struct adxl313_init_param init_param)
Definition: adxl313.c:168
adxl313_iio_dev_init_param::adxl313_dev_init
struct adxl313_init_param * adxl313_dev_init
Definition: iio_adxl313.h:62
ID_ADXL314
@ ID_ADXL314
Definition: adxl313.h:253