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

Minimal CAPI loopback test runner. More...

#include <stdbool.h>
#include "capi_uart.h"
#include "common_data.h"
#include "test_framework.h"
#include "tests/test_gpio.h"
#include "tests/test_irq.h"
#include "tests/test_spi.h"
#include "tests/test_timer.h"
#include "tests/test_i2c.h"
#include "tests/test_uart.h"
#include "tests/test_dma.h"
Include dependency graph for capi_loopback.c:

Classes

struct  test_entry
 Top-level test group registered by the example. More...
 

Macros

#define NUM_TESTS   (sizeof(tests) / sizeof(tests[0]))
 

Typedefs

typedef int(* test_func_t) (void)
 Common function signature for a top-level test group.
 

Functions

int example_main (void)
 Initialize UART/framework state, execute the registry and clean up.
 

Detailed Description

Minimal CAPI loopback test runner.

The example owns the top-level test registry and the test framework lifetime. Hardware mappings and framework setup data are supplied by common_data.

Copyright (c) 2026 Analog Devices, Inc. SPDX-License-Identifier: BSD-3-Clause

Macro Definition Documentation

◆ NUM_TESTS

#define NUM_TESTS   (sizeof(tests) / sizeof(tests[0]))

Typedef Documentation

◆ test_func_t

typedef int(* test_func_t) (void)

Common function signature for a top-level test group.

Function Documentation

◆ example_main()

int example_main ( void )

Initialize UART/framework state, execute the registry and clean up.

Basic example main execution.

Basic example main executiont.

The platform main.c is the real program entry point. It performs platform startup, then calls this no-OS example entry.

Returns
0 on pass, first test/runtime error 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