Go to the documentation of this file.
50 #define ADRF6780_REG_CONTROL 0x00
51 #define ADRF6780_REG_ALARM_READBACK 0x01
52 #define ADRF6780_REG_ALARM_MASKS 0x02
53 #define ADRF6780_REG_ENABLE 0x03
54 #define ADRF6780_REG_LINEARIZE 0x04
55 #define ADRF6780_REG_LO_PATH 0x05
56 #define ADRF6780_REG_ADC_CONTROL 0x06
57 #define ADRF6780_REG_ADC_OUTPUT 0x0C
60 #define ADRF6780_PARITY_EN_MSK NO_OS_BIT(15)
61 #define ADRF6780_SOFT_RESET_MSK NO_OS_BIT(14)
62 #define ADRF6780_CHIP_ID_MSK NO_OS_GENMASK(11, 4)
63 #define ADRF6780_CHIP_ID 0xA
64 #define ADRF6780_CHIP_REVISION_MSK NO_OS_GENMASK(3, 0)
67 #define ADRF6780_PARITY_ERROR_MSK NO_OS_BIT(15)
68 #define ADRF6780_TOO_FEW_ERRORS_MSK NO_OS_BIT(14)
69 #define ADRF6780_TOO_MANY_ERRORS_MSK NO_OS_BIT(13)
70 #define ADRF6780_ADDRESS_RANGE_ERROR_MSK NO_OS_BIT(12)
73 #define ADRF6780_VGA_BUFFER_EN_MSK NO_OS_BIT(8)
74 #define ADRF6780_DETECTOR_EN_MSK NO_OS_BIT(7)
75 #define ADRF6780_LO_BUFFER_EN_MSK NO_OS_BIT(6)
76 #define ADRF6780_IF_MODE_EN_MSK NO_OS_BIT(5)
77 #define ADRF6780_IQ_MODE_EN_MSK NO_OS_BIT(4)
78 #define ADRF6780_LO_X2_EN_MSK NO_OS_BIT(3)
79 #define ADRF6780_LO_PPF_EN_MSK NO_OS_BIT(2)
80 #define ADRF6780_LO_EN_MSK NO_OS_BIT(1)
81 #define ADRF6780_UC_BIAS_EN_MSK NO_OS_BIT(0)
84 #define ADRF6780_RDAC_LINEARIZE_MSK NO_OS_GENMASK(7, 0)
87 #define ADRF6780_LO_SIDEBAND_MSK NO_OS_BIT(10)
88 #define ADRF6780_Q_PATH_PHASE_ACCURACY_MSK NO_OS_GENMASK(7, 4)
89 #define ADRF6780_I_PATH_PHASE_ACCURACY_MSK NO_OS_GENMASK(3, 0)
92 #define ADRF6780_VDET_OUTPUT_SELECT_MSK NO_OS_BIT(3)
93 #define ADRF6780_ADC_START_MSK NO_OS_BIT(2)
94 #define ADRF6780_ADC_EN_MSK NO_OS_BIT(1)
95 #define ADRF6780_ADC_CLOCK_EN_MSK NO_OS_BIT(0)
98 #define ADRF6780_ADC_STATUS_MSK NO_OS_BIT(8)
99 #define ADRF6780_ADC_VALUE_MSK NO_OS_GENMASK(7, 0)
102 #define ADRF6780_BUFF_SIZE_BYTES 3
103 #define ADRF6780_SPI_READ_CMD NO_OS_BIT(7)
104 #define ADRF6780_SPI_WRITE_CMD (0 << 7)
174 uint16_t mask, uint16_t data);
188 uint8_t i_data, uint8_t q_data);
192 uint8_t *i_data, uint8_t *q_data);
bool if_mode_en
Definition: adrf6780.h:151
int adrf6780_spi_update_bits(struct adrf6780_dev *dev, uint8_t reg_addr, uint16_t mask, uint16_t data)
Update ADRF6780 register.
Definition: adrf6780.c:109
#define ADRF6780_LO_X2_EN_MSK
Definition: adrf6780.h:78
#define ADRF6780_BUFF_SIZE_BYTES
Definition: adrf6780.h:102
int adrf6780_spi_write(struct adrf6780_dev *dev, uint8_t reg_addr, uint16_t data)
Writes data to ADRF6780 over SPI.
Definition: adrf6780.c:54
bool vga_buff_en
Definition: adrf6780.h:147
bool lo_x2_en
Definition: adrf6780.h:153
int32_t no_os_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI.
Definition: no_os_spi.c:159
Header file of SPI Interface.
#define ADRF6780_REG_ADC_OUTPUT
Definition: adrf6780.h:57
bool lo_sideband
Definition: adrf6780.h:159
#define ADRF6780_LO_BUFFER_EN_MSK
Definition: adrf6780.h:75
bool lo_en
Definition: adrf6780.h:155
bool lo_en
Definition: adrf6780.h:128
struct no_os_spi_desc * spi_desc
Definition: adrf6780.h:143
#define ADRF6780_REG_ENABLE
Definition: adrf6780.h:53
#define ADRF6780_SPI_READ_CMD
Definition: adrf6780.h:103
#define ADRF6780_LO_PPF_EN_MSK
Definition: adrf6780.h:79
Header file of Delay functions.
int adrf6780_spi_read(struct adrf6780_dev *dev, uint8_t reg_addr, uint16_t *data)
Reads data from ADRF6780 over SPI.
Definition: adrf6780.c:78
int adrf6780_init(struct adrf6780_dev **device, struct adrf6780_init_param *init_param)
Initializes the adrf6780.
Definition: adrf6780.c:270
#define ADRF6780_CHIP_ID
Definition: adrf6780.h:63
int adrf6780_read_adc_raw(struct adrf6780_dev *dev, uint16_t *data)
Read ADC raw data.
Definition: adrf6780.c:211
int adrf6780_spi_read(struct adrf6780_dev *dev, uint8_t reg_addr, uint16_t *data)
Reads data from ADRF6780 over SPI.
Definition: adrf6780.c:78
Definition: ad9361_util.h:69
#define ADRF6780_Q_PATH_PHASE_ACCURACY_MSK
Definition: adrf6780.h:88
bool lo_x2_en
Definition: adrf6780.h:126
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
int adrf6780_read_adc_raw(struct adrf6780_dev *dev, uint16_t *data)
Read ADC raw data.
Definition: adrf6780.c:211
bool vga_buff_en
Definition: adrf6780.h:120
int adrf6780_get_rdac_linearize(struct adrf6780_dev *dev, uint8_t *rdac_lin)
Get IMD Performance Improvement.
Definition: adrf6780.c:143
int adrf6780_remove(struct adrf6780_dev *dev)
ADRF6780 Resources Deallocation.
Definition: adrf6780.c:365
int adrf6780_spi_update_bits(struct adrf6780_dev *dev, uint8_t reg_addr, uint16_t mask, uint16_t data)
Update ADRF6780 register.
Definition: adrf6780.c:109
bool lo_sideband
Definition: adrf6780.h:132
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
int adrf6780_get_rdac_linearize(struct adrf6780_dev *dev, uint8_t *rdac_lin)
Get IMD Performance Improvement.
Definition: adrf6780.c:143
bool vdet_out_en
Definition: adrf6780.h:161
#define ADRF6780_REG_LINEARIZE
Definition: adrf6780.h:54
int adrf6780_remove(struct adrf6780_dev *dev)
ADRF6780 Resources Deallocation.
Definition: adrf6780.c:365
ADRF6780 Initialization Parameters structure.
Definition: adrf6780.h:114
#define ADRF6780_SPI_WRITE_CMD
Definition: adrf6780.h:104
struct no_os_spi_init_param * spi_init
Definition: adrf6780.h:116
#define ADRF6780_ADC_EN_MSK
Definition: adrf6780.h:94
bool lo_buff_en
Definition: adrf6780.h:122
int adrf6780_get_cdac_iq_phase_accuracy(struct adrf6780_dev *dev, uint8_t *i_data, uint8_t *q_data)
Get I/Q Phase Accuracy.
Definition: adrf6780.c:189
unsigned long long lo_in
Definition: adrf6780.h:145
#define ADRF6780_CHIP_ID_MSK
Definition: adrf6780.h:62
unsigned long long lo_in
Definition: adrf6780.h:118
#define ADRF6780_SOFT_RESET_MSK
Definition: adrf6780.h:61
int adrf6780_get_cdac_iq_phase_accuracy(struct adrf6780_dev *dev, uint8_t *i_data, uint8_t *q_data)
Get I/Q Phase Accuracy.
Definition: adrf6780.c:189
#define ADRF6780_VDET_OUTPUT_SELECT_MSK
Definition: adrf6780.h:92
#define ADRF6780_LO_SIDEBAND_MSK
Definition: adrf6780.h:87
#define ADRF6780_ADC_STATUS_MSK
Definition: adrf6780.h:98
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
bool vdet_out_en
Definition: adrf6780.h:134
#define ADRF6780_REG_LO_PATH
Definition: adrf6780.h:55
bool lo_buff_en
Definition: adrf6780.h:149
#define ADRF6780_UC_BIAS_EN_MSK
Definition: adrf6780.h:81
#define ADRF6780_LO_EN_MSK
Definition: adrf6780.h:80
bool if_mode_en
Definition: adrf6780.h:124
#define ADRF6780_DETECTOR_EN_MSK
Definition: adrf6780.h:74
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
#define ADRF6780_VGA_BUFFER_EN_MSK
Definition: adrf6780.h:73
bool uc_bias_en
Definition: adrf6780.h:130
#define NO_OS_BIT(x)
Definition: no_os_util.h:45
int adrf6780_init(struct adrf6780_dev **device, struct adrf6780_init_param *init_param)
Initializes the adrf6780.
Definition: adrf6780.c:270
int adrf6780_set_cdac_iq_phase_accuracy(struct adrf6780_dev *dev, uint8_t i_data, uint8_t q_data)
Set I/Q Phase Accuracy.
Definition: adrf6780.c:164
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
#define ADRF6780_ADC_START_MSK
Definition: adrf6780.h:93
#define ADRF6780_ADC_CLOCK_EN_MSK
Definition: adrf6780.h:95
bool uc_bias_en
Definition: adrf6780.h:157
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: aducm3029_delay.c:114
int adrf6780_spi_write(struct adrf6780_dev *dev, uint8_t reg_addr, uint16_t data)
Writes data to ADRF6780 over SPI.
Definition: adrf6780.c:54
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
#define ADRF6780_I_PATH_PHASE_ACCURACY_MSK
Definition: adrf6780.h:89
int32_t no_os_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: no_os_spi.c:116
int adrf6780_set_cdac_iq_phase_accuracy(struct adrf6780_dev *dev, uint8_t i_data, uint8_t q_data)
Set I/Q Phase Accuracy.
Definition: adrf6780.c:164
int adrf6780_set_rdac_linearize(struct adrf6780_dev *dev, uint8_t rdac_lin)
Set IMD Performance Improvement.
Definition: adrf6780.c:131
int32_t no_os_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: no_os_spi.c:52
#define ADRF6780_IF_MODE_EN_MSK
Definition: adrf6780.h:76
ADRF6780 Device Descriptor.
Definition: adrf6780.h:141
int adrf6780_soft_reset(struct adrf6780_dev *dev)
Software Reset.
Definition: adrf6780.c:249
Header file of utility functions.
#define ADRF6780_REG_CONTROL
Definition: adrf6780.h:50
#define ADRF6780_IQ_MODE_EN_MSK
Definition: adrf6780.h:77
int adrf6780_soft_reset(struct adrf6780_dev *dev)
Software Reset.
Definition: adrf6780.c:249
Header file for adrf6780 Driver.
#define ADRF6780_REG_ADC_CONTROL
Definition: adrf6780.h:56
int adrf6780_set_rdac_linearize(struct adrf6780_dev *dev, uint8_t rdac_lin)
Set IMD Performance Improvement.
Definition: adrf6780.c:131
chip_id
Definition: ad9172.h:51
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
#define ADRF6780_RDAC_LINEARIZE_MSK
Definition: adrf6780.h:84