no-OS
Loading...
Searching...
No Matches
iio_ad5791.c File Reference

Implementation of AD5791 IIO Driver. More...

#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "iio_ad5791.h"
#include "no_os_error.h"
#include "no_os_alloc.h"
Include dependency graph for iio_ad5791.c:

Functions

int32_t ad5791_iio_init (struct ad5791_iio_desc **iio_dev, struct ad5791_iio_init_param *init_param)
 Initialize the AD5791 IIO driver.
 
int32_t ad5791_iio_remove (struct ad5791_iio_desc *desc)
 Free memory allocated by ad5791_iio_init().
 

Variables

struct iio_device const iio_ad5791_device
 

Detailed Description

Implementation of AD5791 IIO Driver.

Author
Andrei Drimbarean (andre.nosp@m.i.dr.nosp@m.imbar.nosp@m.ean@.nosp@m.analo.nosp@m.g.co.nosp@m.m)

Copyright 2021(c) Analog Devices, Inc.

SPDX-License-Identifier: BSD-3-Clause

Function Documentation

◆ ad5791_iio_init()

int32_t ad5791_iio_init ( struct ad5791_iio_desc ** iio_dev,
struct ad5791_iio_init_param * init_param )

Initialize the AD5791 IIO driver.

Parameters
iio_dev- Pointer to the IIO driver handler.
init_param- Pointer to the initialization structure.
Returns
0 in case of success, negative error code otherwise.

◆ ad5791_iio_remove()

int32_t ad5791_iio_remove ( struct ad5791_iio_desc * desc)

Free memory allocated by ad5791_iio_init().

Parameters
desc-Pointer to the driver handler.
Returns
0 in case of success, negative error code otherwise.

Variable Documentation

◆ iio_ad5791_device

struct iio_device const iio_ad5791_device
Initial value:
= {
.num_ch = AD5791_CH_NO,
.channels = (struct iio_channel *)ad5791_channels,
.attributes = NULL,
.debug_attributes = NULL,
.buffer_attributes = NULL,
.pre_enable = NULL,
.post_disable = NULL,
.read_dev = NULL,
.debug_reg_read = ad5791_iio_reg_read,
.debug_reg_write = ad5791_iio_reg_write
}
#define AD5791_CH_NO
Definition iio_ad5791.h:18
Struct describing the scan type.
Definition iio_types.h:137
#define NULL
Definition wrapper.h:67