no-OS
Loading...
Searching...
No Matches
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.
 

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.

SPDX-License-Identifier: BSD-3-Clause

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 )

◆ display_test_mode()

void display_test_mode ( uint32_t mode,
uint32_t format )

◆ main()

int main ( void )

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"
}
}
@ LVPECL_960mV
Definition ad9517.h:318
@ LVPECL_780mV
Definition ad9517.h:317

◆ 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