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

Defines data common to all examples. More...

#include "common_data.h"
#include "maxim_gpio.h"
#include "maxim_spi.h"
#include "adin1110.h"
Include dependency graph for common_data.c:

Functions

int spi_cfg_0 (const struct no_os_gpio_init_param adin1110_spi_cfg)
 
int port2_cfg (const struct no_os_gpio_init_param port2_gpio_cfg, int state)
 

Variables

struct max_uart_init_param uart_extra_ip
 
struct no_os_uart_init_param uart_ip
 
struct max_spi_init_param adin1110_spi_extra
 
const struct no_os_gpio_init_param adin1110_rst_gpio_ip
 
const struct no_os_spi_init_param adin1110_spi_ip
 
struct adin1110_init_param adin1110_ip
 
struct no_os_gpio_init_param port2_cfg_0
 
struct no_os_gpio_init_param adin1110_spi_cfg_0
 

Detailed Description

Defines data common to all examples.

Author
Aron Kis (kis.a.nosp@m.ron@.nosp@m.analo.nosp@m.g.co.nosp@m.m)

Copyright 2025(c) Analog Devices, Inc.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Function Documentation

◆ port2_cfg()

int port2_cfg ( const struct no_os_gpio_init_param port2_gpio_cfg,
int state )
Here is the caller graph for this function:

◆ spi_cfg_0()

int spi_cfg_0 ( const struct no_os_gpio_init_param adin1110_spi_cfg)
Here is the caller graph for this function:

Variable Documentation

◆ adin1110_ip

struct adin1110_init_param adin1110_ip
Initial value:
= {
.chip_type = ADIN2111,
.comm_param = adin1110_spi_ip,
.reset_param = adin1110_rst_gpio_ip,
.mac_address = {0x00, 0x18, 0x80, 0x03, 0x25, 0x50},
.append_crc = false,
}
struct no_os_spi_init_param adin1110_spi_ip
Definition common_data.c:46
@ ADIN2111
Definition adin1110.h:198
const struct no_os_gpio_init_param adin1110_rst_gpio_ip
Definition common_data.c:61

◆ adin1110_rst_gpio_ip

const struct no_os_gpio_init_param adin1110_rst_gpio_ip
Initial value:
= {
.port = 2,
.number = 31,
.pull = NO_OS_PULL_NONE,
.platform_ops = &max_gpio_ops,
.extra = &(struct max_gpio_init_param)
{
.vssel = 1
},
}
const struct no_os_gpio_platform_ops max_gpio_ops
maxim platform specific GPIO platform ops structure
Definition maxim_gpio.c:316
@ NO_OS_PULL_NONE
Definition no_os_gpio.h:54
GPIO platform specific init parameters.
Definition maxim_gpio.h:55

◆ adin1110_spi_cfg_0

struct no_os_gpio_init_param adin1110_spi_cfg_0
Initial value:
= {
.port = 2,
.number = 27,
.pull = NO_OS_PULL_UP,
.platform_ops = &max_gpio_ops,
.extra = &(struct max_gpio_init_param)
{
.vssel = MXC_GPIO_VSSEL_VDDIOH
},
}
@ NO_OS_PULL_UP
Definition no_os_gpio.h:56

◆ adin1110_spi_extra

struct max_spi_init_param adin1110_spi_extra
Initial value:
= {
.num_slaves = 1,
.polarity = SPI_SS_POL_LOW,
.vssel = MXC_GPIO_VSSEL_VDDIOH,
}
@ SPI_SS_POL_LOW
Definition maxim_spi.h:49

◆ adin1110_spi_ip

const struct no_os_spi_init_param adin1110_spi_ip
Initial value:
= {
.device_id = 0,
.max_speed_hz = 25000000,
.platform_ops = &max_spi_ops,
.chip_select = 0,
.extra = &adin1110_spi_extra,
}
struct max_spi_init_param adin1110_spi_extra
Definition common_data.c:55
const struct no_os_spi_platform_ops max_spi_ops
maxim platform specific SPI platform ops structure
Definition maxim_spi.c:786
@ NO_OS_SPI_BIT_ORDER_MSB_FIRST
Definition no_os_spi.h:64
@ NO_OS_SPI_MODE_0
Definition no_os_spi.h:49

◆ port2_cfg_0

struct no_os_gpio_init_param port2_cfg_0
Initial value:
= {
.port = 2,
.number = 6,
.pull = NO_OS_PULL_DOWN,
.platform_ops = &max_gpio_ops,
.extra = &(struct max_gpio_init_param)
{
.vssel = MXC_GPIO_VSSEL_VDDIOH
},
}
@ NO_OS_PULL_DOWN
Definition no_os_gpio.h:58

◆ uart_extra_ip

struct max_uart_init_param uart_extra_ip
Initial value:
= {
}
@ MAX_UART_FLOW_DIS
Definition maxim_uart.h:47

◆ uart_ip

struct no_os_uart_init_param uart_ip
Initial value:
= {
.device_id = 0,
.asynchronous_rx = false,
.baud_rate = 115200,
.size = NO_OS_UART_CS_8,
.parity = NO_OS_UART_PAR_NO,
.extra = &uart_extra_ip,
.platform_ops = &max_uart_ops,
}
struct xil_uart_init_param uart_extra_ip
Definition parameters.c:37
const struct no_os_uart_platform_ops max_uart_ops
Maxim platform specific UART platform ops structure.
Definition maxim_uart.c:467
@ NO_OS_UART_CS_8
Definition no_os_uart.h:54
@ NO_OS_UART_PAR_NO
Definition no_os_uart.h:65
@ NO_OS_UART_STOP_1_BIT
Definition no_os_uart.h:82