no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ad77681evb.c File Reference

Implementation of Main Function. More...

#include <stdio.h>
#include <sleep.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <xil_cache.h>
#include <xparameters.h>
#include "clk_axi_clkgen.h"
#include "xil_printf.h"
#include "ad77681.h"
#include "spi_engine.h"
#include "parameters.h"
#include "no_os_delay.h"
#include "no_os_error.h"
Include dependency graph for ad77681evb.c:

Macros

#define SPI_ENGINE_OFFLOAD_EXAMPLE   0
 

Functions

int main ()
 

Variables

uint32_t spi_msg_cmds [6] = {CS_LOW, CS_HIGH, CS_LOW, WRITE_READ(1), CS_HIGH}
 
struct spi_engine_init_param spi_eng_init_param
 
struct ad77681_init_param ADC_default_init_param
 
struct axi_clkgen_init clkgen_init
 

Detailed Description

Implementation of Main Function.

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

Copyright 2017(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.

Macro Definition Documentation

◆ SPI_ENGINE_OFFLOAD_EXAMPLE

#define SPI_ENGINE_OFFLOAD_EXAMPLE   0

Function Documentation

◆ main()

int main ( void )

Variable Documentation

◆ ADC_default_init_param

struct ad77681_init_param ADC_default_init_param
Initial value:
= {
{
.chip_select = AD77681_SPI_CS,
.max_speed_hz = 1000000,
.platform_ops = &spi_eng_platform_ops,
.extra = (void*)&spi_eng_init_param,
},
false,
0,
0,
4096,
16384,
}
struct spi_engine_init_param spi_eng_init_param
Definition parameters.c:52
#define AD77681_SPI_CS
Definition parameters.h:41
@ AD77681_CONV_CONTINUOUS
Definition ad77681.h:353
@ AD77681_AINp_ENABLED
Definition ad77681.h:421
@ AD77681_FAST
Definition ad77681.h:342
@ AD77681_BUFp_ENABLED
Definition ad77681.h:434
@ AD77681_BUFn_ENABLED
Definition ad77681.h:427
@ AD77681_POSITIVE_FS
Definition ad77681.h:373
@ AD77681_AINn_ENABLED
Definition ad77681.h:415
@ AD77681_FIR
Definition ad77681.h:389
@ AD77681_MCLK_DIV_8
Definition ad77681.h:347
@ AD77681_SINC5_FIR_DECx32
Definition ad77681.h:394
@ AD77681_VCM_HALF_VCC
Definition ad77681.h:441
@ AD77681_CONV_16BIT
Definition ad77681.h:362
@ AD77681_CRC
Definition ad77681.h:378
@ NO_OS_SPI_MODE_3
Definition no_os_spi.h:55
const struct no_os_spi_platform_ops spi_eng_platform_ops
Spi engine platform specific SPI platform ops structure.
Definition spi_engine.c:57

◆ clkgen_init

struct axi_clkgen_init clkgen_init
Initial value:
= {
.name = "rx_clkgen",
.base = XPAR_SPI_CLKGEN_BASEADDR,
.parent_rate = 100000000,
}

◆ spi_eng_init_param

struct spi_engine_init_param spi_eng_init_param
Initial value:
= {
.type = SPI_ENGINE,
.spi_engine_baseaddr = AD77681_SPI1_ENGINE_BASEADDR,
.cs_delay = 0,
.data_width = 32,
}
#define AD77681_SPI_ENG_REF_CLK_FREQ_HZ
Definition parameters.h:42
#define AD77681_SPI1_ENGINE_BASEADDR
Definition parameters.h:40
@ SPI_ENGINE
Definition xilinx_spi.h:52

◆ spi_msg_cmds

uint32_t spi_msg_cmds[6] = {CS_LOW, CS_HIGH, CS_LOW, WRITE_READ(1), CS_HIGH}