![]() |
no-OS
|
APARDSPOE color sensor example for AD-APARD32690-SL with AD-APARDSPOE-SL hat chained with an AD-APARDPFWD-SL. Reads RGBC data from a TCS34725 color sensor and exposes it over a TCP command server on the ADIN1110 link. More...
#include <stdio.h>#include <string.h>#include "common_data.h"#include "lwip_socket.h"#include "lwip_adin1110.h"#include "tcp_socket.h"#include "no_os_error.h"#include "no_os_delay.h"#include "no_os_gpio.h"#include "adin1110.h"#include "tcs34725.h"#include "network_interface.h"Macros | |
| #define | SERVER_PORT 10000 |
| #define | CMD_BUF_SIZE 64 |
| #define | RESP_BUF_SIZE 64 |
| #define | COLOR_PRINT_INTERVAL_MS 200 |
Functions | |
| int | example_main () |
| Configure the output port of the AD-APARDPFWD-SL, initialize the TCS34725 color sensor, then open a TCP socket to accept commands. | |
APARDSPOE color sensor example for AD-APARD32690-SL with AD-APARDSPOE-SL hat chained with an AD-APARDPFWD-SL. Reads RGBC data from a TCS34725 color sensor and exposes it over a TCP command server on the ADIN1110 link.
Copyright 2026(c) Analog Devices, Inc.
SPDX-License-Identifier: BSD-3-Clause
| #define CMD_BUF_SIZE 64 |
| #define COLOR_PRINT_INTERVAL_MS 200 |
| #define RESP_BUF_SIZE 64 |
| #define SERVER_PORT 10000 |
| int example_main | ( | void | ) |
Configure the output port of the AD-APARDPFWD-SL, initialize the TCS34725 color sensor, then open a TCP socket to accept commands.
Basic example main execution.
Basic example main executiont.
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