Header file for adrf6780 Driver.
More...
#include <stdint.h>
#include <stdbool.h>
#include "no_os_spi.h"
#include "no_os_util.h"
|
| int | adrf6780_spi_write (struct adrf6780_dev *dev, uint8_t reg_addr, uint16_t data) |
| | Writes data to ADRF6780 over SPI.
|
| |
| int | adrf6780_spi_update_bits (struct adrf6780_dev *dev, uint8_t reg_addr, uint16_t mask, uint16_t data) |
| | Update ADRF6780 register.
|
| |
| int | adrf6780_spi_read (struct adrf6780_dev *dev, uint8_t reg_addr, uint16_t *data) |
| | Reads data from ADRF6780 over SPI.
|
| |
| int | adrf6780_set_rdac_linearize (struct adrf6780_dev *dev, uint8_t rdac_lin) |
| | Set IMD Performance Improvement.
|
| |
| int | adrf6780_get_rdac_linearize (struct adrf6780_dev *dev, uint8_t *rdac_lin) |
| | Get IMD Performance Improvement.
|
| |
| int | adrf6780_set_cdac_iq_phase_accuracy (struct adrf6780_dev *dev, uint8_t i_data, uint8_t q_data) |
| | Set I/Q Phase Accuracy.
|
| |
| int | adrf6780_get_cdac_iq_phase_accuracy (struct adrf6780_dev *dev, uint8_t *i_data, uint8_t *q_data) |
| | Get I/Q Phase Accuracy.
|
| |
| int | adrf6780_read_adc_raw (struct adrf6780_dev *dev, uint16_t *data) |
| | Read ADC raw data.
|
| |
| int | adrf6780_soft_reset (struct adrf6780_dev *dev) |
| | Software Reset.
|
| |
| int | adrf6780_init (struct adrf6780_dev **device, struct adrf6780_init_param *init_param) |
| | Initializes the adrf6780.
|
| |
| int | adrf6780_remove (struct adrf6780_dev *dev) |
| | ADRF6780 Resources Deallocation.
|
| |
Header file for adrf6780 Driver.
- Author
- Antoniu Miclaus (anton.nosp@m.iu.m.nosp@m.iclau.nosp@m.s@an.nosp@m.alog..nosp@m.com)
Copyright 2022(c) Analog Devices, Inc.
SPDX-License-Identifier: BSD-3-Clause
◆ ADRF6780_ADC_CLOCK_EN_MSK
| #define ADRF6780_ADC_CLOCK_EN_MSK NO_OS_BIT(0) |
◆ ADRF6780_ADC_EN_MSK
◆ ADRF6780_ADC_START_MSK
◆ ADRF6780_ADC_STATUS_MSK
◆ ADRF6780_ADC_VALUE_MSK
◆ ADRF6780_ADDRESS_RANGE_ERROR_MSK
| #define ADRF6780_ADDRESS_RANGE_ERROR_MSK NO_OS_BIT(12) |
◆ ADRF6780_BUFF_SIZE_BYTES
| #define ADRF6780_BUFF_SIZE_BYTES 3 |
◆ ADRF6780_CHIP_ID
| #define ADRF6780_CHIP_ID 0xA |
◆ ADRF6780_CHIP_ID_MSK
◆ ADRF6780_CHIP_REVISION_MSK
◆ ADRF6780_DETECTOR_EN_MSK
| #define ADRF6780_DETECTOR_EN_MSK NO_OS_BIT(7) |
◆ ADRF6780_I_PATH_PHASE_ACCURACY_MSK
◆ ADRF6780_IF_MODE_EN_MSK
◆ ADRF6780_IQ_MODE_EN_MSK
◆ ADRF6780_LO_BUFFER_EN_MSK
| #define ADRF6780_LO_BUFFER_EN_MSK NO_OS_BIT(6) |
◆ ADRF6780_LO_EN_MSK
◆ ADRF6780_LO_PPF_EN_MSK
◆ ADRF6780_LO_SIDEBAND_MSK
| #define ADRF6780_LO_SIDEBAND_MSK NO_OS_BIT(10) |
◆ ADRF6780_LO_X2_EN_MSK
◆ ADRF6780_PARITY_EN_MSK
◆ ADRF6780_PARITY_ERROR_MSK
| #define ADRF6780_PARITY_ERROR_MSK NO_OS_BIT(15) |
◆ ADRF6780_Q_PATH_PHASE_ACCURACY_MSK
◆ ADRF6780_RDAC_LINEARIZE_MSK
◆ ADRF6780_REG_ADC_CONTROL
| #define ADRF6780_REG_ADC_CONTROL 0x06 |
◆ ADRF6780_REG_ADC_OUTPUT
| #define ADRF6780_REG_ADC_OUTPUT 0x0C |
◆ ADRF6780_REG_ALARM_MASKS
| #define ADRF6780_REG_ALARM_MASKS 0x02 |
◆ ADRF6780_REG_ALARM_READBACK
| #define ADRF6780_REG_ALARM_READBACK 0x01 |
◆ ADRF6780_REG_CONTROL
| #define ADRF6780_REG_CONTROL 0x00 |
◆ ADRF6780_REG_ENABLE
| #define ADRF6780_REG_ENABLE 0x03 |
◆ ADRF6780_REG_LINEARIZE
| #define ADRF6780_REG_LINEARIZE 0x04 |
◆ ADRF6780_REG_LO_PATH
| #define ADRF6780_REG_LO_PATH 0x05 |
◆ ADRF6780_SOFT_RESET_MSK
| #define ADRF6780_SOFT_RESET_MSK NO_OS_BIT(14) |
◆ ADRF6780_SPI_READ_CMD
◆ ADRF6780_SPI_WRITE_CMD
| #define ADRF6780_SPI_WRITE_CMD (0 << 7) |
◆ ADRF6780_TOO_FEW_ERRORS_MSK
| #define ADRF6780_TOO_FEW_ERRORS_MSK NO_OS_BIT(14) |
◆ ADRF6780_TOO_MANY_ERRORS_MSK
| #define ADRF6780_TOO_MANY_ERRORS_MSK NO_OS_BIT(13) |
◆ ADRF6780_UC_BIAS_EN_MSK
◆ ADRF6780_VDET_OUTPUT_SELECT_MSK
| #define ADRF6780_VDET_OUTPUT_SELECT_MSK NO_OS_BIT(3) |
◆ ADRF6780_VGA_BUFFER_EN_MSK
| #define ADRF6780_VGA_BUFFER_EN_MSK NO_OS_BIT(8) |
◆ adrf6780_get_cdac_iq_phase_accuracy()
| 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
- Parameters
-
| dev | - The device structure. |
| i_data | - I Phase Accuracy. |
| q_data | - Q Phase Accuracy. |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ adrf6780_get_rdac_linearize()
| int adrf6780_get_rdac_linearize |
( |
struct adrf6780_dev * | dev, |
|
|
uint8_t * | rdac_lin ) |
Get IMD Performance Improvement.
Get IMD Performance Improvement
- Parameters
-
| dev | - The device structure. |
| rdac_lin | - RDAC 8bits data. |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ adrf6780_init()
Initializes the adrf6780.
ADRF6780 Initialization
- Parameters
-
| device | - The device structure. |
| init_param | - The structure containing the device initial parameters. |
- Returns
- Returns 0 in case of success or negative error code.
◆ adrf6780_read_adc_raw()
| int adrf6780_read_adc_raw |
( |
struct adrf6780_dev * | dev, |
|
|
uint16_t * | data ) |
Read ADC raw data.
ADRF6780 Read ADC Raw Data
- Parameters
-
| dev | - The device structure. |
| data | - ADC Data. |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ adrf6780_remove()
ADRF6780 Resources Deallocation.
ADRF6780 Resources Deallocation
- Parameters
-
| dev | - The device structure. |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ adrf6780_set_cdac_iq_phase_accuracy()
| 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
- Parameters
-
| dev | - The device structure. |
| i_data | - I Phase Accuracy. |
| q_data | - Q Phase Accuracy. |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ adrf6780_set_rdac_linearize()
| int adrf6780_set_rdac_linearize |
( |
struct adrf6780_dev * | dev, |
|
|
uint8_t | rdac_lin ) |
Set IMD Performance Improvement.
Set IMD Performance Improvement
- Parameters
-
| dev | - The device structure. |
| rdac_lin | - RDAC 8bits data. |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ adrf6780_soft_reset()
Software Reset.
- Parameters
-
| dev | - The device structure. |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ adrf6780_spi_read()
| int adrf6780_spi_read |
( |
struct adrf6780_dev * | dev, |
|
|
uint8_t | reg_addr, |
|
|
uint16_t * | data ) |
Reads data from ADRF6780 over SPI.
ADRF6780 SPI Read
- Parameters
-
| dev | - The device structure. |
| reg_addr | - The register address. |
| data | - Data read from the device. |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ adrf6780_spi_update_bits()
| int adrf6780_spi_update_bits |
( |
struct adrf6780_dev * | dev, |
|
|
uint8_t | reg_addr, |
|
|
uint16_t | mask, |
|
|
uint16_t | data ) |
Update ADRF6780 register.
- Parameters
-
| 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). |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ adrf6780_spi_write()
| int adrf6780_spi_write |
( |
struct adrf6780_dev * | dev, |
|
|
uint8_t | reg_addr, |
|
|
uint16_t | data ) |
Writes data to ADRF6780 over SPI.
ADRF6780 SPI write
- Parameters
-
| dev | - The device structure. |
| reg_addr | - The register address. |
| data | - Data value to write. |
- Returns
- Returns 0 in case of success or negative error code otherwise.