no-OS
iio_max14916.h
Go to the documentation of this file.
1 /***************************************************************************/
39 #ifndef IIO_MAX14916_H
40 #define IIO_MAX14916_H
41 
42 #include <stdint.h>
43 #include <stdbool.h>
44 #include "iio.h"
45 #include "iio_types.h"
46 #include "max14916.h"
47 
54 };
55 
62 };
63 
67 
70 
71 #endif /* IIO_MAX14916_H */
no_os_alloc.h
END_ATTRIBUTES_ARRAY
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:122
max149x6_reg_read
int max149x6_reg_read(struct max149x6_desc *desc, uint32_t addr, uint32_t *val)
Read the value of a device register.
Definition: max149x6-base.c:132
IIO_VAL_INT
@ IIO_VAL_INT
Definition: iio_types.h:56
iio_channel
Struct describing the scan type.
Definition: iio_types.h:174
max14916_iio_desc_init_param
Initialization parameter for the MAX14916 IIO descriptor.
Definition: iio_max14916.h:59
max149x6_desc
Device descriptor for MAX149X6.
Definition: max149x6-base.h:73
iio_device::channels
struct iio_channel * channels
Definition: iio_types.h:260
iio_desc
Definition: iio.c:210
iio_ch_info
Structure holding channel attributess.
Definition: iio_types.h:109
max14916_init
int max14916_init(struct max149x6_desc **desc, struct max149x6_init_param *param)
Initialize and configure the MAX14916 device.
Definition: max14916.c:209
no_os_units.h
Header file of Units.
max14916_iio_desc::iio_dev
struct iio_device * iio_dev
Definition: iio_max14916.h:53
MAX14916_CHANNEL
#define MAX14916_CHANNEL(_addr)
Definition: iio_max14916.c:49
max14916_iio_desc::max14916_desc
struct max149x6_desc * max14916_desc
Definition: iio_max14916.h:52
max14916_iio_init
int max14916_iio_init(struct max14916_iio_desc **iio_desc, struct max14916_iio_desc_init_param *init_param)
Initializes the MAX14916 IIO descriptor.
Definition: iio_max14916.c:245
max14916_ch_set
int max14916_ch_set(struct max149x6_desc *desc, uint32_t ch, uint32_t val)
Write the (logic) state of a channel (on/off).
Definition: max14916.c:76
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
iio_device::debug_reg_read
int32_t(* debug_reg_read)(void *dev, uint32_t reg, uint32_t *readval)
Definition: iio_types.h:289
iio_channel::ch_out
bool ch_out
Definition: iio_types.h:194
max14916_iio_desc_init_param::max14916_init_param
struct max149x6_init_param * max14916_init_param
Definition: iio_max14916.h:60
max149x6_reg_write
int max149x6_reg_write(struct max149x6_desc *desc, uint32_t addr, uint32_t val)
Write the value of a device register.
Definition: max149x6-base.c:104
iio.h
Header file of iio.
no_os_error.h
Error codes definition.
max14916_iio_desc
MAX14916 specific IIO descriptor.
Definition: iio_max14916.h:51
iio_attribute::name
const char * name
Definition: iio_types.h:137
max14916_iio_desc_init_param::ch_enable
bool ch_enable[MAX14916_CHANNELS]
Definition: iio_max14916.h:61
iio_attribute
Structure holding pointers to show and store functions.
Definition: iio_types.h:135
iio_max14916.h
Header file of IIO MAX14916 Driver.
iio_parse_value
int32_t iio_parse_value(char *buf, enum iio_val fmt, int32_t *val, int32_t *val2)
Definition: iio.c:616
MAX14916_CHANNELS
#define MAX14916_CHANNELS
Definition: max14916.h:49
max14916_iio_init
int max14916_iio_init(struct max14916_iio_desc **, struct max14916_iio_desc_init_param *)
Initializes the MAX14916 IIO descriptor.
Definition: iio_max14916.c:245
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
iio_ch_info::address
uint32_t address
Definition: iio_types.h:119
iio_channel::attributes
struct iio_attribute * attributes
Definition: iio_types.h:192
iio_types.h
Header file for iio_types.
max14916_ch_get
int max14916_ch_get(struct max149x6_desc *desc, uint32_t ch, uint32_t *val)
Read the high-side state of a channel's switch.
Definition: max14916.c:53
iio_device::num_ch
uint16_t num_ch
Definition: iio_types.h:258
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
NULL
#define NULL
Definition: wrapper.h:64
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:119
iio_device
Structure holding channels and attributes of a device.
Definition: iio_types.h:253
max14916_iio_remove
int max14916_iio_remove(struct max14916_iio_desc *)
Free resources allocated by the init function.
Definition: iio_max14916.c:284
max14916_remove
int max14916_remove(struct max149x6_desc *desc)
Free the resources allocated during init.
Definition: max14916.c:321
max14916_iio_setup_channels
int max14916_iio_setup_channels(struct max14916_iio_desc *desc, bool *ch_enable)
Definition: iio_max14916.c:182
max149x6_init_param
Initialization parameter for the MAX149X6 device.
Definition: max149x6-base.h:60
no_os_util.h
Header file of utility functions.
max14916.h
Header file of MAX14916 Driver.
max14916_iio_remove
int max14916_iio_remove(struct max14916_iio_desc *iio_desc)
Free resources allocated by the init function.
Definition: iio_max14916.c:284