no-OS
iio_max14916.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef IIO_MAX14916_H
34 #define IIO_MAX14916_H
35 
36 #include <stdint.h>
37 #include <stdbool.h>
38 #include "iio.h"
39 #include "iio_types.h"
40 #include "max14916.h"
41 
48 };
49 
56 };
57 
61 
64 
65 #endif /* IIO_MAX14916_H */
no_os_alloc.h
END_ATTRIBUTES_ARRAY
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
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:126
IIO_VAL_INT
@ IIO_VAL_INT
Definition: iio_types.h:50
iio_channel
Struct describing the scan type.
Definition: iio_types.h:168
max14916_iio_desc_init_param
Initialization parameter for the MAX14916 IIO descriptor.
Definition: iio_max14916.h:53
max149x6_desc
Device descriptor for MAX149X6.
Definition: max149x6-base.h:67
iio_device::channels
struct iio_channel * channels
Definition: iio_types.h:254
iio_desc
Definition: iio.c:204
iio_ch_info
Structure holding channel attributess.
Definition: iio_types.h:103
max14916_init
int max14916_init(struct max149x6_desc **desc, struct max149x6_init_param *param)
Initialize and configure the MAX14916 device.
Definition: max14916.c:203
no_os_units.h
Header file of Units.
max14916_iio_desc::iio_dev
struct iio_device * iio_dev
Definition: iio_max14916.h:47
MAX14916_CHANNEL
#define MAX14916_CHANNEL(_addr)
Definition: iio_max14916.c:43
max14916_iio_desc::max14916_desc
struct max149x6_desc * max14916_desc
Definition: iio_max14916.h:46
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:239
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:70
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
iio_device::debug_reg_read
int32_t(* debug_reg_read)(void *dev, uint32_t reg, uint32_t *readval)
Definition: iio_types.h:283
iio_channel::ch_out
bool ch_out
Definition: iio_types.h:188
max14916_iio_desc_init_param::max14916_init_param
struct max149x6_init_param * max14916_init_param
Definition: iio_max14916.h:54
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:98
iio.h
Header file of iio.
no_os_error.h
Error codes definition.
max14916_iio_desc
MAX14916 specific IIO descriptor.
Definition: iio_max14916.h:45
iio_attribute::name
const char * name
Definition: iio_types.h:131
max14916_iio_desc_init_param::ch_enable
bool ch_enable[MAX14916_CHANNELS]
Definition: iio_max14916.h:55
iio_attribute
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
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:630
MAX14916_CHANNELS
#define MAX14916_CHANNELS
Definition: max14916.h:43
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:239
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
iio_ch_info::address
uint32_t address
Definition: iio_types.h:113
iio_channel::attributes
struct iio_attribute * attributes
Definition: iio_types.h:186
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:47
iio_device::num_ch
uint16_t num_ch
Definition: iio_types.h:252
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
NULL
#define NULL
Definition: wrapper.h:64
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
max14916_iio_remove
int max14916_iio_remove(struct max14916_iio_desc *)
Free resources allocated by the init function.
Definition: iio_max14916.c:278
max14916_remove
int max14916_remove(struct max149x6_desc *desc)
Free the resources allocated during init.
Definition: max14916.c:315
max14916_iio_setup_channels
int max14916_iio_setup_channels(struct max14916_iio_desc *desc, bool *ch_enable)
Definition: iio_max14916.c:176
max149x6_init_param
Initialization parameter for the MAX149X6 device.
Definition: max149x6-base.h:54
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:278