no-OS
ad9553.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef AD9553_H_
34 #define AD9553_H_
35 
36 /******************************************************************************/
37 /***************************** Include Files **********************************/
38 /******************************************************************************/
39 #include "no_os_spi.h"
40 
41 /******************************************************************************/
42 /********************** Macros and Constants Definitions **********************/
43 /******************************************************************************/
44 
45 #define AD9553_SPI_CONFIG 0x000
46 #define AD9553_PLL_CHARGE_PUMP_PFD_CTRL 0x00B
47 #define AD9553_PLL_CTRL 0x00D
48 #define AD9553_P1_DIV_HIGH 0x015
49 #define AD9553_P1_DIV_LOW_P2_DIV_HIGH 0x016
50 #define AD9553_P2_DIV_LOW 0x017
51 #define AD9553_P0_DIV 0x018
52 #define AD9553_N_DIV_HIGH 0x012
53 #define AD9553_N_DIV_MEDIUM 0x013
54 #define AD9553_N_DIV_LOW 0x014
55 #define AD9553_REFA_DIV_HIGH 0x01F
56 #define AD9553_REFA_DIV_LOW 0x020
57 #define AD9553_K_VALUE 0x021
58 #define AD9553_REFA_DIFF 0x029
59 #define AD9553_OUT1_DRIVER_CTRL 0x032
60 #define AD9553_OUT2_DRIVER_CTRL 0x034
61 #define AD9553_IO_UPDATE 0x005
62 
63 /******************************************************************************/
64 /*************************** Types Declarations *******************************/
65 /******************************************************************************/
66 
68  /* SPI */
70 };
71 
72 struct ad9553_dev {
73  /* SPI */
75 };
76 
77 /******************************************************************************/
78 /************************ Functions Declarations ******************************/
79 /******************************************************************************/
80 
81 int32_t ad9553_reg_read(struct ad9553_dev *dev, uint16_t reg_addr,
82  uint8_t *reg_data);
83 
84 int32_t ad9553_reg_write(struct ad9553_dev *dev, uint16_t reg_addr,
85  uint8_t reg_data);
86 
87 int32_t ad9553_setup(struct ad9553_dev **device,
88  const struct ad9553_init_param *init_param);
89 
90 int32_t ad9553_remove(struct ad9553_dev *dev);
91 
92 #endif
ad9545_i2c_reg_read
int32_t ad9545_i2c_reg_read(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t *reg_data)
Definition: ad9545_i2c.c:48
BYTE_ADDR_H
#define BYTE_ADDR_H
Definition: ad405x.h:129
no_os_alloc.h
AD9553_K_VALUE
#define AD9553_K_VALUE
Definition: ad9553.h:57
AD9553_P1_DIV_HIGH
#define AD9553_P1_DIV_HIGH
Definition: ad9553.h:48
ad9545_spi_reg_read
int32_t ad9545_spi_reg_read(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t *reg_data)
Definition: ad9545_spi.c:50
no_os_i2c_write
int32_t no_os_i2c_write(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C Write data to slave device.
Definition: no_os_i2c.c:159
AD9553_REFA_DIV_LOW
#define AD9553_REFA_DIV_LOW
Definition: ad9553.h:56
ad9553_dev::spi_desc
struct no_os_spi_desc * spi_desc
Definition: ad9553.h:74
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:159
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:52
no_os_spi.h
Header file of SPI Interface.
ad9545_dev::i2c_desc
struct no_os_i2c_desc * i2c_desc
Definition: ad9545.h:731
ad9545_aux_tdc_clk::dev
struct ad9545_dev * dev
Definition: ad9545.h:687
AD9553_N_DIV_MEDIUM
#define AD9553_N_DIV_MEDIUM
Definition: ad9553.h:53
ad9553_remove
int32_t ad9553_remove(struct ad9553_dev *dev)
Free the resources allocated by ad9553_setup().
Definition: ad9553.c:228
no_os_delay.h
Header file of Delay functions.
device
Definition: ad9361_util.h:69
AD9553_REFA_DIV_HIGH
#define AD9553_REFA_DIV_HIGH
Definition: ad9553.h:55
AD9553_N_DIV_LOW
#define AD9553_N_DIV_LOW
Definition: ad9553.h:54
NO_OS_ARRAY_SIZE
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:49
AD9553_OUT1_DRIVER_CTRL
#define AD9553_OUT1_DRIVER_CTRL
Definition: ad9553.h:59
ad9553_init_param
Definition: ad9553.h:67
AD9535_SPI_READ
#define AD9535_SPI_READ
Definition: ad9545_spi.c:41
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
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:83
ad9545_spi_reg_write
int32_t ad9545_spi_reg_write(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t reg_data)
Definition: ad9545_spi.c:77
ad9545_i2c_reg_read_multiple
int32_t ad9545_i2c_reg_read_multiple(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t *reg_data, uint16_t count)
Definition: ad9545_i2c.c:99
ad9545.h
Header file for ad9545 Driver.
ad9545_dev::spi_desc
struct no_os_spi_desc * spi_desc
Definition: ad9545.h:729
ad9545_spi_reg_read_multiple
int32_t ad9545_spi_reg_read_multiple(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t *reg_data, uint16_t count)
Definition: ad9545_spi.c:98
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
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:106
AD9553_REFA_DIFF
#define AD9553_REFA_DIFF
Definition: ad9553.h:58
AD9553_SPI_CONFIG
#define AD9553_SPI_CONFIG
Definition: ad9553.h:45
AD9553_PLL_CTRL
#define AD9553_PLL_CTRL
Definition: ad9553.h:47
no_os_i2c_read
int32_t no_os_i2c_read(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C Read data from slave device.
Definition: no_os_i2c.c:190
ad9545_spi_reg_write_multiple
int32_t ad9545_spi_reg_write_multiple(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t *reg_data, uint16_t count)
Definition: ad9545_spi.c:131
no_os_malloc
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
no_os_i2c.h
Header file of I2C Interface.
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:83
ad9545_i2c_reg_write
int32_t ad9545_i2c_reg_write(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t reg_data)
Definition: ad9545_i2c.c:77
AD9553_P0_DIV
#define AD9553_P0_DIV
Definition: ad9553.h:51
no_os_field_get
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
AD9553_P2_DIV_LOW
#define AD9553_P2_DIV_LOW
Definition: ad9553.h:50
ad9545_i2c_reg_write_multiple
int32_t ad9545_i2c_reg_write_multiple(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t *reg_data, uint16_t count)
Definition: ad9545_i2c.c:136
no_os_free
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
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:106
ad9553_init_param::spi_init
struct no_os_spi_init_param spi_init
Definition: ad9553.h:69
ad9545_dev
Definition: ad9545.h:727
ad9553_dev
Definition: ad9553.h:72
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
AD9553_OUT2_DRIVER_CTRL
#define AD9553_OUT2_DRIVER_CTRL
Definition: ad9553.h:60
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:116
BYTE_ADDR_L
#define BYTE_ADDR_L
Definition: ad405x.h:130
AD9553_IO_UPDATE
#define AD9553_IO_UPDATE
Definition: ad9553.h:61
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:52
AD9553_N_DIV_HIGH
#define AD9553_N_DIV_HIGH
Definition: ad9553.h:52
AD9553_P1_DIV_LOW_P2_DIV_HIGH
#define AD9553_P1_DIV_LOW_P2_DIV_HIGH
Definition: ad9553.h:49
AD9553_PLL_CHARGE_PUMP_PFD_CTRL
#define AD9553_PLL_CHARGE_PUMP_PFD_CTRL
Definition: ad9553.h:46
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:228
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:52
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140