no-OS
|
Header file of ADF4106 driver. This driver supporting the following devices : ADF4001, ADF4002, ADF4106. More...
Go to the source code of this file.
Classes | |
struct | adf4106_settings_t |
store the value of all the latch and the input reference frequency More... | |
struct | adf4106_chip_info |
struct | adf4106_dev |
struct | adf4106_init_param |
Enumerations | |
enum | adf4106_type_t { ID_ADF4001, ID_ADF4002, ID_ADF4106 } |
enum | adf4106_init_t { INIT_LATCH, INIT_CEPIN, INIT_COUNTER_RESET } |
Functions | |
int8_t | adf4106_init (struct adf4106_dev **device, struct adf4106_init_param init_param) |
Initialize SPI and Initial Values for ADF4106 Board. More... | |
int32_t | adf4106_remove (struct adf4106_dev *dev) |
Free the resources allocated by adf4106_init(). More... | |
void | adf4106_update_latch (struct adf4106_dev *dev, uint32_t latch_data) |
Update one of the latch via the SPI interface. More... | |
uint32_t | adf4106_read_latch (struct adf4106_dev *dev, uint8_t latch_type) |
Return the value of a desired latch. More... | |
void | adf4106_init_latch_method (struct adf4106_dev *dev) |
Initialization latch method. More... | |
void | adf4106_init_cepin_method (struct adf4106_dev *dev) |
CE Pin method. More... | |
void | adf4106_init_counte_reset_method (struct adf4106_dev *dev) |
Counter reset method. More... | |
uint64_t | adf4106_set_frequency (struct adf4106_dev *dev, uint64_t frequency) |
Sets the output frequency. More... | |
Header file of ADF4106 driver. This driver supporting the following devices : ADF4001, ADF4002, ADF4106.
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 ADF4106_ASYNC_PWD 0 |
#define ADF4106_CE2_HIGH |
#define ADF4106_CE2_LOW |
#define ADF4106_CE2_OUT |
#define ADF4106_CE_HIGH |
#define ADF4106_CE_LOW |
#define ADF4106_CE_OUT |
#define ADF4106_CP | ( | x | ) |
#define ADF4106_CP_MASK 0x1 |
#define ADF4106_CP_NORMAL 0 |
#define ADF4106_CP_OFFSET 8 |
#define ADF4106_CP_THREE_STATE 1 |
#define ADF4106_CR | ( | x | ) |
#define ADF4106_CR_MASK 0x1ul |
#define ADF4106_CR_NORMAL 0 |
#define ADF4106_CR_OFFSET 2 |
#define ADF4106_CR_RESET 1 |
#define ADF4106_CS1 | ( | x | ) | ((x) << ADF4106_CS1_OFFSET) |
#define ADF4106_CS1_MASK 0x7 |
#define ADF4106_CS1_OFFSET 15 |
#define ADF4106_CS2 | ( | x | ) | ((x) << ADF4106_CS2_OFFSET) |
#define ADF4106_CS2_MASK 0x7 |
#define ADF4106_CS2_OFFSET 18 |
#define ADF4106_CS_0_62 0 |
#define ADF4106_CS_1_25 1 |
#define ADF4106_CS_1_87 2 |
#define ADF4106_CS_2_5 3 |
#define ADF4106_CS_3_12 4 |
#define ADF4106_CS_3_75 5 |
#define ADF4106_CS_4_37 6 |
#define ADF4106_CS_5_0 7 |
#define ADF4106_CTRL_FUNCTION_LATCH 2 /* Function Latch*/ |
#define ADF4106_CTRL_INIT_LATCH 3 /* Initialization Latch*/ |
#define ADF4106_CTRL_MASK 0x3 |
#define ADF4106_CTRL_N_COUNTER 1 /* N Counter */ |
#define ADF4106_CTRL_R_COUNTER 0 /* Reference Counter */ |
#define ADF4106_FASTLOCK | ( | x | ) |
#define ADF4106_FASTLOCK_DISABLE 0 |
#define ADF4106_FASTLOCK_MASK 0x3 |
#define ADF4106_FASTLOCK_MODE1 1 |
#define ADF4106_FASTLOCK_MODE2 3 |
#define ADF4106_FASTLOCK_OFFSET 9 |
#define ADF4106_LE2_HIGH |
#define ADF4106_LE2_LOW |
#define ADF4106_LE2_OUT |
#define ADF4106_LE_HIGH |
#define ADF4106_LE_LOW |
#define ADF4106_LE_OUT |
#define ADF4106_MUXOUT | ( | x | ) |
#define ADF4106_MUXOUT_3STATE 0 |
#define ADF4106_MUXOUT_AVDD 3 |
#define ADF4106_MUXOUT_DGND 7 |
#define ADF4106_MUXOUT_DLOCK_DETECT 1 |
#define ADF4106_MUXOUT_MASK 0x7 |
#define ADF4106_MUXOUT_NCH_OPENDRAIN 5 |
#define ADF4106_MUXOUT_NDIV_OUTPUT 2 |
#define ADF4106_MUXOUT_OFFSET 4 |
#define ADF4106_MUXOUT_RDIV_OUTPUT 4 |
#define ADF4106_MUXOUT_SERIAL_OUTPUT 6 |
#define ADF4106_N_COUNTER_A | ( | x | ) |
#define ADF4106_N_COUNTER_A_MASK 0x3F |
#define ADF4106_N_COUNTER_A_OFFSET 2 |
#define ADF4106_N_COUNTER_B | ( | x | ) |
#define ADF4106_N_COUNTER_B_MASK 0x1FFF |
#define ADF4106_N_COUNTER_B_OFFSET 8 |
#define ADF4106_N_CP | ( | x | ) |
#define ADF4106_N_CP_GAIN_1 0 |
#define ADF4106_N_CP_GAIN_2 1 |
#define ADF4106_N_CP_MASK 0x1 |
#define ADF4106_N_CP_OFFSET 21 |
#define ADF4106_PD1 | ( | x | ) |
#define ADF4106_PD1_MASK 0x1 |
#define ADF4106_PD1_NORMAL 0 |
#define ADF4106_PD1_OFFSET 3 |
#define ADF4106_PD1_POWER_DOWN 1 |
#define ADF4106_PD2 | ( | x | ) |
#define ADF4106_PD2_MASK 0x1 |
#define ADF4106_PD2_OFFSET 21 |
#define ADF4106_PDPOL | ( | x | ) |
#define ADF4106_PDPOL_MASK 0x1 |
#define ADF4106_PDPOL_NEGATIVE 0 |
#define ADF4106_PDPOL_OFFSET 7 |
#define ADF4106_PDPOL_POSITIVE 1 |
#define ADF4106_PRESCALE | ( | x | ) | (8 << (x)) |
#define ADF4106_PS | ( | x | ) |
#define ADF4106_PS_16_17 1 |
#define ADF4106_PS_32_33 2 |
#define ADF4106_PS_64_65 3 |
#define ADF4106_PS_8_9 0 |
#define ADF4106_PS_MASK 0x3 |
#define ADF4106_PS_OFFSET 22 |
#define ADF4106_R_ABP | ( | x | ) |
#define ADF4106_R_ABP_1_3NS 1 |
#define ADF4106_R_ABP_2_9NS 0 |
#define ADF4106_R_ABP_6_0NS 2 |
#define ADF4106_R_ABP_MASK 0x3 |
#define ADF4106_R_ABP_OFFSET 16 |
#define ADF4106_R_COUNTER | ( | x | ) |
#define ADF4106_R_COUNTER_MASK 0x3FFFul |
#define ADF4106_R_COUNTER_OFFSET 2 |
#define ADF4106_R_LDP | ( | x | ) |
#define ADF4106_R_LDP_3 0 |
#define ADF4106_R_LDP_5 1 |
#define ADF4106_R_LDP_MASK 0x1 |
#define ADF4106_R_LDP_OFFSET 20 |
#define ADF4106_R_TMB | ( | x | ) |
#define ADF4106_R_TMB_MASK 0x1 |
#define ADF4106_R_TMB_NORMAL 0 |
#define ADF4106_R_TMB_OFFSET 18 |
#define ADF4106_SYNC_PWD 1 |
#define ADF4106_TCC | ( | x | ) |
#define ADF4106_TCC_11 2 |
#define ADF4106_TCC_15 3 |
#define ADF4106_TCC_19 4 |
#define ADF4106_TCC_23 5 |
#define ADF4106_TCC_27 6 |
#define ADF4106_TCC_3 0 |
#define ADF4106_TCC_31 7 |
#define ADF4106_TCC_35 8 |
#define ADF4106_TCC_39 9 |
#define ADF4106_TCC_43 10 |
#define ADF4106_TCC_47 11 |
#define ADF4106_TCC_51 12 |
#define ADF4106_TCC_55 13 |
#define ADF4106_TCC_59 14 |
#define ADF4106_TCC_63 15 |
#define ADF4106_TCC_7 1 |
#define ADF4106_TCC_MASK 0xF |
#define ADF4106_TCC_OFFSET 11 |
enum adf4106_init_t |
enum adf4106_type_t |
int8_t adf4106_init | ( | struct adf4106_dev ** | device, |
struct adf4106_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. |
void adf4106_init_cepin_method | ( | struct adf4106_dev * | dev | ) |
CE Pin method.
dev | - The device structure. |
void adf4106_init_counte_reset_method | ( | struct adf4106_dev * | dev | ) |
Counter reset method.
dev | - The device structure. |
void adf4106_init_latch_method | ( | struct adf4106_dev * | dev | ) |
Initialization latch method.
dev | - The device structure. |
uint32_t adf4106_read_latch | ( | struct adf4106_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 - 'ADF4106_CTRL_R_COUNTER' 1 - 'ADF4106_CTRL_N_COUNTER' 2 - 'ADF4106_CTRL_FUNCTION_LATCH' 3 - 'ADF4106_CTRL_INIT_LATCH' |
int32_t adf4106_remove | ( | struct adf4106_dev * | dev | ) |
Free the resources allocated by adf4106_init().
dev | - The device structure. |
uint64_t adf4106_set_frequency | ( | struct adf4106_dev * | dev, |
uint64_t | frequency | ||
) |
Sets the output frequency.
dev | - The device structure. |
frequency | - The desired frequency value. |
void adf4106_update_latch | ( | struct adf4106_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 |