no-OS
iio_adm1177.h
Go to the documentation of this file.
1 /**************************************************************************/
34 #ifndef IIO_ADM1177_H
35 #define IIO_ADM1177_H
36 
37 #include "iio.h"
38 #include "iio_types.h"
39 
43 
44  uint32_t active_channels;
46 };
47 
50 };
51 
52 int adm1177_iio_init(struct adm1177_iio_dev **iio_dev,
54 
55 int adm1177_iio_remove(struct adm1177_iio_dev *desc);
56 
57 #endif
ADM1177_V_FULLSCALE_0
#define ADM1177_V_FULLSCALE_0
Definition: adm1177.h:81
no_os_alloc.h
END_ATTRIBUTES_ARRAY
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
IIO_VAL_INT
@ IIO_VAL_INT
Definition: iio_types.h:50
iio_channel
Struct describing the scan type.
Definition: iio_types.h:168
adm1177_iio_dev::no_of_active_channels
uint8_t no_of_active_channels
Definition: iio_adm1177.h:45
scan_type::sign
char sign
Definition: iio_types.h:153
adm1177_remove
int adm1177_remove(struct adm1177_dev *device)
Free the resources allocated by adm1177_init().
Definition: adm1177.c:79
adm1177_iio_remove
int adm1177_iio_remove(struct adm1177_iio_dev *desc)
Definition: iio_adm1177.c:248
adm1177_iio_dev::iio_dev
struct iio_device * iio_dev
Definition: iio_adm1177.h:42
IIO_VAL_FRACTIONAL_LOG2
@ IIO_VAL_FRACTIONAL_LOG2
Definition: iio_types.h:56
adm1177_iio_remove
int adm1177_iio_remove(struct adm1177_iio_dev *desc)
Definition: iio_adm1177.c:248
iio_ch_info
Structure holding channel attributess.
Definition: iio_types.h:103
adm1177_chan
adm1177_chan
Definition: iio_adm1177.c:183
IIO_VAL_FRACTIONAL
@ IIO_VAL_FRACTIONAL
Definition: iio_types.h:55
adm1177_iio_init_param
Definition: iio_adm1177.h:48
device
Definition: ad9361_util.h:69
adm1177_write
int adm1177_write(struct adm1177_dev *device, uint8_t cmd, uint8_t reg_address)
In the write command byte operation, the master device sends a command byte to the slave device.
Definition: adm1177.c:139
adm1177_iio_dev::active_channels
uint32_t active_channels
Definition: iio_adm1177.h:44
iio_channel::ch_type
enum iio_chan_type ch_type
Definition: iio_types.h:172
ADM1177_CURRENT
@ ADM1177_CURRENT
Definition: iio_adm1177.c:185
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
ADM1177_R_SENSE
#define ADM1177_R_SENSE
Definition: adm1177.h:83
adm1177.h
iio.h
Header file of iio.
no_os_error.h
Error codes definition.
iio_attribute::name
const char * name
Definition: iio_types.h:131
adm1177_iio_init_param::adm1177_initial
struct adm1177_init_param * adm1177_initial
Definition: iio_adm1177.h:49
adm1177_iio_init
int adm1177_iio_init(struct adm1177_iio_dev **iio_dev, struct adm1177_iio_init_param *init_param)
Definition: iio_adm1177.c:218
ADM1177_CMD_I_CONT
#define ADM1177_CMD_I_CONT
Definition: adm1177.h:48
ADM1177_VOLTAGE
@ ADM1177_VOLTAGE
Definition: iio_adm1177.c:184
iio_attribute
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
ADM1177_VRANGE_LOW
@ ADM1177_VRANGE_LOW
Definition: adm1177.h:93
adm1177_read_conv
int adm1177_read_conv(struct adm1177_dev *device, uint16_t *conv_voltage, uint16_t *conv_current)
Gets the voltage/current readback from the ADM1177s I2C ADC, if the device is initialized right and t...
Definition: adm1177.c:206
adm1177_dev::vrange
enum adm1177_vrange vrange
Definition: adm1177.h:100
ADM1177_VOLTAGE_EN
@ ADM1177_VOLTAGE_EN
Definition: adm1177.h:86
IIO_CURRENT
@ IIO_CURRENT
Definition: iio_types.h:66
adm1177_iio_init
int adm1177_iio_init(struct adm1177_iio_dev **iio_dev, struct adm1177_iio_init_param *init_param)
Definition: iio_adm1177.c:218
IIO_VOLTAGE
@ IIO_VOLTAGE
Definition: iio_types.h:65
ADM1177_V_FULLSCALE_1
#define ADM1177_V_FULLSCALE_1
Definition: adm1177.h:82
adm1177_iio_dev
Definition: iio_adm1177.h:40
adm1177_dev
Definition: adm1177.h:97
ADM1177_CMD_V_CONT
#define ADM1177_CMD_V_CONT
Definition: adm1177.h:46
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
ADM1177_RESOLUTION
#define ADM1177_RESOLUTION
Definition: adm1177.h:80
iio_types.h
Header file for iio_types.
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_ch_info::type
enum iio_chan_type type
Definition: iio_types.h:109
no_os_hweight8
unsigned int no_os_hweight8(uint8_t word)
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
iio_device
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
adm1177_iio_dev::adm1177_dev
struct adm1177_dev * adm1177_dev
Definition: iio_adm1177.h:41
ADM1177_CURRENT_EN
@ ADM1177_CURRENT_EN
Definition: adm1177.h:87
scan_type
Definition: iio_types.h:151
no_os_util.h
Header file of utility functions.
iio_adm1177.h
Header file of iio_adm1177.
adm1177_init
int adm1177_init(struct adm1177_dev **device, struct adm1177_init_param *init_param)
Initializes I2C.
Definition: adm1177.c:50
ADM1177_I_FULLSCALE
#define ADM1177_I_FULLSCALE
Definition: adm1177.h:79
adm1177_init_param
Definition: adm1177.h:103
scan_type::realbits
uint8_t realbits
Definition: iio_types.h:155