precision-converters-firmware
Macros | Functions | Variables
24xx32a_eeprom_iio.c File Reference

Implementation of 24XX32A EEPROM device IIO application interfaces. More...

#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include "24xx32a_eeprom_iio.h"
#include "app_config.h"
#include "common.h"
#include "no_os_error.h"
#include "iio.h"
#include "iio_types.h"
Include dependency graph for 24xx32a_eeprom_iio.c:

Macros

#define NUM_OF_IIO_DEVICES   1
 

Functions

int32_t debug_reg_read (void *dev, uint32_t reg, uint32_t *readval)
 Read the device register value. More...
 
int32_t debug_reg_write (void *dev, uint32_t reg, uint32_t writeval)
 Write into the device register (single-byte write) More...
 
int32_t evb_discovery_iio_init (void)
 Initialize the IIO interface. More...
 
void evb_discovery_iio_event_handler (void)
 Run the IIO event handler. More...
 

Variables

struct iio_attribute channel_input_attributes []
 

Detailed Description

Implementation of 24XX32A EEPROM device IIO application interfaces.

Copyright (c) 2022-23 Analog Devices, Inc. All rights reserved.

This software is proprietary to Analog Devices, Inc. and its licensors. By using this software you agree to the terms of the associated Analog Devices Software License Agreement.

Macro Definition Documentation

◆ NUM_OF_IIO_DEVICES

#define NUM_OF_IIO_DEVICES   1

Function Documentation

◆ debug_reg_read()

int32_t debug_reg_read ( void *  dev,
uint32_t  reg,
uint32_t *  readval 
)

Read the device register value.

Parameters
dev[in]-Pointer to IIO device instance
reg[in]-Register address to read from
readval[out]-Pointer to variable to read data into
Returns
0 in case of success, negative error code otherwise

◆ debug_reg_write()

int32_t debug_reg_write ( void *  dev,
uint32_t  reg,
uint32_t  writeval 
)

Write into the device register (single-byte write)

Parameters
dev[in]- Pointer to IIO device instance
reg[in]- Register address to write into
writeval[in]- Register value to write
Returns
0 in case of success, negative error code otherwise

◆ evb_discovery_iio_event_handler()

void evb_discovery_iio_event_handler ( void  )

Run the IIO event handler.

Returns
none

This function monitors the new IIO client event

Here is the caller graph for this function:

◆ evb_discovery_iio_init()

int32_t evb_discovery_iio_init ( void  )

Initialize the IIO interface.

Returns
none
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

Variable Documentation

◆ channel_input_attributes

struct iio_attribute channel_input_attributes[]
Initial value:
= {
END_ATTRIBUTES_ARRAY
}