no-OS
axi_dac_core.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef AXI_DAC_CORE_H_
34 #define AXI_DAC_CORE_H_
35 
36 /******************************************************************************/
37 /***************************** Include Files **********************************/
38 /******************************************************************************/
39 #include <stdint.h>
40 
41 /******************************************************************************/
42 /*************************** Types Declarations *******************************/
43 /******************************************************************************/
44 enum {
47 };
48 
53 struct axi_dac {
55  const char *name;
57  uint32_t base;
59  uint8_t num_channels;
61  uint64_t clock_hz;
65  uint32_t bus_type;
66 };
67 
68 struct axi_dac_init {
70  const char *name;
72  uint32_t base;
74  uint8_t num_channels;
78  uint8_t rate;
80  uint32_t bus_type;
81 };
82 
94 };
95 
97  uint32_t dds_frequency_0; // in hz (1000*1000 for MHz)
98  uint32_t dds_phase_0; // in milli(?) angles (90*1000 for 90 degrees = pi/2)
99  int32_t dds_scale_0; // in micro units (1.0*1000*1000 is 1.0)
100  uint32_t dds_frequency_1; // in hz (1000*1000 for MHz)
101  uint32_t dds_phase_1; // in milli(?) angles (90*1000 for 90 degrees = pi/2)
102  int32_t dds_scale_1; // in micro units (1.0*1000*1000 is 1.0)
103  uint32_t dds_dual_tone; // if using single tone for this channel, set to 0x0
104  uint32_t pat_data; // if using SED/debug that sort of thing
105  enum axi_dac_data_sel sel; // set to one of the enumerated type above.
106 };
107 
108 extern const uint16_t sine_lut[128];
109 
110 extern const uint32_t sine_lut_iq[1024];
111 
112 /******************************************************************************/
113 /************************ Functions Declarations ******************************/
114 /******************************************************************************/
116 int32_t axi_dac_init_begin(struct axi_dac **dac_core,
117  const struct axi_dac_init *init);
119 int32_t axi_dac_init_finish(struct axi_dac *dac);
121 int32_t axi_dac_init(struct axi_dac **dac_core,
122  const struct axi_dac_init *init);
124 int32_t axi_dac_remove(struct axi_dac *dac);
126 int32_t axi_dac_set_datasel(struct axi_dac *dac,
127  int32_t chan,
128  enum axi_dac_data_sel sel);
130 int32_t axi_dac_dds_set_frequency(struct axi_dac *dac,
131  uint32_t chan, uint32_t freq_hz);
133 int32_t axi_dac_dds_get_frequency(struct axi_dac *dac,
134  uint32_t chan, uint32_t *freq);
136 int32_t axi_dac_dds_set_phase(struct axi_dac *dac,
137  uint32_t chan, uint32_t phase);
139 int32_t axi_dac_dds_get_phase(struct axi_dac *dac,
140  uint32_t chan, uint32_t *phase);
142 int32_t axi_dac_dds_set_scale(struct axi_dac *dac,
143  uint32_t chan,
144  int32_t scale_micro_units);
146 int32_t axi_dac_dds_get_scale(struct axi_dac *dac,
147  uint32_t chan,
148  int32_t *scale_micro_units);
150 int32_t axi_dac_set_buff(struct axi_dac *dac,
151  uint32_t address,
152  uint16_t *buff,
153  uint32_t buff_size);
155 uint32_t axi_dac_set_sine_lut(struct axi_dac *dac,
156  uint32_t address);
158 int32_t axi_dac_dds_get_calib_scale(struct axi_dac *dac,
159  uint32_t chan,
160  int32_t *val,
161  int32_t *val2);
163 int32_t axi_dac_dds_get_calib_phase(struct axi_dac *dac,
164  uint32_t chan,
165  int32_t *val,
166  int32_t *val2);
168 int32_t axi_dac_dds_set_calib_scale(struct axi_dac *dac,
169  uint32_t chan,
170  int32_t val,
171  int32_t val2);
173 int32_t axi_dac_dds_set_calib_phase(struct axi_dac *dac,
174  uint32_t chan,
175  int32_t val,
176  int32_t val2);
178 int32_t axi_dac_load_custom_data(struct axi_dac *dac,
179  const uint32_t *custom_data_iq,
180  uint32_t custom_tx_count,
181  uint32_t address);
183 int32_t axi_dac_data_setup(struct axi_dac *dac);
185 int32_t axi_dac_bus_read(struct axi_dac *dac,
186  uint32_t reg_addr,
187  uint32_t *reg_data,
188  uint8_t data_size);
190 int32_t axi_dac_bus_write(struct axi_dac *dac,
191  uint32_t reg_addr,
192  uint32_t reg_data,
193  uint8_t data_size);
195 int32_t axi_dac_set_ddr(struct axi_dac *dac,
196  bool enable);
198 int32_t axi_dac_set_data_stream(struct axi_dac *dac,
199  bool enable);
201 int32_t axi_dac_data_transfer_addr(struct axi_dac *dac,
202  uint32_t address);
204 int32_t axi_dac_data_format_set(struct axi_dac *dac,
205  int format);
206 
207 #endif
axi_dac_set_data_stream
int32_t axi_dac_set_data_stream(struct axi_dac *dac, bool enable)
AXI DAC Set data stream mode.
Definition: axi_dac_core.c:535
axi_dac_dds_set_calib_scale
int32_t axi_dac_dds_set_calib_scale(struct axi_dac *dac, uint32_t chan, int32_t val, int32_t val2)
Calibrate scale for specific AXI DAC channel.
Definition: axi_dac_core.c:909
axi_dac_data_setup
int32_t axi_dac_data_setup(struct axi_dac *dac)
AXI DAC Data Setup.
Definition: axi_dac_core.c:1193
AXI_DAC_DATA_SEL_ZERO
@ AXI_DAC_DATA_SEL_ZERO
Definition: axi_dac_core.h:87
axi_dac::name
const char * name
Definition: axi_dac_core.h:55
axi_dac_set_ddr
int32_t axi_dac_set_ddr(struct axi_dac *dac, bool enable)
AXI DAC Set DDR (bus double-data-rate) mode.
Definition: axi_dac_core.c:520
axi_dac_set_datasel
int32_t axi_dac_set_datasel(struct axi_dac *dac, int32_t chan, enum axi_dac_data_sel sel)
AXI DAC Set Data type for specific channel.
Definition: axi_dac_core.c:590
no_os_alloc.h
axi_dac_dds_set_scale
int32_t axi_dac_dds_set_scale(struct axi_dac *dac, uint32_t chan, int32_t scale_micro_units)
AXI DAC Set DDS scale for specific channel.
Definition: axi_dac_core.c:714
AXI_DAC_SDR_DDR_N
#define AXI_DAC_SDR_DDR_N
Definition: axi_dac_core.c:58
axi_dac_read
int32_t axi_dac_read(struct axi_dac *dac, uint32_t reg_addr, uint32_t *reg_data)
AXI DAC Data Read.
Definition: axi_dac_core.c:363
AXI_DAC_IQCOR_COEFF_1
#define AXI_DAC_IQCOR_COEFF_1(x)
Definition: axi_dac_core.c:119
axi_dac_init_begin
int32_t axi_dac_init_begin(struct axi_dac **dac_core, const struct axi_dac_init *init)
Begin AXI DAC Initialization.
Definition: axi_dac_core.c:1098
axi_dac_dds_get_scale
int32_t axi_dac_dds_get_scale(struct axi_dac *dac, uint32_t chan, int32_t *scale_micro_units)
AXI DAC Get DDS scale for specific channel.
Definition: axi_dac_core.c:745
axi_dac_dds_get_calib_scale
int32_t axi_dac_dds_get_calib_scale(struct axi_dac *dac, uint32_t chan, int32_t *val, int32_t *val2)
Get the scale calibration values for AXI DAC channel.
Definition: axi_dac_core.c:925
axi_dac::clock_hz
uint64_t clock_hz
Definition: axi_dac_core.h:61
axi_dac_set_sine_lut
uint32_t axi_dac_set_sine_lut(struct axi_dac *dac, uint32_t address)
AXI DAC Set data based on a Sine Lookup Table.
Definition: axi_dac_core.c:971
axi_dac_init::base
uint32_t base
Definition: axi_dac_core.h:72
axi_dac_channel::pat_data
uint32_t pat_data
Definition: axi_dac_core.h:104
AXI_DAC_REG_CLK_RATIO
#define AXI_DAC_REG_CLK_RATIO
Definition: axi_dac_core.c:69
axi_dac_read_poll_timeout
int32_t axi_dac_read_poll_timeout(struct axi_dac *dac, uint32_t reg_addr, uint32_t mask, uint32_t value, uint32_t sleep_us, uint32_t timeout_us)
AXI DAC Read Data until condition is met.
Definition: axi_dac_core.c:417
AXI_DAC_BUS_TYPE_QSPI
@ AXI_DAC_BUS_TYPE_QSPI
Definition: axi_dac_core.h:46
AXI_DAC_UI_STATUS
#define AXI_DAC_UI_STATUS
Definition: axi_dac_core.c:92
axi_dac_init_finish
int32_t axi_dac_init_finish(struct axi_dac *dac)
Begin AXI DAC Initialization.
Definition: axi_dac_core.c:1123
AXI_DAC_DATA_SEL_DDS
@ AXI_DAC_DATA_SEL_DDS
Definition: axi_dac_core.h:84
sine_lut
const uint16_t sine_lut[128]
Definition: axi_dac_core.c:126
axi_dac_dds_get_phase
int32_t axi_dac_dds_get_phase(struct axi_dac *dac, uint32_t chan, uint32_t *phase)
AXI DAC Get DDS phase for specific channel.
Definition: axi_dac_core.c:688
AXI_DAC_BUS_TYPE_NONE
@ AXI_DAC_BUS_TYPE_NONE
Definition: axi_dac_core.h:45
no_os_delay.h
Header file of Delay functions.
DAC_REG_DATA_PATTERN
#define DAC_REG_DATA_PATTERN(c)
Definition: axi_dac_core.c:105
axi_dac_channel::dds_frequency_1
uint32_t dds_frequency_1
Definition: axi_dac_core.h:100
axi_dac_channel::dds_phase_1
uint32_t dds_phase_1
Definition: axi_dac_core.h:101
axi_dac_set_buff
int32_t axi_dac_set_buff(struct axi_dac *dac, uint32_t address, uint16_t *buff, uint32_t buff_size)
AXI DAC Set data buffer.
Definition: axi_dac_core.c:1036
axi_dac_dds_from_signed_mag_fmt
void axi_dac_dds_from_signed_mag_fmt(uint32_t val, int32_t *r_val, int32_t *r_val2)
AXI DAC Convert from signed magnitude format.
Definition: axi_dac_core.c:808
axi_dac_dds_get_frequency
int32_t axi_dac_dds_get_frequency(struct axi_dac *dac, uint32_t chan, uint32_t *freq)
AXI DAC Get DDS frequency for specific channel.
Definition: axi_dac_core.c:638
axi_dac_bus_read
int32_t axi_dac_bus_read(struct axi_dac *dac, uint32_t reg_addr, uint32_t *reg_data, uint8_t data_size)
AXI DAC Bus Data Read.
Definition: axi_dac_core.c:488
axi_dac_dds_set_phase
int32_t axi_dac_dds_set_phase(struct axi_dac *dac, uint32_t chan, uint32_t phase)
AXI DAC Set DDS phase for specific channel.
Definition: axi_dac_core.c:663
AXI_DAC_SYNC
#define AXI_DAC_SYNC
Definition: axi_dac_core.c:55
axi_dac_set_data_stream
int32_t axi_dac_set_data_stream(struct axi_dac *dac, bool enable)
AXI DAC Set data stream mode.
Definition: axi_dac_core.c:535
AXI_DAC_IQCOR_COEFF_2
#define AXI_DAC_IQCOR_COEFF_2(x)
Definition: axi_dac_core.c:121
axi_dac_dds_set_frequency
int32_t axi_dac_dds_set_frequency(struct axi_dac *dac, uint32_t chan, uint32_t freq_hz)
AXI DAC Set DDS frequency for specific channel.
Definition: axi_dac_core.c:614
AXI_DAC_CNTRL_DATA_WR
#define AXI_DAC_CNTRL_DATA_WR
Definition: axi_dac_core.c:81
axi_dac_init::channels
struct axi_dac_channel * channels
Definition: axi_dac_core.h:76
AXI_DAC_RD_ADDR
#define AXI_DAC_RD_ADDR(x)
Definition: axi_dac_core.c:124
AXI_DAC_TO_DDS_INIT
#define AXI_DAC_TO_DDS_INIT(x)
Definition: axi_dac_core.c:101
axi_dac_dds_set_scale
int32_t axi_dac_dds_set_scale(struct axi_dac *dac, uint32_t chan, int32_t scale_micro_units)
AXI DAC Set DDS scale for specific channel.
Definition: axi_dac_core.c:714
AXI_DAC_REG_SYNC_CONTROL
#define AXI_DAC_REG_SYNC_CONTROL
Definition: axi_dac_core.c:54
axi_dac_core.h
Driver for the Analog Devices AXI-DAC-CORE module.
no_os_axi_io.h
Header file of AXI IO.
AXI_DAC_DATA_SEL_PN15
@ AXI_DAC_DATA_SEL_PN15
Definition: axi_dac_core.h:89
AXI_DAC_REG_STATUS
#define AXI_DAC_REG_STATUS
Definition: axi_dac_core.c:73
axi_dac_set_sine_lut
uint32_t axi_dac_set_sine_lut(struct axi_dac *dac, uint32_t address)
AXI DAC Set data based on a Sine Lookup Table.
Definition: axi_dac_core.c:971
axi_dac_dds_set_calib_phase
int32_t axi_dac_dds_set_calib_phase(struct axi_dac *dac, uint32_t chan, int32_t val, int32_t val2)
Calibrate phase for specific AXI DAC channel.
Definition: axi_dac_core.c:941
AXI_DAC_REG_RSTN
#define AXI_DAC_REG_RSTN
Definition: axi_dac_core.c:50
AXI_DAC_REG_DATA_SELECT
#define AXI_DAC_REG_DATA_SELECT(c)
Definition: axi_dac_core.c:107
AXI_DAC_DDS_INCR
#define AXI_DAC_DDS_INCR(x)
Definition: axi_dac_core.c:102
AXI_DAC_REG_CLK_FREQ
#define AXI_DAC_REG_CLK_FREQ
Definition: axi_dac_core.c:65
AXI_DAC_RATE
#define AXI_DAC_RATE(x)
Definition: axi_dac_core.c:62
no_os_do_div
uint64_t no_os_do_div(uint64_t *n, uint64_t base)
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
axi_dac_dds_get_calib_phase
int32_t axi_dac_dds_get_calib_phase(struct axi_dac *dac, uint32_t chan, int32_t *val, int32_t *val2)
Get the phase calibration values for AXI DAC channel.
Definition: axi_dac_core.c:957
no_os_error.h
Error codes definition.
axi_dac_write
int32_t axi_dac_write(struct axi_dac *dac, uint32_t reg_addr, uint32_t reg_data)
AXI DAC Data Write.
Definition: axi_dac_core.c:379
axi_dac_channel
Definition: axi_dac_core.h:96
AXI_DAC_DATA_WR_8
#define AXI_DAC_DATA_WR_8(x)
Definition: axi_dac_core.c:83
axi_dac_set_ddr
int32_t axi_dac_set_ddr(struct axi_dac *dac, bool enable)
AXI DAC Set DDR (bus double-data-rate) mode.
Definition: axi_dac_core.c:520
axi_dac_set_datasel
int32_t axi_dac_set_datasel(struct axi_dac *dac, int32_t chan, enum axi_dac_data_sel sel)
AXI DAC Set Data type for specific channel.
Definition: axi_dac_core.c:590
axi_dac_init::name
const char * name
Definition: axi_dac_core.h:70
axi_dac::base
uint32_t base
Definition: axi_dac_core.h:57
AXI_DAC_DATA_WR_16
#define AXI_DAC_DATA_WR_16(x)
Definition: axi_dac_core.c:82
axi_dac_dds_get_calib_scale
int32_t axi_dac_dds_get_calib_scale(struct axi_dac *dac, uint32_t chan, int32_t *val, int32_t *val2)
Get the scale calibration values for AXI DAC channel.
Definition: axi_dac_core.c:925
axi_dac_update_bits
void axi_dac_update_bits(struct axi_dac *dac, uint32_t reg_addr, uint32_t reg_mask, uint32_t reg_data)
AXI DAC Update Data bits.
Definition: axi_dac_core.c:395
AXI_DAC_DDS_SCALE
#define AXI_DAC_DDS_SCALE(x)
Definition: axi_dac_core.c:96
sine_lut_iq
const uint32_t sine_lut_iq[1024]
Definition: axi_dac_core.c:145
axi_dac_channel::dds_frequency_0
uint32_t dds_frequency_0
Definition: axi_dac_core.h:97
AXI_DAC_REG_RATECNTRL
#define AXI_DAC_REG_RATECNTRL
Definition: axi_dac_core.c:61
AXI_DAC_TO_IQCOR_COEFF_1
#define AXI_DAC_TO_IQCOR_COEFF_1(x)
Definition: axi_dac_core.c:120
axi_dac_init
Definition: axi_dac_core.h:68
axi_dac_channel::dds_scale_0
int32_t dds_scale_0
Definition: axi_dac_core.h:99
axi_dac_init::rate
uint8_t rate
Definition: axi_dac_core.h:78
AXI_DAC_TRANSFER_DATA
#define AXI_DAC_TRANSFER_DATA
Definition: axi_dac_core.c:88
axi_dac_init::num_channels
uint8_t num_channels
Definition: axi_dac_core.h:74
no_os_axi_io_read
int32_t no_os_axi_io_read(uint32_t base, uint32_t offset, uint32_t *data)
AXI IO Altera specific read function.
Definition: altera_axi_io.c:53
axi_dac
AXI DAC Device Descriptor.
Definition: axi_dac_core.h:53
AXI_DAC_DATA_SEL_PN23
@ AXI_DAC_DATA_SEL_PN23
Definition: axi_dac_core.h:90
axi_dac::num_channels
uint8_t num_channels
Definition: axi_dac_core.h:59
sine_lut
const uint16_t sine_lut[128]
Definition: adc_demo.c:47
axi_dac_dds_set_calib_scale
int32_t axi_dac_dds_set_calib_scale(struct axi_dac *dac, uint32_t chan, int32_t val, int32_t val2)
Calibrate scale for specific AXI DAC channel.
Definition: axi_dac_core.c:909
axi_dac::channels
struct axi_dac_channel * channels
Definition: axi_dac_core.h:63
axi_dac_remove
int32_t axi_dac_remove(struct axi_dac *dac)
AXI DAC Resources deallocation.
Definition: axi_dac_core.c:1238
axi_dac_bus_write
int32_t axi_dac_bus_write(struct axi_dac *dac, uint32_t reg_addr, uint32_t reg_data, uint8_t data_size)
AXI DAC Bus Data Write.
Definition: axi_dac_core.c:444
AXI_DAC_REG_DDS_SCALE
#define AXI_DAC_REG_DDS_SCALE(x)
Definition: axi_dac_core.c:95
axi_dac_bus_read
int32_t axi_dac_bus_read(struct axi_dac *dac, uint32_t reg_addr, uint32_t *reg_data, uint8_t data_size)
AXI DAC Bus Data Read.
Definition: axi_dac_core.c:488
AXI_DAC_REG_CNTRL_2
#define AXI_DAC_REG_CNTRL_2
Definition: axi_dac_core.c:57
axi_dac_dds_set_phase
int32_t axi_dac_dds_set_phase(struct axi_dac *dac, uint32_t chan, uint32_t phase)
AXI DAC Set DDS phase for specific channel.
Definition: axi_dac_core.c:663
axi_dac_load_custom_data
int32_t axi_dac_load_custom_data(struct axi_dac *dac, const uint32_t *custom_data_iq, uint32_t custom_tx_count, uint32_t address)
AXI DAC Load custom data.
Definition: axi_dac_core.c:1063
axi_dac_dds_set_frequency
int32_t axi_dac_dds_set_frequency(struct axi_dac *dac, uint32_t chan, uint32_t freq_hz)
AXI DAC Set DDS frequency for specific channel.
Definition: axi_dac_core.c:614
no_os_malloc
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
axi_dac_init
int32_t axi_dac_init(struct axi_dac **dac_core, const struct axi_dac_init *init)
AXI DAC Main Initialization.
Definition: axi_dac_core.c:1154
AXI_DAC_REG_CHAN_CNTRL_8
#define AXI_DAC_REG_CHAN_CNTRL_8(c)
Definition: axi_dac_core.c:118
AXI_DAC_SYMB_8B
#define AXI_DAC_SYMB_8B
Definition: axi_dac_core.c:59
no_os_free
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
axi_dac_channel::dds_phase_0
uint32_t dds_phase_0
Definition: axi_dac_core.h:98
axi_dac_data_transfer_addr
int32_t axi_dac_data_transfer_addr(struct axi_dac *dac, uint32_t address)
AXI DAC Set starting dma data trasfer address.
Definition: axi_dac_core.c:550
sine_lut_iq
const uint32_t sine_lut_iq[1024]
Definition: axi_dac_core.c:145
AXI_DAC_ADDRESS
#define AXI_DAC_ADDRESS(x)
Definition: axi_dac_core.c:86
AXI_DAC_BUSY
#define AXI_DAC_BUSY
Definition: axi_dac_core.c:93
AXI_DAC_DATA_SEL_SED
@ AXI_DAC_DATA_SEL_SED
Definition: axi_dac_core.h:85
no_os_udelay
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: aducm3029_delay.c:114
AXI_DAC_REG_DDS_INIT_INCR
#define AXI_DAC_REG_DDS_INIT_INCR(x)
Definition: axi_dac_core.c:99
axi_dac_data_format_set
int32_t axi_dac_data_format_set(struct axi_dac *dac, int format)
AXI DAC data format.
Definition: axi_dac_core.c:570
axi_dac_dds_get_calib_phase
int32_t axi_dac_dds_get_calib_phase(struct axi_dac *dac, uint32_t chan, int32_t *val, int32_t *val2)
Get the phase calibration values for AXI DAC channel.
Definition: axi_dac_core.c:957
axi_dac_data_setup
int32_t axi_dac_data_setup(struct axi_dac *dac)
AXI DAC Data Setup.
Definition: axi_dac_core.c:1193
axi_dac::bus_type
uint32_t bus_type
Definition: axi_dac_core.h:65
AXI_DAC_REG_CHAN_CNTRL_6
#define AXI_DAC_REG_CHAN_CNTRL_6(c)
Definition: axi_dac_core.c:111
AXI_DAC_CNTRL_DATA_RD
#define AXI_DAC_CNTRL_DATA_RD
Definition: axi_dac_core.c:79
no_os_axi_io_write
int32_t no_os_axi_io_write(uint32_t base, uint32_t offset, uint32_t data)
AXI IO Altera specific write function.
Definition: altera_axi_io.c:67
axi_dac_init_begin
int32_t axi_dac_init_begin(struct axi_dac **dac_core, const struct axi_dac_init *init)
Begin AXI DAC Initialization.
Definition: axi_dac_core.c:1098
axi_dac_init::bus_type
uint32_t bus_type
Definition: axi_dac_core.h:80
axi_dac_remove
int32_t axi_dac_remove(struct axi_dac *dac)
AXI DAC Resources deallocation.
Definition: axi_dac_core.c:1238
axi_dac_dds_to_signed_mag_fmt
uint32_t axi_dac_dds_to_signed_mag_fmt(int32_t val, int32_t val2)
AXI DAC Convert to signed magnitude format.
Definition: axi_dac_core.c:772
axi_dac_dds_get_scale
int32_t axi_dac_dds_get_scale(struct axi_dac *dac, uint32_t chan, int32_t *scale_micro_units)
AXI DAC Get DDS scale for specific channel.
Definition: axi_dac_core.c:745
AXI_DAC_IQCOR_ENB
#define AXI_DAC_IQCOR_ENB
Definition: axi_dac_core.c:112
axi_dac_channel::sel
enum axi_dac_data_sel sel
Definition: axi_dac_core.h:105
AXI_DAC_MMCM_RSTN
#define AXI_DAC_MMCM_RSTN
Definition: axi_dac_core.c:51
axi_dac_bus_write
int32_t axi_dac_bus_write(struct axi_dac *dac, uint32_t reg_addr, uint32_t reg_data, uint8_t data_size)
AXI DAC Bus Data Write.
Definition: axi_dac_core.c:444
AXI_DAC_DATA_SEL_PN31
@ AXI_DAC_DATA_SEL_PN31
Definition: axi_dac_core.h:91
axi_dac_channel::dds_dual_tone
uint32_t dds_dual_tone
Definition: axi_dac_core.h:103
axi_dac_load_custom_data
int32_t axi_dac_load_custom_data(struct axi_dac *dac, const uint32_t *custom_data_iq, uint32_t custom_tx_count, uint32_t address)
AXI DAC Load custom data.
Definition: axi_dac_core.c:1063
AXI_DAC_TO_IQCOR_COEFF_2
#define AXI_DAC_TO_IQCOR_COEFF_2(x)
Definition: axi_dac_core.c:122
AXI_DAC_DATA_SEL_DMA
@ AXI_DAC_DATA_SEL_DMA
Definition: axi_dac_core.h:86
AXI_DAC_REG_CHAN_CNTRL_7
#define AXI_DAC_REG_CHAN_CNTRL_7(c)
Definition: axi_dac_core.c:114
AXI_DAC_DDS_INIT
#define AXI_DAC_DDS_INIT(x)
Definition: axi_dac_core.c:100
no_os_util.h
Header file of utility functions.
axi_dac_channel::dds_scale_1
int32_t dds_scale_1
Definition: axi_dac_core.h:102
axi_dac_dds_set_calib_phase
int32_t axi_dac_dds_set_calib_phase(struct axi_dac *dac, uint32_t chan, int32_t val, int32_t val2)
Calibrate phase for specific AXI DAC channel.
Definition: axi_dac_core.c:941
axi_dac_init_finish
int32_t axi_dac_init_finish(struct axi_dac *dac)
Begin AXI DAC Initialization.
Definition: axi_dac_core.c:1123
AXI_DAC_TO_DDS_SCALE
#define AXI_DAC_TO_DDS_SCALE(x)
Definition: axi_dac_core.c:97
AXI_DAC_STREAM_ENABLE
#define AXI_DAC_STREAM_ENABLE
Definition: axi_dac_core.c:89
axi_dac_init
int32_t axi_dac_init(struct axi_dac **dac_core, const struct axi_dac_init *init)
AXI DAC Main Initialization.
Definition: axi_dac_core.c:1154
axi_dac_data_sel
axi_dac_data_sel
Definition: axi_dac_core.h:83
AXI_DAC_DATA_SEL_LB
@ AXI_DAC_DATA_SEL_LB
Definition: axi_dac_core.h:92
AXI_DAC_DATA_SEL_PN7
@ AXI_DAC_DATA_SEL_PN7
Definition: axi_dac_core.h:88
axi_dac_data_transfer_addr
int32_t axi_dac_data_transfer_addr(struct axi_dac *dac, uint32_t address)
AXI DAC Set starting dma data trasfer address.
Definition: axi_dac_core.c:550
AXI_DAC_RSTN
#define AXI_DAC_RSTN
Definition: axi_dac_core.c:52
AXI_DAC_DATA_SEL_PNXX
@ AXI_DAC_DATA_SEL_PNXX
Definition: axi_dac_core.h:93
axi_dac_dds_get_calib_phase_scale
int32_t axi_dac_dds_get_calib_phase_scale(struct axi_dac *dac, uint32_t phase, uint32_t chan, int32_t *val, int32_t *val2)
Get the phase scale calibration values for AXI DAC channel.
Definition: axi_dac_core.c:880
axi_dac_dds_get_phase
int32_t axi_dac_dds_get_phase(struct axi_dac *dac, uint32_t chan, uint32_t *phase)
AXI DAC Get DDS phase for specific channel.
Definition: axi_dac_core.c:688
axi_dac_data_format_set
int32_t axi_dac_data_format_set(struct axi_dac *dac, int format)
AXI DAC data format.
Definition: axi_dac_core.c:570
axi_dac_dds_set_calib_phase_scale
int32_t axi_dac_dds_set_calib_phase_scale(struct axi_dac *dac, uint32_t phase, uint32_t chan, int32_t val, int32_t val2)
Calibrate phase scale for specific AXI DAC channel.
Definition: axi_dac_core.c:845
axi_dac_set_buff
int32_t axi_dac_set_buff(struct axi_dac *dac, uint32_t address, uint16_t *buff, uint32_t buff_size)
AXI DAC Set data buffer.
Definition: axi_dac_core.c:1036
axi_dac_dds_get_frequency
int32_t axi_dac_dds_get_frequency(struct axi_dac *dac, uint32_t chan, uint32_t *freq)
AXI DAC Get DDS frequency for specific channel.
Definition: axi_dac_core.c:638
AXI_DAC_REG_CUSTOM_CTRL
#define AXI_DAC_REG_CUSTOM_CTRL
Definition: axi_dac_core.c:85