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

Source file for basic example. More...

#include "common_data.h"
#include "max149x6-base.h"
#include "max14916.h"
#include "no_os_delay.h"
#include "no_os_print_log.h"
#include "no_os_irq.h"
Include dependency graph for basic_example.c:

Functions

int example_main ()
 Basic example main execution.
 

Detailed Description

Source file for basic example.

Author
Radu Sabau (radu..nosp@m.saba.nosp@m.u@ana.nosp@m.log..nosp@m.com)

Copyright 2023(c) Analog Devices, Inc.

SPDX-License-Identifier: BSD-3-Clause

Function Documentation

◆ example_main()

int example_main ( void )

Basic example main execution.

Basic example main executiont.

Returns
ret - Result of the example execution. If working correctly, will turn the status led's on and off in the while loop, set some values in the config 2 register, and then return 0.

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

Switch to APG mode

Switch to AWG mode

Parameter to be passed when the callback is called.

GPIO Pin Interrupt Controller

MAX14906 Initialization

Setting SLED set bit 1 in the config register.

Turning the Status LEDs on, then off.

Setting a current limit for channel 0.

Read current limit for all channels.

Setting the on state for channel 0, and then verifying it.

IIO descriptor and initialization parameter.

Channel configuration to be used in the example.

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).