no-OS
Macros | Functions
ad917x_nco_api.c File Reference

Contains AD917x APIs for NCO configuration and control. More...

#include "AD917x.h"
#include "ad917x_reg.h"
#include "api_errors.h"
#include <stddef.h>
Include dependency graph for ad917x_nco_api.c:

Macros

#define LOWER_16(A)   ((A) & 0xFFFF)
 
#define UPPER_16(A)   (((A) >> 16) & 0xFFFF)
 
#define LOWER_32(A)   ((A) & (uint32_t) 0xFFFFFFFF)
 

Functions

int32_t ad917x_nco_set_phase_offset (ad917x_handle_t *h, const ad917x_dac_select_t dacs, const uint16_t dacs_po, const ad917x_channel_select_t channels, const uint16_t ch_po)
 Set NCO phase offset. More...
 
int32_t ad917x_nco_get_phase_offset (ad917x_handle_t *h, const ad917x_dac_select_t dacs, uint16_t *dacs_po, const ad917x_channel_select_t channels, uint16_t *ch_po)
 Get NCO phase offset. More...
 
int32_t ad917x_nco_set_ftw (ad917x_handle_t *h, const ad917x_dds_select_t dds, const uint64_t ftw, const uint64_t acc_modulus, const uint64_t acc_delta)
 Set FTW, ACC and MOD values. More...
 
int32_t ad917x_nco_get_ftw (ad917x_handle_t *h, const ad917x_dds_select_t dds, uint64_t *ftw, uint64_t *acc_modulus, uint64_t *acc_delta)
 Get FTW, ACC and MOD values. More...
 
int32_t ad917x_set_channel_gain (ad917x_handle_t *h, const uint16_t gain)
 Set Channel gain. More...
 
int32_t ad917x_set_dc_cal_tone_amp (ad917x_handle_t *h, const uint16_t amp)
 Set DC Calibration tone. More...
 
int32_t ad917x_get_channel_gain (ad917x_handle_t *h, uint16_t *gain)
 Get Channel gain. More...
 
int32_t ad917x_nco_enable (ad917x_handle_t *h, const ad917x_dac_select_t dacs, const ad917x_channel_select_t channels)
 NCO Enable. More...
 
int32_t ad917x_dc_test_tone_set (ad917x_handle_t *h, int32_t dc_test_tone_en)
 Set DC Test Tone enable status. More...
 
int32_t ad917x_dc_test_tone_get (ad917x_handle_t *h, int32_t *dc_test_tone_en)
 Get DC Test Tone enable status. More...
 
int32_t ad917x_ddsm_cal_dc_input_set (ad917x_handle_t *h, int32_t ddsm_cal_dc_input_en)
 Set Main DAC Cal DC Input. More...
 
int32_t ad917x_ddsm_cal_dc_input_get (ad917x_handle_t *h, int32_t *ddsm_cal_dc_input_en)
 Get Main DAC Cal DC Input. More...
 
int32_t ad917x_nco_set (ad917x_handle_t *h, const ad917x_dac_select_t dacs, const ad917x_channel_select_t channels, const int64_t carrier_freq_hz, const uint16_t amplitude, int32_t dc_test_tone_en, int32_t ddsm_cal_dc_input_en)
 Set NCO. More...
 
int32_t ad917x_nco_main_freq_get (ad917x_handle_t *h, ad917x_dac_select_t dac, int64_t *carrier_freq_hz)
 Get Main DAC NCO frequency. More...
 
int32_t ad917x_nco_channel_freq_get (ad917x_handle_t *h, ad917x_channel_select_t channel, int64_t *carrier_freq_hz)
 Get Channel NCO frequency. More...
 

Detailed Description

Contains AD917x APIs for NCO configuration and control.

Release 1.1.X

Copyright(c) 2017 Analog Devices, Inc. All Rights Reserved. This software is proprietary to Analog Devices, Inc. and its licensors. By using this software you agree to the terms of the associated Analog Devices Software License Agreement.

Macro Definition Documentation

◆ LOWER_16

#define LOWER_16 (   A)    ((A) & 0xFFFF)

◆ LOWER_32

#define LOWER_32 (   A)    ((A) & (uint32_t) 0xFFFFFFFF)

◆ UPPER_16

#define UPPER_16 (   A)    (((A) >> 16) & 0xFFFF)