Go to the documentation of this file.
79 struct __attribute__((packed))
nvmp {
82 char carrier_model[20];
83 char carrier_version[2];
84 char carrier_serial[15];
93 uint8_t temp_correlation[2][4][5];
96 uint64_t hmc6300_vco[2];
101 uint64_t hmc6301_vco[2];
114 static_assert(
sizeof(
union nvmp255) == 255,
115 "Non-volatile memory parameters exceed the maximum allowed size.");
119 #define NVMP_AREA_ADDRESS(n) (256 * (n))
admv96xx_id
Definition: mwc.h:12
struct no_os_pid * rx_pid
Definition: mwc.h:33
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
uint64_t hmc6301_vco[2]
Definition: mwc.h:101
char * hw_version
Definition: mwc.h:40
@ IIO_VAL_INT
Definition: iio_types.h:50
Struct describing the scan type.
Definition: iio_types.h:168
@ MWC_IIO_ATTR_RX_TOLERANCE
Definition: mwc.h:72
struct no_os_eeprom_desc * eeprom
Definition: mwc.h:37
Structure holding the EEPROM descriptor.
Definition: no_os_eeprom.h:70
bool tx_auto_ifvga
Definition: mwc.h:29
uint8_t hmc6300_if_attn
Definition: mwc.h:97
bool hmc6300_enabled
Definition: mwc.h:95
int32_t no_os_eeprom_write(struct no_os_eeprom_desc *desc, uint32_t address, uint8_t *data, uint16_t bytes)
Write the EEPROM data.
Definition: no_os_eeprom.c:89
struct no_os_gpio_desc * reset_gpio
Definition: mwc.h:22
@ IIO_VAL_FRACTIONAL_LOG2
Definition: iio_types.h:56
Header file for PID control utility.
@ HMC6301_BB_ATTN_18dB
Definition: hmc630x.h:239
Structure holding channel attributess.
Definition: iio_types.h:103
enum hmc6301_lna_attn hmc6301_lna_attn
Definition: mwc.h:103
@ ID_ADMV96X3
Definition: mwc.h:14
enum hmc6301_bb_attn_fine hmc6301_bb_attnq_fine
Definition: mwc.h:107
void led_rx_det_green(bool on)
uint8_t(* temp_correlation)[5]
Definition: mwc.h:57
@ MWC_IIO_ATTR_TX_TARGET
Definition: mwc.h:68
Header file of Delay functions.
unsigned int tx_tolerance
Definition: mwc.h:87
struct nvmp data
Definition: mwc.h:111
Header file for EEPROM APIs.
int mwc_iio_init(struct mwc_iio_dev **iiodev, struct mwc_iio_init_param *init_param)
Definition: mwc.c:616
bool tx_autotuning
Definition: mwc.h:85
Definition: ad9361_util.h:69
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:117
@ MWC_IIO_ATTR_RX_AUTOTUNING
Definition: mwc.h:70
Configuration of the PID.
Definition: no_os_pid.h:54
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:49
void led_tx_det_red(bool on)
hmc6301_bb_attn
Definition: hmc630x.h:235
int mwc_save_to_eeprom(struct mwc_iio_dev *mwc, uint16_t address)
Definition: mwc.c:264
bool hmc6301_enabled
Definition: mwc.h:100
bool
Definition: common.h:48
uint8_t hmc6301_if_attn
Definition: mwc.h:102
int no_os_pid_remove(struct no_os_pid *pid)
struct no_os_pid * tx_pid
Definition: mwc.h:32
enum hmc6301_bb_attn hmc6301_bb_attn2
Definition: mwc.h:105
@ NO_OS_GPIO_LOW
Definition: no_os_gpio.h:115
int mwc_tx_rx_reset(struct mwc_iio_dev *mwc)
Definition: mwc.c:251
int hmc630x_get_temp(struct hmc630x_dev *dev, uint8_t *temp)
Definition: hmc630x.c:538
int hmc6301_get_lna_gain(struct hmc630x_dev *dev, enum hmc6301_lna_attn *gain)
Definition: hmc630x.c:878
bool rx_auto_ifvga_rflna
Definition: mwc.h:92
int no_os_pid_hysteresis(struct no_os_pid *pid, unsigned int hyst)
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
bool rx_autotuning
Definition: mwc.h:52
int hmc6301_set_bb_attn_fine(struct hmc630x_dev *dev, enum hmc6301_bb_attn_fine attn_i, enum hmc6301_bb_attn_fine attn_q)
Definition: hmc630x.c:934
#define no_os_min(x, y)
Definition: no_os_util.h:59
unsigned int rx_target
Definition: mwc.h:53
mwc_iio_attr_id
Definition: mwc.h:66
@ HMC6301_BB_ATTN_FINE_3dB
Definition: hmc630x.h:250
int mwc_tx_rx_reset(struct mwc_iio_dev *mwc)
Definition: mwc.c:251
int mwc_algorithms(struct mwc_iio_dev *mwc)
Definition: mwc.c:113
bool tx_auto_ifvga
Definition: mwc.h:55
const char * name
Definition: iio_types.h:131
char * hw_serial
Definition: mwc.h:41
void led_tx_det_green(bool on)
const char * name
Definition: iio_types.h:170
bool tx_autotuning
Definition: mwc.h:23
hmc6300 and hmc6301 device driver header.
struct adin1300_desc * adin1300
Definition: mwc.h:38
uint64_t hmc6300_vco[2]
Definition: mwc.h:96
const union nvmp255 factory_defaults_template
Definition: mwc.c:16
@ MWC_IIO_ATTR_TX_AUTOTUNING
Definition: mwc.h:67
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
unsigned int tx_target
Definition: mwc.h:50
bool rx_autotuning
Definition: mwc.h:26
struct no_os_gpio_init_param * reset_gpio_ip
Definition: mwc.h:48
@ MWC_IIO_ATTR_RX_TARGET
Definition: mwc.h:71
struct hmc630x_iio_dev * rx_iiodev
Definition: mwc.h:21
@ MWC_IIO_ATTR_RX_AUTO_IFVGA_RFLNA
Definition: mwc.h:74
struct iio_device * iio_dev
Definition: mwc.h:19
char _size[255]
Definition: mwc.h:112
struct adin1300_desc * adin1300
Definition: mwc.h:62
int32_t iio_parse_value(char *buf, enum iio_val fmt, int32_t *val, int32_t *val2)
Definition: iio.c:630
int hmc6300_get_rf_attn(struct hmc630x_dev *dev, uint8_t *attn)
Definition: hmc630x.c:730
void mwc_temp_correlation(uint8_t(*correlation)[5], uint8_t temp, uint8_t *tx_if, uint8_t *rx_if, uint8_t *rx_rflna)
Definition: mwc.c:95
@ ID_ADMV96X1
Definition: mwc.h:13
int hmc6300_set_rf_attn(struct hmc630x_dev *dev, uint8_t attn)
Definition: hmc630x.c:715
@ IIO_VOLTAGE
Definition: iio_types.h:65
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
unsigned int rx_target
Definition: mwc.h:89
Definition: max24287.h:109
char * carrier_serial
Definition: mwc.h:44
char * carrier_version
Definition: mwc.h:43
bool rx_autotuning
Definition: mwc.h:88
@ HMC6301_LNA_ATTN_12dB
Definition: hmc630x.h:230
Definition: adin1300.h:157
enum admv96xx_id id
Definition: mwc.h:58
@ MWC_IIO_ATTR_RESET
Definition: mwc.h:75
struct hmc630x_iio_dev * tx_iiodev
Definition: mwc.h:20
int hmc630x_set_if_attn(struct hmc630x_dev *dev, uint8_t attn)
Definition: hmc630x.c:675
int mwc_algorithms(struct mwc_iio_dev *mwc)
Definition: mwc.c:113
@ HMC6301_LNA_ATTN_18dB
Definition: hmc630x.h:231
struct max24287_desc * max24287
Definition: mwc.h:63
int mwc_iio_remove(struct mwc_iio_dev *desc)
Definition: mwc.c:695
hmc6301_bb_attn_fine
Definition: hmc630x.h:243
int hmc6301_get_bb_attn(struct hmc630x_dev *dev, enum hmc6301_bb_attn *attn1, enum hmc6301_bb_attn *attn2)
Definition: hmc630x.c:914
@ MWC_IIO_ATTR_TX_TOLERANCE
Definition: mwc.h:69
struct no_os_pid_range output_clip
Definition: no_os_pid.h:66
int32_t no_os_gpio_get(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Obtain the GPIO decriptor.
Definition: no_os_gpio.c:49
int hmc630x_get_enable(struct hmc630x_dev *dev, bool *enable)
Definition: hmc630x.c:619
uint8_t temp_correlation[2][4][5]
Definition: mwc.h:93
int iio_format_value(char *buf, uint32_t len, enum iio_val fmt, int32_t size, int32_t *vals)
Definition: iio.c:686
unsigned int rx_target
Definition: mwc.h:27
unsigned int rx_tolerance
Definition: mwc.h:54
enum hmc6301_bb_attn_fine hmc6301_bb_attni_fine
Definition: mwc.h:106
uint8_t no_os_crc8(const uint8_t *table, const uint8_t *pdata, size_t nbytes, uint8_t crc)
unsigned int Kp
Definition: no_os_pid.h:56
int hmc630x_get_if_attn(struct hmc630x_dev *dev, uint8_t *attn)
Definition: hmc630x.c:695
enum iio_chan_type type
Definition: iio_types.h:109
int mwc_iio_init(struct mwc_iio_dev **iio_dev, struct mwc_iio_init_param *init_param)
Definition: mwc.c:616
int no_os_pid_init(struct no_os_pid **pid, struct no_os_pid_config config)
@ MWC_IIO_ATTR_SAVE
Definition: mwc.h:76
uint8_t address
Definition: hmc630x.c:59
#define NULL
Definition: wrapper.h:64
char * carrier_model
Definition: mwc.h:42
int hmc6301_set_lna_gain(struct hmc630x_dev *dev, enum hmc6301_lna_attn gain)
Definition: hmc630x.c:865
int32_t no_os_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: no_os_gpio.c:197
bool tx_auto_ifvga
Definition: mwc.h:91
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
int16_t ch_num
Definition: iio_types.h:105
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
unsigned int tx_tolerance
Definition: mwc.h:51
unsigned int rx_tolerance
Definition: mwc.h:28
enum hmc6301_bb_attn hmc6301_bb_attn1
Definition: mwc.h:104
const uint8_t * crc8
Definition: mwc.h:60
enum admv96xx_id id
Definition: mwc.h:34
Header file of hmc6300 and hmc6301 driver extension for IIOD.
bool tx_autotuning
Definition: mwc.h:49
unsigned int tx_tolerance
Definition: mwc.h:25
struct no_os_eeprom_desc * eeprom
Definition: mwc.h:61
bool hbtx
Definition: mwc.h:35
int mwc_iio_remove(struct mwc_iio_dev *iiodev)
Definition: mwc.c:695
void led_rx_det_red(bool on)
@ HMC6301_BB_ATTN_FINE_0dB
Definition: hmc630x.h:244
Header file of GPIO Interface.
const uint8_t * crc8
Definition: mwc.h:36
bool rx_auto_ifvga_rflna
Definition: mwc.h:30
bool rx_auto_ifvga_rflna
Definition: mwc.h:56
Definition: iio_hmc630x.h:39
unsigned int tx_target
Definition: mwc.h:86
struct hmc630x_dev * dev
Definition: iio_hmc630x.h:40
uint8_t(* temp_correlation)[5]
Definition: mwc.h:31
uint8_t hmc6300_rf_attn
Definition: mwc.h:98
const union nvmp255 factory_defaults_template
Definition: mwc.c:16
Header file of utility functions.
int mwc_save_to_eeprom(struct mwc_iio_dev *mwc, uint16_t address)
Definition: mwc.c:264
int hmc630x_get_vco(struct hmc630x_dev *dev, uint64_t *frequency)
Definition: hmc630x.c:811
#define NVMP_AREA_ADDRESS(n)
Definition: mwc.h:119
int no_os_pid_reset(struct no_os_pid *pid)
int hmc6301_set_bb_attn(struct hmc630x_dev *dev, enum hmc6301_bb_attn attn1, enum hmc6301_bb_attn attn2)
Definition: hmc630x.c:891
unsigned int rx_tolerance
Definition: mwc.h:90
int32_t no_os_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO.
Definition: no_os_gpio.c:147
struct max24287_desc * max24287
Definition: mwc.h:39
@ HMC6301_LNA_ATTN_6dB
Definition: hmc630x.h:229
hmc6301_lna_attn
Definition: hmc630x.h:227
unsigned int tx_target
Definition: mwc.h:24
int high
Definition: no_os_pid.h:45
@ ID_ADMV96X5
Definition: mwc.h:15
Header file of CRC-8 computation.
int hmc6301_get_bb_attn_fine(struct hmc630x_dev *dev, enum hmc6301_bb_attn_fine *attn_i, enum hmc6301_bb_attn_fine *attn_q)
Definition: hmc630x.c:961
char hw_version[2]
Definition: mwc.h:80
@ MWC_IIO_ATTR_TX_AUTO_IFVGA
Definition: mwc.h:73
struct iio_attribute * attributes
Definition: iio_types.h:256
bool hbtx
Definition: mwc.h:59
int no_os_pid_control(struct no_os_pid *pid, int SP, int PV, int *output)