no-OS
|
Implementation of AD9739A Driver. More...
Macros | |
#define | FDATA 2500 |
Functions | |
int32_t | ad9739a_write (struct ad9739a_dev *dev, uint8_t register_address, uint8_t register_value) |
Writes a value to the selected register. More... | |
int32_t | ad9739a_read (struct ad9739a_dev *dev, uint8_t register_address, uint8_t *register_value) |
Reads the value of the selected register. More... | |
int32_t | ad9739a_reset (struct ad9739a_dev *dev) |
Resets the device. More... | |
int32_t | ad9739a_power_down (struct ad9739a_dev *dev, uint8_t pwr_config) |
Powers down LVDS interface and TxDAC. More... | |
int32_t | ad_serdes_clk (struct ad9739a_dev *dev, uint8_t mode) |
Sets the normal baseband mode or mix-mode. More... | |
float | ad9739a_dac_fs_current (struct ad9739a_dev *dev, float fs_val) |
Sets the full-scale output current for the DAC. More... | |
int32_t | delay_fdata_cycles (uint32_t cycles) |
Delay for a number of fdata clock cycles. More... | |
int32_t | ad9739a_setup (struct ad9739a_dev **device, struct ad9739a_init_param init_param) |
Initializes the AD9739A. More... | |
int32_t | ad9739a_remove (struct ad9739a_dev *dev) |
Free the resources allocated by ad9739a_setup(). More... | |
Implementation of AD9739A Driver.
Copyright 2012-2015(c) Analog Devices, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define FDATA 2500 |
float ad9739a_dac_fs_current | ( | struct ad9739a_dev * | dev, |
float | fs_val | ||
) |
Sets the full-scale output current for the DAC.
dev | - The device structure. |
fs_val | - The desired full-scale output current. Accepted values: 8.7 to 32.7 (mA) and 0. When fs_val is set to 0 the DAC output is disabled(sleep). |
int32_t ad9739a_power_down | ( | struct ad9739a_dev * | dev, |
uint8_t | pwr_config | ||
) |
Powers down LVDS interface and TxDAC.
dev | - The device structure. |
pwr_config | - Selects the modules to be powered-down. Example: AD9739A_POWER_DOWN_LVDS_DRVR_PD | AD9739A_POWER_DOWN_LVDS_RCVR_PD |
int32_t ad9739a_read | ( | struct ad9739a_dev * | dev, |
uint8_t | register_address, | ||
uint8_t * | register_value | ||
) |
Reads the value of the selected register.
dev | - The device structure. |
register_address | - The address of the register to read. |
register_value | - The value read from the register. |
int32_t ad9739a_remove | ( | struct ad9739a_dev * | dev | ) |
Free the resources allocated by ad9739a_setup().
dev | - The device structure. |
int32_t ad9739a_reset | ( | struct ad9739a_dev * | dev | ) |
Resets the device.
dev | - The device structure. |
int32_t ad9739a_setup | ( | struct ad9739a_dev ** | device, |
struct ad9739a_init_param | init_param | ||
) |
Initializes the AD9739A.
device | - The device structure. |
init_param | - The structure that contains the device initial parameters. |
int32_t ad9739a_write | ( | struct ad9739a_dev * | dev, |
uint8_t | register_address, | ||
uint8_t | register_value | ||
) |
Writes a value to the selected register.
dev | - The device structure. |
register_address | - The address of the register to write to. |
register_value | - The value to write to the register. |
int32_t ad_serdes_clk | ( | struct ad9739a_dev * | dev, |
uint8_t | mode | ||
) |
Sets the normal baseband mode or mix-mode.
dev | - The device structure. |
mode | - mode of operation. Example: AD9739A_DAC_DEC_NORMAL_BASEBAND - normal baseband mode; AD9739A_DAC_DEC_MIX_MODE - mix-mode. |
int32_t delay_fdata_cycles | ( | uint32_t | cycles | ) |
Delay for a number of fdata clock cycles.
cycles | - Number of cycles to wait for. |