![]() |
no-OS
|
Implementation of terminal command control for ADIN1320. More...
#include <errno.h>#include <stdbool.h>#include <stdint.h>#include <string.h>#include "adin1320.h"#include "common_data.h"#include "mdio_spi.h"#include "no_os_alloc.h"#include "no_os_delay.h"#include "no_os_gpio.h"#include "no_os_mdio.h"#include "no_os_print_log.h"#include "no_os_util.h"Classes | |
| struct | cmd_config |
| struct | cmd_input |
| struct | cmd_gpio |
Macros | |
| #define | FW_VERSION_MAJOR 1 |
| #define | FW_VERSION_MINOR 0 |
| #define | FW_VERSION_PATCH 0 |
| #define | EVAL_BOARD_NAME "EVAL-ADIN1320FMCZ" |
| #define | CMD_PARAM_EMPTY -1 |
| #define | CMD_BUFFER_SIZE 100 |
| #define | CMD_PARAM_SIZE 10 |
Enumerations | |
| enum | cmd_type { CMD_TYPE_NONE = 0 , CMD_TYPE_MDIO_READ , CMD_TYPE_MDIO_WRITE , CMD_TYPE_HELP , CMD_TYPE_RESET , CMD_TYPE_MAX } |
Implementation of terminal command control for ADIN1320.
Copyright 2026(c) Analog Devices, Inc.
SPDX-License-Identifier: BSD-3-Clause
| #define CMD_BUFFER_SIZE 100 |
| #define CMD_PARAM_EMPTY -1 |
| #define CMD_PARAM_SIZE 10 |
| #define EVAL_BOARD_NAME "EVAL-ADIN1320FMCZ" |
| #define FW_VERSION_MAJOR 1 |
| #define FW_VERSION_MINOR 0 |
| #define FW_VERSION_PATCH 0 |
| enum cmd_type |
| int board_init | ( | struct no_os_uart_desc ** | uart_desc, |
| struct cmd_config * | cmd_cfg, | ||
| struct cmd_gpio ** | cmd_gpio ) |
| void cmd_mdio_read | ( | struct adin1320_desc * | dev, |
| struct cmd_input * | cmd_input ) |
| void cmd_mdio_write | ( | struct adin1320_desc * | dev, |
| struct cmd_input * | cmd_input ) |
| void cmd_print_list | ( | struct cmd_input * | cmd_input | ) |
| void cmd_reset | ( | struct adin1320_desc * | dev_0, |
| struct adin1320_desc * | dev_8, | ||
| struct cmd_input * | cmd_input, | ||
| bool | dev_init[2] ) |
| int device_init | ( | struct adin1320_desc ** | dev_0, |
| struct adin1320_desc ** | dev_8, | ||
| bool | dev_init[2] ) |
| int example_main | ( | void | ) |
Basic example main executiont.
Basic example main execution.
Basic example main executiont.
Basic example main executiont.
Basic example main executiont.
Basic example main executiont.
Basic example main executiont.
Basic example main executiont.
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
| int fw_mode_init | ( | struct cmd_config | cmd_cfg, |
| struct cmd_gpio * | cmd_gpio, | ||
| struct adin1320_desc ** | dev_0, | ||
| struct adin1320_desc ** | dev_8, | ||
| bool * | dev_init ) |
| int fw_mode_mdi_path_test | ( | struct cmd_gpio * | cmd_gpio, |
| struct adin1320_desc * | dev_0, | ||
| struct adin1320_desc * | dev_8 ) |
| int fw_mode_sgmii_path_test | ( | struct cmd_gpio * | cmd_gpio, |
| struct adin1320_desc * | dev_0, | ||
| struct adin1320_desc * | dev_8 ) |
| void get_cmd | ( | struct no_os_uart_desc * | uart_desc, |
| struct cmd_input * | cmd_input ) |
| void process_cmd | ( | struct adin1320_desc * | dev_0, |
| struct adin1320_desc * | dev_8, | ||
| struct cmd_input * | cmd_input, | ||
| bool | dev_init[2] ) |
| void select_cmd | ( | struct cmd_input * | cmd_input | ) |