no-OS
ad9553.h
Go to the documentation of this file.
1 /***************************************************************************/
39 #ifndef AD9553_H_
40 #define AD9553_H_
41 
42 /******************************************************************************/
43 /***************************** Include Files **********************************/
44 /******************************************************************************/
45 #include "no_os_spi.h"
46 
47 /******************************************************************************/
48 /********************** Macros and Constants Definitions **********************/
49 /******************************************************************************/
50 
51 #define AD9553_SPI_CONFIG 0x000
52 #define AD9553_PLL_CHARGE_PUMP_PFD_CTRL 0x00B
53 #define AD9553_PLL_CTRL 0x00D
54 #define AD9553_P1_DIV_HIGH 0x015
55 #define AD9553_P1_DIV_LOW_P2_DIV_HIGH 0x016
56 #define AD9553_P2_DIV_LOW 0x017
57 #define AD9553_P0_DIV 0x018
58 #define AD9553_N_DIV_HIGH 0x012
59 #define AD9553_N_DIV_MEDIUM 0x013
60 #define AD9553_N_DIV_LOW 0x014
61 #define AD9553_REFA_DIV_HIGH 0x01F
62 #define AD9553_REFA_DIV_LOW 0x020
63 #define AD9553_K_VALUE 0x021
64 #define AD9553_REFA_DIFF 0x029
65 #define AD9553_OUT1_DRIVER_CTRL 0x032
66 #define AD9553_OUT2_DRIVER_CTRL 0x034
67 #define AD9553_IO_UPDATE 0x005
68 
69 /******************************************************************************/
70 /*************************** Types Declarations *******************************/
71 /******************************************************************************/
72 
74  /* SPI */
76 };
77 
78 struct ad9553_dev {
79  /* SPI */
81 };
82 
83 /******************************************************************************/
84 /************************ Functions Declarations ******************************/
85 /******************************************************************************/
86 
87 int32_t ad9553_reg_read(struct ad9553_dev *dev, uint16_t reg_addr,
88  uint8_t *reg_data);
89 
90 int32_t ad9553_reg_write(struct ad9553_dev *dev, uint16_t reg_addr,
91  uint8_t reg_data);
92 
93 int32_t ad9553_setup(struct ad9553_dev **device,
94  const struct ad9553_init_param *init_param);
95 
96 int32_t ad9553_remove(struct ad9553_dev *dev);
97 
98 #endif
AD9553_K_VALUE
#define AD9553_K_VALUE
Definition: ad9553.h:63
AD9553_P1_DIV_HIGH
#define AD9553_P1_DIV_HIGH
Definition: ad9553.h:54
AD9553_REFA_DIV_LOW
#define AD9553_REFA_DIV_LOW
Definition: ad9553.h:62
ad9553_dev::spi_desc
struct no_os_spi_desc * spi_desc
Definition: ad9553.h:80
no_os_spi_write_and_read
int32_t no_os_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI.
Definition: no_os_spi.c:82
ad9553_reg_read
int32_t ad9553_reg_read(struct ad9553_dev *dev, uint16_t reg_addr, uint8_t *reg_data)
Reads from the ad9553 that is contected to the SPI.
Definition: ad9553.c:57
no_os_spi.h
Header file of SPI Interface.
AD9553_N_DIV_MEDIUM
#define AD9553_N_DIV_MEDIUM
Definition: ad9553.h:59
ad9553_remove
int32_t ad9553_remove(struct ad9553_dev *dev)
Free the resources allocated by ad9553_setup().
Definition: ad9553.c:233
no_os_delay.h
Header file of Delay functions.
device
Definition: ad9361_util.h:75
AD9553_REFA_DIV_HIGH
#define AD9553_REFA_DIV_HIGH
Definition: ad9553.h:61
AD9553_N_DIV_LOW
#define AD9553_N_DIV_LOW
Definition: ad9553.h:60
AD9553_OUT1_DRIVER_CTRL
#define AD9553_OUT1_DRIVER_CTRL
Definition: ad9553.h:65
ad9553_init_param
Definition: ad9553.h:73
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: delay.c:130
no_os_error.h
Error codes definition.
ad9553_reg_write
int32_t ad9553_reg_write(struct ad9553_dev *dev, uint16_t reg_addr, uint8_t reg_data)
Write to the ad9553 that is conected to the SPI.
Definition: ad9553.c:88
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:132
ad9553_setup
int32_t ad9553_setup(struct ad9553_dev **device, const struct ad9553_init_param *init_param)
Setup the working parameters of the ad9553 chip.
Definition: ad9553.c:111
AD9553_REFA_DIFF
#define AD9553_REFA_DIFF
Definition: ad9553.h:64
AD9553_SPI_CONFIG
#define AD9553_SPI_CONFIG
Definition: ad9553.h:51
AD9553_PLL_CTRL
#define AD9553_PLL_CTRL
Definition: ad9553.h:53
ad9553_reg_write
int32_t ad9553_reg_write(struct ad9553_dev *dev, uint16_t reg_addr, uint8_t reg_data)
Write to the ad9553 that is conected to the SPI.
Definition: ad9553.c:88
AD9553_P0_DIV
#define AD9553_P0_DIV
Definition: ad9553.h:57
AD9553_P2_DIV_LOW
#define AD9553_P2_DIV_LOW
Definition: ad9553.h:56
ad9553_setup
int32_t ad9553_setup(struct ad9553_dev **device, const struct ad9553_init_param *init_param)
Setup the working parameters of the ad9553 chip.
Definition: ad9553.c:111
ad9553_init_param::spi_init
struct no_os_spi_init_param spi_init
Definition: ad9553.h:75
ad9553_dev
Definition: ad9553.h:78
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:96
AD9553_OUT2_DRIVER_CTRL
#define AD9553_OUT2_DRIVER_CTRL
Definition: ad9553.h:66
no_os_spi_remove
int32_t no_os_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: no_os_spi.c:70
AD9553_IO_UPDATE
#define AD9553_IO_UPDATE
Definition: ad9553.h:67
no_os_spi_init
int32_t no_os_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: no_os_spi.c:51
AD9553_N_DIV_HIGH
#define AD9553_N_DIV_HIGH
Definition: ad9553.h:58
AD9553_P1_DIV_LOW_P2_DIV_HIGH
#define AD9553_P1_DIV_LOW_P2_DIV_HIGH
Definition: ad9553.h:55
AD9553_PLL_CHARGE_PUMP_PFD_CTRL
#define AD9553_PLL_CHARGE_PUMP_PFD_CTRL
Definition: ad9553.h:52
ad9553.h
Header file of AD9553 Driver.
ad9553_remove
int32_t ad9553_remove(struct ad9553_dev *dev)
Free the resources allocated by ad9553_setup().
Definition: ad9553.c:233
ad9553_reg_read
int32_t ad9553_reg_read(struct ad9553_dev *dev, uint16_t reg_addr, uint8_t *reg_data)
Reads from the ad9553 that is contected to the SPI.
Definition: ad9553.c:57
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:112