stipcores library
Collection of Software Drivers for Hardware IP Cores for the Panoradio SDR
Public Member Functions | List of all members
AD9467_SPI Class Reference

Driver for the SPI interface of the AD9467 using the spi_ad_0 core. More...

#include <AD9467_SPI.h>

Public Member Functions

 AD9467_SPI (int spi_base_address, int size_in_k)
 class constructor More...
 
 ~AD9467_SPI ()
 class deconstructor
 
void reset_adc ()
 resets ADC chip (soft reset)
 
int get_chip_id ()
 reads the chip ID (0x50 for the AD9467) More...
 
int get_chip_grade ()
 reads the chip grade (0x20 for the AD9467-250) More...
 
int get_test_mode ()
 reads the current test mode More...
 
int set_test_mode (int test_mode)
 sets the test mode More...
 
int set_data_format (int format)
 sets the data format More...
 

Detailed Description

Driver for the SPI interface of the AD9467 using the spi_ad_0 core.

Constructor & Destructor Documentation

AD9467_SPI::AD9467_SPI ( int  spi_base_address,
int  size_in_k 
)

class constructor

Parameters
base_adressaddress of the spi core (from Vivado), e.g. 0x44C00000
size_in_ksize of the required adress space in k (from Vivado)

Member Function Documentation

int AD9467_SPI::get_chip_grade ( )

reads the chip grade (0x20 for the AD9467-250)

Returns
int 8 bit value
int AD9467_SPI::get_chip_id ( )

reads the chip ID (0x50 for the AD9467)

Returns
int 8 bit chip ID
int AD9467_SPI::get_test_mode ( )

reads the current test mode

Returns
test mode
int AD9467_SPI::set_data_format ( int  format)

sets the data format

Parameters
format(offset binary(default):0, tows complement:1, Gray code:2)
Returns
error code: 0: no error, -1: format invalid
int AD9467_SPI::set_test_mode ( int  test_mode)

sets the test mode

Parameters
test_mode(e.g. off:0, checkerboard:4, PN23:5, 1/0 word toggle: 7)
Returns
error code: 0: no error, -1: test_mode invalid

The documentation for this class was generated from the following files: