no-OS
Macros | Enumerations | Functions | Variables
ad9467_fmc.c File Reference

Implementation of the program's main function. More...

#include <stdio.h>
#include "xil_cache.h"
#include "xparameters.h"
#include "no_os_spi.h"
#include "xilinx_spi.h"
#include "no_os_delay.h"
#include "no_os_error.h"
#include "axi_adc_core.h"
#include "axi_dmac.h"
#include "no_os_axi_io.h"
#include "ad9467.h"
#include "ad9517.h"
#include "parameters.h"
Include dependency graph for ad9467_fmc.c:

Macros

#define CF_REG_DELAY_CTRL   0x60
 
#define CF_REG_DELAY_STATUS   0x20
 
#define CF_REG_DATA_MONITOR   0x404
 
#define CF_DATA_MONITOR_PN_ERR   (1 << 2)
 
#define CF_DATA_MONITOR_PN_SYNC   (1 << 1)
 
#define CF_DATA_MONITOR_PN_OVER_RNG   (1 << 0)
 

Enumerations

enum  type_output_modes {
  OFFSET_BINARY = 0,
  TWOS_COMPLEMENT,
  GRAY_CODE
}
 
enum  type_test_modes {
  TEST_DISABLE = 0,
  MIDSCALE,
  POS_FULLSCALE,
  NEG_FULLSCALE,
  CHECKERBOARD,
  PN_23_SEQUENCE,
  PN_9_SEQUENCE,
  ONE_ZERO_TOGGLE
}
 

Functions

void adc_test (struct axi_adc *adc, struct axi_dmac *dma, struct ad9467_dev *dev, uint32_t mode, uint32_t format)
 
void display_test_mode (uint32_t mode, uint32_t format)
 
int main ()
 Main function. More...
 

Variables

enum type_output_modes type_output_modes
 
enum type_test_modes type_test_modes
 
struct ad9517_platform_data ad9517_pdata_lpc
 
struct ad9517_lvpecl_channel_spec ad9517_lvpecl_channels []
 
struct ad9517_lvds_cmos_channel_spec ad9517_lvds_cmos_channels []
 

Detailed Description

Implementation of the program's main function.

Author
Antoniu Miclaus (anton.nosp@m.iu.m.nosp@m.iclau.nosp@m.s@an.nosp@m.alog..nosp@m.com)

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

SVN Revision: $WCREV$

Macro Definition Documentation

◆ CF_DATA_MONITOR_PN_ERR

#define CF_DATA_MONITOR_PN_ERR   (1 << 2)

◆ CF_DATA_MONITOR_PN_OVER_RNG

#define CF_DATA_MONITOR_PN_OVER_RNG   (1 << 0)

◆ CF_DATA_MONITOR_PN_SYNC

#define CF_DATA_MONITOR_PN_SYNC   (1 << 1)

◆ CF_REG_DATA_MONITOR

#define CF_REG_DATA_MONITOR   0x404

◆ CF_REG_DELAY_CTRL

#define CF_REG_DELAY_CTRL   0x60

◆ CF_REG_DELAY_STATUS

#define CF_REG_DELAY_STATUS   0x20

Enumeration Type Documentation

◆ type_output_modes

Enumerator
OFFSET_BINARY 
TWOS_COMPLEMENT 
GRAY_CODE 

◆ type_test_modes

Enumerator
TEST_DISABLE 
MIDSCALE 
POS_FULLSCALE 
NEG_FULLSCALE 
CHECKERBOARD 
PN_23_SEQUENCE 
PN_9_SEQUENCE 
ONE_ZERO_TOGGLE 

Function Documentation

◆ adc_test()

void adc_test ( struct axi_adc adc,
struct axi_dmac dma,
struct ad9467_dev dev,
uint32_t  mode,
uint32_t  format 
)
Here is the caller graph for this function:

◆ display_test_mode()

void display_test_mode ( uint32_t  mode,
uint32_t  format 
)
Here is the caller graph for this function:

◆ main()

int main ( )

Main function.

Returns
0 in case of success, -1 otherwise.

Variable Documentation

◆ ad9517_lvds_cmos_channels

struct ad9517_lvds_cmos_channel_spec ad9517_lvds_cmos_channels[]

◆ ad9517_lvpecl_channels

struct ad9517_lvpecl_channel_spec ad9517_lvpecl_channels[]
Initial value:
= {
{
0,
0,
"CH0"
},
{
1,
0,
"CH1"
},
{
2,
0,
"CH2"
},
{
3,
0,
"CH3"
}
}

◆ ad9517_pdata_lpc

struct ad9517_platform_data ad9517_pdata_lpc
Initial value:
= {
250000000,
250000000,
1,
1,
1,
0,
1,
0,
250000000,
1600000000,
0,
0,
"ad9517-lpc"
}

◆ type_output_modes

◆ type_test_modes

LVPECL_960mV
@ LVPECL_960mV
Definition: ad9517.h:351
LVPECL_780mV
@ LVPECL_780mV
Definition: ad9517.h:350