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

Source file for the LTP8800 IIO Driver. More...

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "no_os_alloc.h"
#include "no_os_error.h"
#include "no_os_units.h"
#include "no_os_util.h"
#include "ltp8800.h"
#include "iio_ltp8800.h"
Include dependency graph for iio_ltp8800.c:

Enumerations

enum  ltp8800_iio_chan_type {
  LTP8800_IIO_VOUT_CHAN ,
  LTP8800_IIO_VIN_CHAN ,
  LTP8800_IIO_IOUT_CHAN ,
  LTP8800_IIO_IIN_CHAN ,
  LTP8800_IIO_TEMP_CHAN
}
 
enum  ltp8800_iio_user_settings {
  LTP8800_IIO_STORE_USER_ALL ,
  LTP8800_IIO_RESTORE_USER_ALL
}
 

Functions

int ltp8800_iio_init (struct ltp8800_iio_desc **iio_desc, struct ltp8800_iio_desc_init_param *init_param)
 Initializes the LTP8800 IIO descriptor.
 
int ltp8800_iio_remove (struct ltp8800_iio_desc *iio_desc)
 Free resources allocated by the init function.
 

Detailed Description

Source file for the LTP8800 IIO Driver.

Author
Cedric Justine Encarnacion (cedri.nosp@m.cjus.nosp@m.tine..nosp@m.enca.nosp@m.rnaci.nosp@m.on@a.nosp@m.nalog.nosp@m..com)

Copyright 2024(c) Analog Devices, Inc.

SPDX-License-Identifier: BSD-3-Clause

Enumeration Type Documentation

◆ ltp8800_iio_chan_type

Enumerator
LTP8800_IIO_VOUT_CHAN 
LTP8800_IIO_VIN_CHAN 
LTP8800_IIO_IOUT_CHAN 
LTP8800_IIO_IIN_CHAN 
LTP8800_IIO_TEMP_CHAN 

◆ ltp8800_iio_user_settings

Enumerator
LTP8800_IIO_STORE_USER_ALL 
LTP8800_IIO_RESTORE_USER_ALL 

Function Documentation

◆ ltp8800_iio_init()

int ltp8800_iio_init ( struct ltp8800_iio_desc ** iio_desc,
struct ltp8800_iio_desc_init_param * init_param )

Initializes the LTP8800 IIO descriptor.

Parameters
iio_desc- The iio device descriptor.
init_param- The structure that contains the device initial parameters.
Returns
0 in case of success, an error code otherwise.

◆ ltp8800_iio_remove()

int ltp8800_iio_remove ( struct ltp8800_iio_desc * iio_desc)

Free resources allocated by the init function.

Parameters
iio_desc- The iio device descriptor.
Returns
0 in case of success, an error code otherwise.