no-OS
iio_adxl313.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef IIO_ADXL313_H
34 #define IIO_ADXL313_H
35 
36 /******************************************************************************/
37 /***************************** Include Files **********************************/
38 /******************************************************************************/
39 #include "iio.h"
40 
41 /******************************************************************************/
42 /********************** Macros and Constants Definitions **********************/
43 /******************************************************************************/
44 
45 /******************************************************************************/
46 /*************************** Types Declarations *******************************/
47 /******************************************************************************/
51  uint32_t active_channels;
53 };
54 
57 };
58 
59 /******************************************************************************/
60 /************************ Functions Declarations ******************************/
61 /******************************************************************************/
62 int adxl313_iio_init(struct adxl313_iio_dev **iio_dev,
64 
65 int adxl313_iio_remove(struct adxl313_iio_dev *desc);
66 
67 #endif
IIO_ACCEL
@ IIO_ACCEL
Definition: iio_types.h:71
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:116
ADXL313_RANGE_FACTOR
#define ADXL313_RANGE_FACTOR
Definition: adxl313.h:228
IIO_VAL_INT
@ IIO_VAL_INT
Definition: iio_types.h:50
iio_channel
Struct describing the scan type.
Definition: iio_types.h:168
scan_type::sign
char sign
Definition: iio_types.h:153
IIO_SHARED_BY_TYPE
@ IIO_SHARED_BY_TYPE
Definition: iio_types.h:120
adxl313_iio_dev::active_channels
uint32_t active_channels
Definition: iio_adxl313.h:51
adxl313_op_mode
adxl313_op_mode
Enum for operating mode.
Definition: adxl313.h:263
adxl313_init_param
Structure holding the parameters for ADXL313 device initialization.
Definition: adxl313.h:397
iio_ch_info
Structure holding channel attributess.
Definition: iio_types.h:103
adxl313_remove
int adxl313_remove(struct adxl313_dev *dev)
Definition: adxl313.c:352
adxl313_set_range
int adxl313_set_range(struct adxl313_dev *dev, enum adxl313_range range)
Definition: adxl313.c:2037
IIO_VAL_INT_PLUS_MICRO
@ IIO_VAL_INT_PLUS_MICRO
Definition: iio_types.h:51
CHAN_Y
@ CHAN_Y
Definition: iio_adxl313.c:91
adxl313_set_raw_offset
int adxl313_set_raw_offset(struct adxl313_dev *dev, int32_t offset_raw, enum adxl313_axis axis)
Definition: adxl313.c:600
IIO_VAL_FRACTIONAL
@ IIO_VAL_FRACTIONAL
Definition: iio_types.h:55
adxl313_iio_dev::iio_dev
struct iio_device * iio_dev
Definition: iio_adxl313.h:50
adxl313_dev
ADXL313 Device structure.
Definition: adxl313.h:488
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
ID_ADXL312
@ ID_ADXL312
Definition: adxl313.h:245
adxl313_iio_dev
Definition: iio_adxl313.h:48
SCALE_FACTOR
#define SCALE_FACTOR
Definition: iio_adxl313.c:48
ADXL313_Z_AXIS
@ ADXL313_Z_AXIS
Definition: adxl313.h:340
adxl313_iio_remove
int adxl313_iio_remove(struct adxl313_iio_dev *desc)
Definition: iio_adxl313.c:1097
adxl313_dev::range
enum adxl313_range range
Definition: adxl313.h:496
adxl313_enable_full_res
int adxl313_enable_full_res(struct adxl313_dev *dev)
Definition: adxl313.c:1959
iio.h
Header file of iio.
no_os_error.h
Error codes definition.
ADXL313_MEAS
@ ADXL313_MEAS
Definition: adxl313.h:265
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:1030
iio_attribute::name
const char * name
Definition: iio_types.h:131
adxl313_iio_accel_chans
adxl313_iio_accel_chans
Definition: iio_adxl313.c:89
ID_ADXL313
@ ID_ADXL313
Definition: adxl313.h:246
ADXL313_4G_RANGE
@ ADXL313_4G_RANGE
Definition: adxl313.h:297
MIN_SHIFT
#define MIN_SHIFT
Definition: iio_adxl313.c:49
iio_attribute
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
adxl313_iio_dev::no_of_active_channels
uint8_t no_of_active_channels
Definition: iio_adxl313.h:52
ADXL313_12G_RANGE
@ ADXL313_12G_RANGE
Definition: adxl313.h:301
adxl313_iio_dev::adxl313_dev
struct adxl313_dev * adxl313_dev
Definition: iio_adxl313.h:49
CHAN_X
@ CHAN_X
Definition: iio_adxl313.c:90
iio_parse_value
int32_t iio_parse_value(char *buf, enum iio_val fmt, int32_t *val, int32_t *val2)
Definition: iio.c:630
adxl313_write
int adxl313_write(struct adxl313_dev *dev, uint8_t base_address, uint16_t size, uint8_t *write_data)
Definition: adxl313.c:101
adxl313_dev::dev_type
enum adxl313_type dev_type
Definition: adxl313.h:494
ADXL313_1_5G_RANGE
@ ADXL313_1_5G_RANGE
Definition: adxl313.h:298
ADXL313_X_AXIS
@ ADXL313_X_AXIS
Definition: adxl313.h:338
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:742
ADXL313_BYPAS_MODE
@ ADXL313_BYPAS_MODE
Definition: adxl313.h:348
adxl313_set_odr
int adxl313_set_odr(struct adxl313_dev *dev, enum adxl313_odr odr)
Definition: adxl313.c:1368
ADXL313_0_5G_RANGE
@ ADXL313_0_5G_RANGE
Definition: adxl313.h:294
adxl313_get_full_res_setting
int adxl313_get_full_res_setting(struct adxl313_dev *dev, uint8_t *full_res)
Definition: adxl313.c:2013
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
ADXL313_Y_AXIS
@ ADXL313_Y_AXIS
Definition: adxl313.h:339
iio_ch_info::address
uint32_t address
Definition: iio_types.h:113
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
adxl313_dev::resolution
enum adxl313_resolution resolution
Definition: adxl313.h:498
iio_ch_info::type
enum iio_chan_type type
Definition: iio_types.h:109
adxl313_dev::op_mode
enum adxl313_op_mode op_mode
Definition: adxl313.h:500
adxl313_set_fifo_mode
int adxl313_set_fifo_mode(struct adxl313_dev *dev, enum adxl313_fifo_mode mode)
Definition: adxl313.c:863
NULL
#define NULL
Definition: wrapper.h:64
adxl313_dev::odr
enum adxl313_odr odr
Definition: adxl313.h:504
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
adxl313_iio_dev_init_param
Definition: iio_adxl313.h:55
iio_device
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
adxl313_set_op_mode
int adxl313_set_op_mode(struct adxl313_dev *dev, enum adxl313_op_mode op_mode)
Definition: adxl313.c:419
scan_type
Definition: iio_types.h:151
adxl313_disable_full_res
int adxl313_disable_full_res(struct adxl313_dev *dev)
Definition: adxl313.c:1985
ADXL313_ACCEL_CHANNEL
#define ADXL313_ACCEL_CHANNEL(index, reg, axis)
Definition: iio_adxl313.c:192
adxl313_iio_remove
int adxl313_iio_remove(struct adxl313_iio_dev *desc)
Definition: iio_adxl313.c:1097
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:1030
adxl313_read
int adxl313_read(struct adxl313_dev *dev, uint8_t base_address, uint16_t size, uint8_t *read_data)
Definition: adxl313.c:66
CHAN_Z
@ CHAN_Z
Definition: iio_adxl313.c:92
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:694
iio_adxl313.h
Header file of IIO ADXL355 Driver.
ADXL313_STDBY
@ ADXL313_STDBY
Definition: adxl313.h:264
adxl313_init
int adxl313_init(struct adxl313_dev **device, struct adxl313_init_param init_param)
Definition: adxl313.c:162
adxl313_iio_dev_init_param::adxl313_dev_init
struct adxl313_init_param * adxl313_dev_init
Definition: iio_adxl313.h:56
ID_ADXL314
@ ID_ADXL314
Definition: adxl313.h:247