no-OS
|
Header file for adrf6780 Driver. More...
Go to the source code of this file.
Classes | |
struct | adrf6780_init_param |
ADRF6780 Initialization Parameters structure. More... | |
struct | adrf6780_dev |
ADRF6780 Device Descriptor. More... | |
Functions | |
int | adrf6780_spi_write (struct adrf6780_dev *dev, uint8_t reg_addr, uint16_t data) |
Writes data to ADRF6780 over SPI. More... | |
int | adrf6780_spi_update_bits (struct adrf6780_dev *dev, uint8_t reg_addr, uint16_t mask, uint16_t data) |
Update ADRF6780 register. More... | |
int | adrf6780_spi_read (struct adrf6780_dev *dev, uint8_t reg_addr, uint16_t *data) |
Reads data from ADRF6780 over SPI. More... | |
int | adrf6780_set_rdac_linearize (struct adrf6780_dev *dev, uint8_t rdac_lin) |
Set IMD Performance Improvement. More... | |
int | adrf6780_get_rdac_linearize (struct adrf6780_dev *dev, uint8_t *rdac_lin) |
Get IMD Performance Improvement. More... | |
int | adrf6780_set_cdac_iq_phase_accuracy (struct adrf6780_dev *dev, uint8_t i_data, uint8_t q_data) |
Set I/Q Phase Accuracy. More... | |
int | adrf6780_get_cdac_iq_phase_accuracy (struct adrf6780_dev *dev, uint8_t *i_data, uint8_t *q_data) |
Get I/Q Phase Accuracy. More... | |
int | adrf6780_read_adc_raw (struct adrf6780_dev *dev, uint16_t *data) |
Read ADC raw data. More... | |
int | adrf6780_soft_reset (struct adrf6780_dev *dev) |
Software Reset. More... | |
int | adrf6780_init (struct adrf6780_dev **device, struct adrf6780_init_param *init_param) |
Initializes the adrf6780. More... | |
int | adrf6780_remove (struct adrf6780_dev *dev) |
ADRF6780 Resources Deallocation. More... | |
Header file for adrf6780 Driver.
Copyright 2022(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 ADRF6780_ADC_CLOCK_EN_MSK NO_OS_BIT(0) |
#define ADRF6780_ADC_EN_MSK NO_OS_BIT(1) |
#define ADRF6780_ADC_START_MSK NO_OS_BIT(2) |
#define ADRF6780_ADC_STATUS_MSK NO_OS_BIT(8) |
#define ADRF6780_ADC_VALUE_MSK NO_OS_GENMASK(7, 0) |
#define ADRF6780_ADDRESS_RANGE_ERROR_MSK NO_OS_BIT(12) |
#define ADRF6780_BUFF_SIZE_BYTES 3 |
#define ADRF6780_CHIP_ID 0xA |
#define ADRF6780_CHIP_ID_MSK NO_OS_GENMASK(11, 4) |
#define ADRF6780_CHIP_REVISION_MSK NO_OS_GENMASK(3, 0) |
#define ADRF6780_DETECTOR_EN_MSK NO_OS_BIT(7) |
#define ADRF6780_I_PATH_PHASE_ACCURACY_MSK NO_OS_GENMASK(3, 0) |
#define ADRF6780_IF_MODE_EN_MSK NO_OS_BIT(5) |
#define ADRF6780_IQ_MODE_EN_MSK NO_OS_BIT(4) |
#define ADRF6780_LO_BUFFER_EN_MSK NO_OS_BIT(6) |
#define ADRF6780_LO_EN_MSK NO_OS_BIT(1) |
#define ADRF6780_LO_PPF_EN_MSK NO_OS_BIT(2) |
#define ADRF6780_LO_SIDEBAND_MSK NO_OS_BIT(10) |
#define ADRF6780_LO_X2_EN_MSK NO_OS_BIT(3) |
#define ADRF6780_PARITY_EN_MSK NO_OS_BIT(15) |
#define ADRF6780_PARITY_ERROR_MSK NO_OS_BIT(15) |
#define ADRF6780_Q_PATH_PHASE_ACCURACY_MSK NO_OS_GENMASK(7, 4) |
#define ADRF6780_RDAC_LINEARIZE_MSK NO_OS_GENMASK(7, 0) |
#define ADRF6780_REG_ADC_CONTROL 0x06 |
#define ADRF6780_REG_ADC_OUTPUT 0x0C |
#define ADRF6780_REG_ALARM_MASKS 0x02 |
#define ADRF6780_REG_ALARM_READBACK 0x01 |
#define ADRF6780_REG_CONTROL 0x00 |
#define ADRF6780_REG_ENABLE 0x03 |
#define ADRF6780_REG_LINEARIZE 0x04 |
#define ADRF6780_REG_LO_PATH 0x05 |
#define ADRF6780_SOFT_RESET_MSK NO_OS_BIT(14) |
#define ADRF6780_SPI_READ_CMD NO_OS_BIT(7) |
#define ADRF6780_SPI_WRITE_CMD (0 << 7) |
#define ADRF6780_TOO_FEW_ERRORS_MSK NO_OS_BIT(14) |
#define ADRF6780_TOO_MANY_ERRORS_MSK NO_OS_BIT(13) |
#define ADRF6780_UC_BIAS_EN_MSK NO_OS_BIT(0) |
#define ADRF6780_VDET_OUTPUT_SELECT_MSK NO_OS_BIT(3) |
#define ADRF6780_VGA_BUFFER_EN_MSK NO_OS_BIT(8) |
int adrf6780_get_cdac_iq_phase_accuracy | ( | struct adrf6780_dev * | dev, |
uint8_t * | i_data, | ||
uint8_t * | q_data | ||
) |
Get I/Q Phase Accuracy.
Get I/Q Phase Accuracy
dev | - The device structure. |
i_data | - I Phase Accuracy. |
q_data | - Q Phase Accuracy. |
int adrf6780_get_rdac_linearize | ( | struct adrf6780_dev * | dev, |
uint8_t * | rdac_lin | ||
) |
Get IMD Performance Improvement.
Get IMD Performance Improvement
dev | - The device structure. |
rdac_lin | - RDAC 8bits data. |
int adrf6780_init | ( | struct adrf6780_dev ** | device, |
struct adrf6780_init_param * | init_param | ||
) |
Initializes the adrf6780.
ADRF6780 Initialization
device | - The device structure. |
init_param | - The structure containing the device initial parameters. |
int adrf6780_read_adc_raw | ( | struct adrf6780_dev * | dev, |
uint16_t * | data | ||
) |
Read ADC raw data.
ADRF6780 Read ADC Raw Data
dev | - The device structure. |
data | - ADC Data. |
int adrf6780_remove | ( | struct adrf6780_dev * | dev | ) |
ADRF6780 Resources Deallocation.
ADRF6780 Resources Deallocation
dev | - The device structure. |
int adrf6780_set_cdac_iq_phase_accuracy | ( | struct adrf6780_dev * | dev, |
uint8_t | i_data, | ||
uint8_t | q_data | ||
) |
Set I/Q Phase Accuracy.
Set I/Q Phase Accuracy
dev | - The device structure. |
i_data | - I Phase Accuracy. |
q_data | - Q Phase Accuracy. |
int adrf6780_set_rdac_linearize | ( | struct adrf6780_dev * | dev, |
uint8_t | rdac_lin | ||
) |
Set IMD Performance Improvement.
Set IMD Performance Improvement
dev | - The device structure. |
rdac_lin | - RDAC 8bits data. |
int adrf6780_soft_reset | ( | struct adrf6780_dev * | dev | ) |
Software Reset.
dev | - The device structure. |
int adrf6780_spi_read | ( | struct adrf6780_dev * | dev, |
uint8_t | reg_addr, | ||
uint16_t * | data | ||
) |
Reads data from ADRF6780 over SPI.
ADRF6780 SPI Read
dev | - The device structure. |
reg_addr | - The register address. |
data | - Data read from the device. |
int adrf6780_spi_update_bits | ( | struct adrf6780_dev * | dev, |
uint8_t | reg_addr, | ||
uint16_t | mask, | ||
uint16_t | data | ||
) |
Update ADRF6780 register.
dev | - The device structure. |
reg_addr | - The register address. |
mask | - Mask for specific register bits to be updated. |
data | - Data written to the device (requires prior bit shifting). |
int adrf6780_spi_write | ( | struct adrf6780_dev * | dev, |
uint8_t | reg_addr, | ||
uint16_t | data | ||
) |
Writes data to ADRF6780 over SPI.
ADRF6780 SPI write
dev | - The device structure. |
reg_addr | - The register address. |
data | - Data value to write. |