no-OS
|
Header file of adf4153 driver. More...
Go to the source code of this file.
Classes | |
struct | adf4153_settings_t |
struct | adf4153_dev |
struct | adf4153_init_param |
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... | |
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... | |
Header file of adf4153 driver.
Copyright 2013(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 ADF4153_CE2_HIGH |
#define ADF4153_CE2_LOW |
#define ADF4153_CE2_OUT |
#define ADF4153_CE_HIGH |
#define ADF4153_CE_LOW |
#define ADF4153_CE_OUT |
#define ADF4153_CP2_CURRENT_0_31 8 |
#define ADF4153_CP2_CURRENT_0_63 9 |
#define ADF4153_CP2_CURRENT_0_94 10 |
#define ADF4153_CP2_CURRENT_1_25 11 |
#define ADF4153_CP2_CURRENT_1_57 12 |
#define ADF4153_CP2_CURRENT_1_88 13 |
#define ADF4153_CP2_CURRENT_2_19 14 |
#define ADF4153_CP2_CURRENT_2_50 15 |
#define ADF4153_CP_CURRENT_0_63 0 |
#define ADF4153_CP_CURRENT_1_25 1 |
#define ADF4153_CP_CURRENT_1_88 2 |
#define ADF4153_CP_CURRENT_2_50 3 |
#define ADF4153_CP_CURRENT_3_13 4 |
#define ADF4153_CP_CURRENT_3_75 5 |
#define ADF4153_CP_CURRENT_4_38 6 |
#define ADF4153_CP_CURRENT_5_00 7 |
#define ADF4153_CP_DISABLED 0 |
#define ADF4153_CP_THREE_STATE 1 |
#define ADF4153_CR_DISABLED 0 |
#define ADF4153_CR_ENABLED 1 |
#define ADF4153_CTRL_CONTROL 2 /* Control Register */ |
#define ADF4153_CTRL_MASK 0x3 |
#define ADF4153_CTRL_N_DIVIDER 0 /* N Divider Register */ |
#define ADF4153_CTRL_NOISE_SPUR 3 /* Noise and Spur Reg*/ |
#define ADF4153_CTRL_R_DIVIDER 1 /* R Divider Register */ |
#define ADF4153_FASTLOCK_DISABLED 0 |
#define ADF4153_FASTLOCK_ENABLED 1 |
#define ADF4153_LDP_24 0 |
#define ADF4153_LDP_40 1 |
#define ADF4153_LE2_HIGH |
#define ADF4153_LE2_LOW |
#define ADF4153_LE2_OUT |
#define ADF4153_LE_HIGH |
#define ADF4153_LE_LOW |
#define ADF4153_LE_OUT |
#define ADF4153_LOAD_NORMAL 0 |
#define ADF4153_LOAD_RESYNC 1 |
#define ADF4153_LOW_NOISE_SPUR 0b11100 |
#define ADF4153_LOW_SPUR_MODE 0b00000 |
#define ADF4153_LOWEST_NOISE 0b11111 |
#define ADF4153_MUXOUT_ANALOG_LOCK 5 |
#define ADF4153_MUXOUT_DIGITAL_LOCK 1 |
#define ADF4153_MUXOUT_FASTLOCK 6 |
#define ADF4153_MUXOUT_LOGICHIGH 3 |
#define ADF4153_MUXOUT_LOGICLOW 7 |
#define ADF4153_MUXOUT_NDIV_OUTPUT 2 |
#define ADF4153_MUXOUT_RDIV_OUTPUT 4 |
#define ADF4153_MUXOUT_THREESTATE 0 |
#define ADF4153_PD_DISABLED 0 |
#define ADF4153_PD_ENABLED 1 |
#define ADF4153_PD_POL_NEGATIV 0 |
#define ADF4153_PD_POL_POSITIVE 1 |
#define ADF4153_PRESCALER_4_5 0 |
#define ADF4153_PRESCALER_8_9 1 |
#define ADF4153_R0_FASTLOCK | ( | x | ) |
#define ADF4153_R0_FASTLOCK_MASK 0x1 |
#define ADF4153_R0_FASTLOCK_OFFSET 23 |
#define ADF4153_R0_FRAC | ( | x | ) |
#define ADF4153_R0_FRAC_MASK 0xFFFul |
#define ADF4153_R0_FRAC_OFFSET 2 |
#define ADF4153_R0_INT | ( | x | ) |
#define ADF4153_R0_INT_MASK 0x1FFul |
#define ADF4153_R0_INT_OFFSET 14 |
#define ADF4153_R1_LOAD | ( | x | ) |
#define ADF4153_R1_LOAD_MASK 0x1 |
#define ADF4153_R1_LOAD_OFFSET 23 |
#define ADF4153_R1_MOD | ( | x | ) |
#define ADF4153_R1_MOD_MASK 0xFFFul |
#define ADF4153_R1_MOD_OFFSET 2 |
#define ADF4153_R1_MUXOUT | ( | x | ) |
#define ADF4153_R1_MUXOUT_MASK 0x7 |
#define ADF4153_R1_MUXOUT_OFFSET 20 |
#define ADF4153_R1_PRESCALE | ( | x | ) |
#define ADF4153_R1_PRESCALE_MASK 0x1ul |
#define ADF4153_R1_PRESCALE_OFFSET 18 |
#define ADF4153_R1_RCOUNTER | ( | x | ) |
#define ADF4153_R1_RCOUNTER_MASK 0xFul |
#define ADF4153_R1_RCOUNTER_OFFSET 14 |
#define ADF4153_R2_COUNTER_RST | ( | x | ) |
#define ADF4153_R2_COUNTER_RST_MASK 0x1ul |
#define ADF4153_R2_COUNTER_RST_OFFSET 2 |
#define ADF4153_R2_CP_3STATE | ( | x | ) |
#define ADF4153_R2_CP_3STATE_MASK 0x1 |
#define ADF4153_R2_CP_3STATE_OFFSET 3 |
#define ADF4153_R2_CP_CURRENT | ( | x | ) |
#define ADF4153_R2_CP_CURRENT_MASK 0xF |
#define ADF4153_R2_CP_CURRENT_OFFSET 7 |
#define ADF4153_R2_LDP | ( | x | ) |
#define ADF4153_R2_LDP_MASK 0x1 |
#define ADF4153_R2_LDP_OFFSET 5 |
#define ADF4153_R2_PD_POL | ( | x | ) |
#define ADF4153_R2_PD_POL_MASK 0x1 |
#define ADF4153_R2_PD_POL_OFFSET 6 |
#define ADF4153_R2_POWER_DOWN | ( | x | ) |
#define ADF4153_R2_POWER_DOWN_MASK 0x1 |
#define ADF4153_R2_POWER_DOWN_OFFSET 4 |
#define ADF4153_R2_REF_DOUBLER | ( | x | ) |
#define ADF4153_R2_REF_DOUBLER_MASK 0x1 |
#define ADF4153_R2_REF_DOUBLER_OFFSET 11 |
#define ADF4153_R2_RESYNC | ( | x | ) |
#define ADF4153_R2_RESYNC_MASK 0x7 |
#define ADF4153_R2_RESYNC_OFFSET 12 |
#define ADF4153_R3_NOISE_SPURG | ( | x | ) |
#define ADF4153_R3_NOISE_SPURG_MASK 0x3C4 |
#define ADF4153_REF_DOUBLER_DIS 0 |
#define ADF4153_REF_DOUBLER_EN 1 |
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. |
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 |