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

Basic example source file for capi_selftest project. Copyright (c) 2025-2026 Analog Devices, Inc. More...

#include <errno.h>
#include <stddef.h>
#include <stdint.h>
#include "common_data.h"
#include "capi_uart.h"
#include "test_framework.h"
Include dependency graph for basic_example.c:

Macros

#define TEST_UART_TX_CHUNK   32U
 Write test framework output through the configured CAPI UART.
 

Functions

int example_main (void)
 Main function for basic example.
 

Detailed Description

Basic example source file for capi_selftest project. Copyright (c) 2025-2026 Analog Devices, Inc.

SPDX-License-Identifier: BSD-3-Clause

Macro Definition Documentation

◆ TEST_UART_TX_CHUNK

#define TEST_UART_TX_CHUNK   32U

Write test framework output through the configured CAPI UART.

Parameters
context- CAPI UART handle.
data- Data to transmit.
length- Number of bytes to transmit.
Returns
0 in case of success, negative error code otherwise.

Function Documentation

◆ example_main()

int example_main ( void )

Main function for basic example.

Basic example main execution.

Basic example main executiont.

Returns
0 in case of success, negative error code otherwise.

IIO descriptor and initialization parameter.

IIO app.

Declaring iio_devices structure

Initializing IIO app init param.

Initializing IIO app.

Running the IIO app (use iio_info or osc in terminal).

Set the threshold voltage to 5V

The comparator output will be available on the GPO_A pin

Set the DAC output on channel C to 5V

Measure input current on channel D

GPIO Pin Interrupt Controller

UART init params

IIO application descriptor

IIO application initialization parameters

iio axi adc configurations.

iio axi dac configurations.

iio instance descriptor.

iio instance descriptor.

iio device instance descriptor.

UART init params

IIO application descriptor

IIO application initialization parameters

iio axi adc configurations.

iio axi dac configurations.

iio instance descriptor.

iio instance descriptor.

iio device instance descriptor.

Negative temperature

Positive temperature

Negative temperature

Positive temperature