no-OS
|
Macros | |
#define | CEIL(a, b) (((a) / (b)) + (((a) % (b)) > 0 ? 1 : 0)) |
#define | DATA_MASK_MSB8 0xFF0000 |
#define | DATA_OFFSET_MSB8 16 |
#define | DATA_MASK_MID8 0xFF00 |
#define | DATA_OFFSET_MID8 8 |
#define | DATA_MASK_LSB8 0xFF |
#define | DATA_OFFSET_LSB8 0 |
#define | ADDRESS_MASK 3 |
#define | FREQ_2_GHZ 2000000000 |
Functions | |
int8_t | adf4153_init (struct adf4153_dev **device, struct adf4153_init_param init_param) |
Initialize SPI and Initial Values for ADF4106 Board. More... | |
int32_t | adf4153_remove (struct adf4153_dev *dev) |
Free the resources allocated by adf4153_init(). More... | |
void | adf4153_update_latch (struct adf4153_dev *dev, uint32_t latch_data) |
Update one of the latch via the SPI interface. More... | |
uint32_t | adf4153_read_latch (struct adf4153_dev *dev, uint8_t latch_type) |
Return the value of a desired latch. More... | |
uint32_t | adf4153_tune_rcounter (struct adf4153_dev *dev, uint16_t *r_counter) |
Increases the R counter value until the ADF4106_PDF_MAX_FREQ is greater than PFD frequency. More... | |
uint64_t | adf4153_set_frequency (struct adf4153_dev *dev, uint64_t frequency) |
Sets the output frequency. More... | |
uint32_t | adf4153_get_channel_spacing (struct adf4153_dev *dev) |
Return the value of the channel spacing. More... | |
#define ADDRESS_MASK 3 |
#define CEIL | ( | a, | |
b | |||
) | (((a) / (b)) + (((a) % (b)) > 0 ? 1 : 0)) |
#define DATA_MASK_LSB8 0xFF |
#define DATA_MASK_MID8 0xFF00 |
#define DATA_MASK_MSB8 0xFF0000 |
#define DATA_OFFSET_LSB8 0 |
#define DATA_OFFSET_MID8 8 |
#define DATA_OFFSET_MSB8 16 |
#define FREQ_2_GHZ 2000000000 |
uint32_t adf4153_get_channel_spacing | ( | struct adf4153_dev * | dev | ) |
Return the value of the channel spacing.
dev | - The device structure. |
int8_t adf4153_init | ( | struct adf4153_dev ** | device, |
struct adf4153_init_param | init_param | ||
) |
Initialize SPI and Initial Values for ADF4106 Board.
device | - The device structure. |
init_param | - The structure that contains the device initial parameters. |
uint32_t adf4153_read_latch | ( | struct adf4153_dev * | dev, |
uint8_t | latch_type | ||
) |
Return the value of a desired latch.
dev | - The device structure. |
latch_type | - the type of the latch: 0 - 'ADF4153_CTRL_N_DIVIDER' 1 - 'ADF4153_CTRL_R_DIVIDER' 2 - 'ADF4153_CTRL_CONTROL' 3 - 'ADF4153_CTRL_NOISE_SPUR' |
int32_t adf4153_remove | ( | struct adf4153_dev * | dev | ) |
Free the resources allocated by adf4153_init().
dev | - The device structure. |
uint64_t adf4153_set_frequency | ( | struct adf4153_dev * | dev, |
uint64_t | frequency | ||
) |
Sets the output frequency.
dev | - The device structure. |
frequency | - The desired frequency value. |
uint32_t adf4153_tune_rcounter | ( | struct adf4153_dev * | dev, |
uint16_t * | r_counter | ||
) |
Increases the R counter value until the ADF4106_PDF_MAX_FREQ is greater than PFD frequency.
dev | - The device structure. |
r_counter | - pointer of the R counter variable. |
void adf4153_update_latch | ( | struct adf4153_dev * | dev, |
uint32_t | latch_data | ||
) |
Update one of the latch via the SPI interface.
dev | - The device structure. |
latch_data | - the data which will be written to the latch |