hmc6300 and hmc6301 device driver implementation. More...
#include <errno.h>
#include <stdlib.h>
#include "hmc630x.h"
#include "no_os_delay.h"
#include "no_os_alloc.h"
Classes | |
struct | hmc630x_vco |
struct | hmc630x_dev |
Macros | |
#define | HMC630X_ARRAY_ADDRESS_MASK NO_OS_GENMASK(13, 8) |
#define | HMC630X_RW_MASK NO_OS_BIT(14) |
#define | HMC630X_ADDRESS_MASK NO_OS_GENMASK(17, 15) |
#define | HMC6300_ADDRESS 0x6 |
#define | HMC6301_ADDRESS 0x7 |
#define | HMC630X_FRAME_SIZE 18 |
#define | HMC6300_BITBANG_DELAY_US 1 |
#define | HMC6300_SETTLING_DELAY_MS 1 |
Functions | |
int | hmc630x_init (struct hmc630x_dev **dev, struct hmc630x_init_param *init) |
int | hmc630x_remove (struct hmc630x_dev *dev) |
enum hmc630x_type | hmc630x_type (struct hmc630x_dev *dev) |
int | hmc630x_write_row (struct hmc630x_dev *dev, uint8_t row, uint8_t val) |
int | hmc630x_read_row (struct hmc630x_dev *dev, uint8_t row, uint8_t *val) |
int | hmc630x_write_regmap (struct hmc630x_dev *dev, const uint8_t *regmap) |
int | hmc630x_write (struct hmc630x_dev *dev, uint16_t param, uint8_t value) |
int | hmc630x_read (struct hmc630x_dev *dev, uint16_t param, uint8_t *value) |
int | hmc630x_read_regmap (struct hmc630x_dev *dev, uint8_t *regmap) |
int | hmc630x_set_temp_en (struct hmc630x_dev *dev, bool enable) |
int | hmc630x_get_temp_en (struct hmc630x_dev *dev, bool *enable) |
int | hmc630x_get_temp (struct hmc630x_dev *dev, uint8_t *temp) |
int | hmc6300_set_fm_en (struct hmc630x_dev *dev, bool enable) |
int | hmc6300_get_fm_en (struct hmc630x_dev *dev, bool *enable) |
int | hmc630x_set_enable (struct hmc630x_dev *dev, bool enable) |
int | hmc630x_get_enable (struct hmc630x_dev *dev, bool *enable) |
int | hmc630x_set_if_attn (struct hmc630x_dev *dev, uint8_t attn) |
int | hmc630x_get_if_attn (struct hmc630x_dev *dev, uint8_t *attn) |
int | hmc6300_set_rf_attn (struct hmc630x_dev *dev, uint8_t attn) |
int | hmc6300_get_rf_attn (struct hmc630x_dev *dev, uint8_t *attn) |
int | hmc630x_set_vco (struct hmc630x_dev *dev, uint64_t frequency) |
int | hmc630x_get_vco (struct hmc630x_dev *dev, uint64_t *frequency) |
int | hmc630x_get_avail_vco (struct hmc630x_dev *dev, const uint64_t **avail, uint8_t *avail_num) |
int | hmc6301_set_lna_gain (struct hmc630x_dev *dev, enum hmc6301_lna_attn gain) |
int | hmc6301_get_lna_gain (struct hmc630x_dev *dev, enum hmc6301_lna_attn *gain) |
int | hmc6301_set_bb_attn (struct hmc630x_dev *dev, enum hmc6301_bb_attn attn1, enum hmc6301_bb_attn attn2) |
int | hmc6301_get_bb_attn (struct hmc630x_dev *dev, enum hmc6301_bb_attn *attn1, enum hmc6301_bb_attn *attn2) |
int | hmc6301_set_bb_attn_fine (struct hmc630x_dev *dev, enum hmc6301_bb_attn_fine attn_i, enum hmc6301_bb_attn_fine attn_q) |
int | hmc6301_get_bb_attn_fine (struct hmc630x_dev *dev, enum hmc6301_bb_attn_fine *attn_i, enum hmc6301_bb_attn_fine *attn_q) |
int | hmc6301_set_bb_lpc_hpc (struct hmc630x_dev *dev, enum hmc6301_bb_lpc lpc, enum hmc6301_bb_hpc hpc) |
int | hmc6301_get_bb_lpc_hpc (struct hmc630x_dev *dev, enum hmc6301_bb_lpc *lpc, enum hmc6301_bb_hpc *hpc) |
hmc6300 and hmc6301 device driver implementation.
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 HMC6300_ADDRESS 0x6 |
#define HMC6300_BITBANG_DELAY_US 1 |
#define HMC6300_SETTLING_DELAY_MS 1 |
#define HMC6301_ADDRESS 0x7 |
#define HMC630X_ADDRESS_MASK NO_OS_GENMASK(17, 15) |
#define HMC630X_ARRAY_ADDRESS_MASK NO_OS_GENMASK(13, 8) |
#define HMC630X_FRAME_SIZE 18 |
#define HMC630X_RW_MASK NO_OS_BIT(14) |
int hmc6300_get_fm_en | ( | struct hmc630x_dev * | dev, |
bool * | enable ) |
int hmc6300_get_rf_attn | ( | struct hmc630x_dev * | dev, |
uint8_t * | attn ) |
int hmc6300_set_fm_en | ( | struct hmc630x_dev * | dev, |
bool | enable ) |
int hmc6300_set_rf_attn | ( | struct hmc630x_dev * | dev, |
uint8_t | attn ) |
int hmc6301_get_bb_attn | ( | struct hmc630x_dev * | dev, |
enum hmc6301_bb_attn * | attn1, | ||
enum hmc6301_bb_attn * | attn2 ) |
int hmc6301_get_bb_attn_fine | ( | struct hmc630x_dev * | dev, |
enum hmc6301_bb_attn_fine * | attn_i, | ||
enum hmc6301_bb_attn_fine * | attn_q ) |
int hmc6301_get_bb_lpc_hpc | ( | struct hmc630x_dev * | dev, |
enum hmc6301_bb_lpc * | lpc, | ||
enum hmc6301_bb_hpc * | hpc ) |
int hmc6301_get_lna_gain | ( | struct hmc630x_dev * | dev, |
enum hmc6301_lna_attn * | gain ) |
int hmc6301_set_bb_attn | ( | struct hmc630x_dev * | dev, |
enum hmc6301_bb_attn | attn1, | ||
enum hmc6301_bb_attn | attn2 ) |
int hmc6301_set_bb_attn_fine | ( | struct hmc630x_dev * | dev, |
enum hmc6301_bb_attn_fine | attn_i, | ||
enum hmc6301_bb_attn_fine | attn_q ) |
int hmc6301_set_bb_lpc_hpc | ( | struct hmc630x_dev * | dev, |
enum hmc6301_bb_lpc | lpc, | ||
enum hmc6301_bb_hpc | hpc ) |
int hmc6301_set_lna_gain | ( | struct hmc630x_dev * | dev, |
enum hmc6301_lna_attn | gain ) |
int hmc630x_get_avail_vco | ( | struct hmc630x_dev * | dev, |
const uint64_t ** | avail, | ||
uint8_t * | avail_num ) |
int hmc630x_get_enable | ( | struct hmc630x_dev * | dev, |
bool * | enable ) |
int hmc630x_get_if_attn | ( | struct hmc630x_dev * | dev, |
uint8_t * | attn ) |
int hmc630x_get_temp | ( | struct hmc630x_dev * | dev, |
uint8_t * | temp ) |
int hmc630x_get_temp_en | ( | struct hmc630x_dev * | dev, |
bool * | enable ) |
int hmc630x_get_vco | ( | struct hmc630x_dev * | dev, |
uint64_t * | frequency ) |
int hmc630x_init | ( | struct hmc630x_dev ** | dev, |
struct hmc630x_init_param * | init ) |
int hmc630x_read | ( | struct hmc630x_dev * | dev, |
uint16_t | param, | ||
uint8_t * | value ) |
int hmc630x_read_regmap | ( | struct hmc630x_dev * | dev, |
uint8_t * | regmap ) |
int hmc630x_read_row | ( | struct hmc630x_dev * | dev, |
uint8_t | row, | ||
uint8_t * | val ) |
int hmc630x_remove | ( | struct hmc630x_dev * | dev | ) |
int hmc630x_set_enable | ( | struct hmc630x_dev * | dev, |
bool | enable ) |
int hmc630x_set_if_attn | ( | struct hmc630x_dev * | dev, |
uint8_t | attn ) |
int hmc630x_set_temp_en | ( | struct hmc630x_dev * | dev, |
bool | enable ) |
int hmc630x_set_vco | ( | struct hmc630x_dev * | dev, |
uint64_t | frequency ) |
enum hmc630x_type hmc630x_type | ( | struct hmc630x_dev * | dev | ) |
int hmc630x_write | ( | struct hmc630x_dev * | dev, |
uint16_t | param, | ||
uint8_t | value ) |
int hmc630x_write_regmap | ( | struct hmc630x_dev * | dev, |
const uint8_t * | regmap ) |
int hmc630x_write_row | ( | struct hmc630x_dev * | dev, |
uint8_t | row, | ||
uint8_t | val ) |