no-OS
|
Implementation of adf5902 Driver. More...
#include <malloc.h>
#include "adf5902.h"
#include "no_os_error.h"
#include "no_os_delay.h"
#include "no_os_util.h"
#include "no_os_alloc.h"
Functions | |
int32_t | adf5902_write (struct adf5902_dev *dev, uint8_t reg_addr, uint32_t data) |
Writes 4 bytes of data to ADF5902. More... | |
int32_t | adf5902_readback (struct adf5902_dev *dev, uint8_t reg_addr, uint32_t *data) |
Readback data from ADF5902. More... | |
int32_t | adf5902_init (struct adf5902_dev **device, struct adf5902_init_param *init_param) |
Initializes the ADF5902. More... | |
int32_t | adf5902_recalibrate (struct adf5902_dev *dev) |
Recalibration procedure. More... | |
int32_t | adf5902_read_temp (struct adf5902_dev *dev, float *temp) |
Free resoulces allocated for ADF5902. More... | |
int32_t | adf5902f_compute_frequency (struct adf5902_dev *dev, uint64_t *freq) |
Measure output locked frequency. More... | |
int32_t | adf5902_remove (struct adf5902_dev *dev) |
Free resoulces allocated for ADF5902. More... | |
Implementation of adf5902 Driver.
Copyright 2021(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.
int32_t adf5902_init | ( | struct adf5902_dev ** | device, |
struct adf5902_init_param * | init_param | ||
) |
Initializes the ADF5902.
device | - The device structure. |
init_param | - The structure containing the device initial parameters. |
int32_t adf5902_read_temp | ( | struct adf5902_dev * | dev, |
float * | temp | ||
) |
Free resoulces allocated for ADF5902.
dev | - The device structure. |
temp | - The temperature value. |
int32_t adf5902_readback | ( | struct adf5902_dev * | dev, |
uint8_t | reg_addr, | ||
uint32_t * | data | ||
) |
Readback data from ADF5902.
dev | - The device structure. |
reg_addr | - The register address. |
data | - Store the read data. |
int32_t adf5902_recalibrate | ( | struct adf5902_dev * | dev | ) |
Recalibration procedure.
dev | - The device structure |
int32_t adf5902_remove | ( | struct adf5902_dev * | dev | ) |
Free resoulces allocated for ADF5902.
dev | - The device structure. |
int32_t adf5902_write | ( | struct adf5902_dev * | dev, |
uint8_t | reg_addr, | ||
uint32_t | data | ||
) |
Writes 4 bytes of data to ADF5902.
dev | - The device structure. |
reg_addr | - The register address. |
data | - Data value to write. |
int32_t adf5902f_compute_frequency | ( | struct adf5902_dev * | dev, |
uint64_t * | freq | ||
) |
Measure output locked frequency.
dev | - The device structure. |
freq | - Measured frequency. |