stipcores library
Collection of Software Drivers for Hardware IP Cores for the Panoradio SDR
AD9467_SPI.h
1 #ifndef AD9467_SPI_H
2 #define AD9467_SPI_H
3 
4 /*
5  -------------------------------------------------------
6  AD9467_SPI.h
7  SPI interface driver class for the spi_ad_0 core for the AD9467
8  Stefan Scholl, DC9ST, TU Kaiserslautern, 2014
9  -------------------------------------------------------
10 */
11 
12 #include "IP_Driver.h"
13 
15 class AD9467_SPI {
16 
17 private:
19  void spi_write(int address, int data);
20 
22  int spi_read(int address);
23 
24  IP_Driver *spi_core_; // low level driver
25 
26 public:
30  AD9467_SPI(int spi_base_address, int size_in_k);
31 
33  ~AD9467_SPI();
34 
36  void reset_adc();
37 
40  int get_chip_id();
41 
44  int get_chip_grade();
45 
48  int get_test_mode();
49 
53  int set_test_mode(int test_mode);
54 
58  int set_data_format(int format);
59 };
60 
61 #endif /* AD9467_SPI_H */
int set_data_format(int format)
sets the data format
Definition: AD9467_SPI.cpp:115
int set_test_mode(int test_mode)
sets the test mode
Definition: AD9467_SPI.cpp:101
Generic IP Driver Class Class, that allows access to a AXI Lite IP core over the Zynq Memory Mapped I...
Definition: IP_Driver.h:14
AD9467_SPI(int spi_base_address, int size_in_k)
class constructor
Definition: AD9467_SPI.cpp:60
int get_chip_grade()
reads the chip grade (0x20 for the AD9467-250)
Definition: AD9467_SPI.cpp:89
int get_test_mode()
reads the current test mode
Definition: AD9467_SPI.cpp:95
int get_chip_id()
reads the chip ID (0x50 for the AD9467)
Definition: AD9467_SPI.cpp:83
void reset_adc()
resets ADC chip (soft reset)
Definition: AD9467_SPI.cpp:74
~AD9467_SPI()
class deconstructor
Definition: AD9467_SPI.cpp:65
Driver for the SPI interface of the AD9467 using the spi_ad_0 core.
Definition: AD9467_SPI.h:15