no-OS
Functions | Variables
ad5758_sdz.c File Reference

Implementation of Main Function. More...

#include "ad5758.h"
#include "no_os_error.h"
#include "no_os_gpio.h"
#include "xilinx_gpio.h"
#include "parameters.h"
#include "sleep.h"
#include "no_os_spi.h"
#include "xilinx_spi.h"
#include "stdint.h"
#include "stdio.h"
#include "stdlib.h"
#include "xil_cache.h"
#include "xil_printf.h"
#include "xparameters.h"
Include dependency graph for ad5758_sdz.c:

Functions

int main ()
 

Variables

const struct xil_spi_init_param spi_extra
 
const struct no_os_spi_init_param spi_ip
 
const struct xil_gpio_init_param gpio_extra
 
const struct no_os_gpio_init_param reset_ip
 
const struct no_os_gpio_init_param ldac_ip
 
struct ad5758_init_param ad5758_default_init_param
 

Detailed Description

Implementation of Main Function.

Author
SPopa (stefa.nosp@m.n.po.nosp@m.pa@an.nosp@m.alog.nosp@m..com)

Copyright 2021(c) Analog Devices, Inc.

All rights reserved.

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

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, 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

◆ main()

int main ( )

Variable Documentation

◆ ad5758_default_init_param

struct ad5758_init_param ad5758_default_init_param
Initial value:
= {
.spi_init = spi_ip,
.reset_n = reset_ip,
.ldac_n = ldac_ip,
.crc_en = true,
.dc_dc_mode = DPC_VOLTAGE_MODE,
.clkout_config = CLKOUT_DISABLE,
.clkout_freq = CLKOUT_FREQ_500_KHZ,
.dc_dc_ilimit = ILIMIT_200_mA,
.output_range = RANGE_0V_10V,
.slew_rate_clk = SR_CLOCK_240_KHZ,
}

◆ gpio_extra

const struct xil_gpio_init_param gpio_extra
Initial value:
= {
.type = GPIO_PS,
.device_id = GPIO_DEVICE_ID
}

◆ ldac_ip

const struct no_os_gpio_init_param ldac_ip
Initial value:
= {
.number = GPIO_DAC_LDAC_N,
.platform_ops = &xil_gpio_ops,
.extra = &gpio_extra
}

◆ reset_ip

const struct no_os_gpio_init_param reset_ip
Initial value:
= {
.number = GPIO_DAC_RESET_N,
.platform_ops = &xil_gpio_ops,
.extra = &gpio_extra
}

◆ spi_extra

const struct xil_spi_init_param spi_extra
Initial value:
= {
.type = SPI_PS,
.flags = NULL
}

◆ spi_ip

const struct no_os_spi_init_param spi_ip
Initial value:
= {
.device_id = SPI_DEVICE_ID,
.max_speed_hz = 10000,
.chip_select = AD5758_SPI_CS,
.platform_ops = &xil_spi_ops,
.extra = &spi_extra
}
NO_OS_SPI_MODE_1
@ NO_OS_SPI_MODE_1
Definition: no_os_spi.h:68
GPIO_PS
@ GPIO_PS
Definition: xilinx_gpio.h:62
SPI_PS
@ SPI_PS
Definition: xilinx_spi.h:68
spi_extra
const struct xil_spi_init_param spi_extra
Definition: ad5758_sdz.c:59
AD5758_SPI_CS
#define AD5758_SPI_CS
Definition: parameters.h:48
xil_gpio_ops
const struct no_os_gpio_platform_ops xil_gpio_ops
Xilinx platform specific GPIO platform ops structure.
Definition: xilinx_gpio.c:455
spi_ip
const struct no_os_spi_init_param spi_ip
Definition: ad5758_sdz.c:63
RANGE_0V_10V
@ RANGE_0V_10V
Definition: ad5758.h:338
DPC_VOLTAGE_MODE
@ DPC_VOLTAGE_MODE
Definition: ad5758.h:274
CLKOUT_DISABLE
@ CLKOUT_DISABLE
Definition: ad5758.h:293
gpio_extra
const struct xil_gpio_init_param gpio_extra
Definition: ad5758_sdz.c:73
CLKOUT_FREQ_500_KHZ
@ CLKOUT_FREQ_500_KHZ
Definition: ad5758.h:302
SPI_DEVICE_ID
#define SPI_DEVICE_ID
Definition: parameters.h:76
NO_OS_SPI_BIT_ORDER_MSB_FIRST
@ NO_OS_SPI_BIT_ORDER_MSB_FIRST
Definition: no_os_spi.h:81
ILIMIT_200_mA
@ ILIMIT_200_mA
Definition: ad5758.h:329
NULL
#define NULL
Definition: wrapper.h:64
xil_spi_ops
const struct no_os_spi_platform_ops xil_spi_ops
Spi engine platform specific SPI platform ops structure.
Definition: xilinx_spi.c:456
GPIO_DEVICE_ID
#define GPIO_DEVICE_ID
Definition: parameters.h:77
SR_CLOCK_240_KHZ
@ SR_CLOCK_240_KHZ
Definition: ad5758.h:309
ldac_ip
const struct no_os_gpio_init_param ldac_ip
Definition: ad5758_sdz.c:82
reset_ip
const struct no_os_gpio_init_param reset_ip
Definition: ad5758_sdz.c:77
GPIO_DAC_LDAC_N
#define GPIO_DAC_LDAC_N
Definition: parameters.h:53
GPIO_DAC_RESET_N
#define GPIO_DAC_RESET_N
Definition: parameters.h:52