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

FreeRTOS-based iperf LWIP example for the ADIN1140 project. More...

#include <string.h>
#include <errno.h>
#include "common_data.h"
#include "lwip_socket.h"
#include "lwip_adin1140.h"
#include "adin1140.h"
#include "lwip/apps/lwiperf.h"
#include "lwip/ip_addr.h"
#include "no_os_delay.h"
#include "no_os_print_log.h"
#include "no_os_irq.h"
#include "FreeRTOS.h"
#include "task.h"
Include dependency graph for iperf_lwip_freertos.c:

Classes

struct  adin1140_net_data
 

Macros

#define NET_INT_IRQ_PRIORITY    (configMAX_SYSCALL_INTERRUPT_PRIORITY >> (8 - configPRIO_BITS))
 

Functions

int example_main ()
 Basic example main executiont.
 

Detailed Description

FreeRTOS-based iperf LWIP example for the ADIN1140 project.

Author
Ciprian Regus (cipri.nosp@m.an.r.nosp@m.egus@.nosp@m.anal.nosp@m.og.co.nosp@m.m)

Copyright 2025-2026(c) Analog Devices, Inc.

SPDX-License-Identifier: BSD-3-Clause

Macro Definition Documentation

◆ NET_INT_IRQ_PRIORITY

#define NET_INT_IRQ_PRIORITY    (configMAX_SYSCALL_INTERRUPT_PRIORITY >> (8 - configPRIO_BITS))

Function Documentation

◆ example_main()

int example_main ( void )

Basic example main executiont.

Basic example main execution.

Returns
ret - Result of the example execution. If working correctly, will execute continuously the while(1) loop and will not return.

Basic example main executiont.

  • 50 ADC readings with delay.
  • Threshold event (non-blocking).
    Returns
    ret - Result of the example execution. If working correctly, will execute continuously the while(1) loop and will not return.
    Basic example main executiont.
Returns
ret - Result of the example execution. If working correctly, will execute print the sample data.

Basic example main executiont.

Returns
ret - Result of the example execution. If working correctly, will execute continuously the while(1) loop and will not return.

Basic example main executiont.

Returns
ret - 0 on success.

Basic example main executiont.

Returns
ret - Result of the example execution. If working correctly, will execute continuously function iio_app_run and will not return.

Basic example main executiont.

Returns
ret - Result of the example execution. If working correctly, will execute continuously the iio_app_run and will not return.

Basic example main executiont.

Returns
0 on success, negative error code otherwise.

Basic example main executiont.

Returns
ret - Result of the example execution. If working correctly, will measure active and reactive energy and RMS for channel A and for voltage stopping whenever an interrupt occurs and resulting in a stoppage of the measurement.

Basic example main executiont.

Returns
ret - Result of the example execution.

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