no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ad9656.h
Go to the documentation of this file.
1/***************************************************************************/
33#ifndef AD9656_H_
34#define AD9656_H_
35
36#include "no_os_spi.h"
37
38#define AD9656_SPI_CONFIG 0x000
39#define AD9656_REG_CHIP_ID 0x001
40#define AD9656_REG_DEVICE_INDEX 0x005
41#define AD9656_REG_ADC_TEST_MODE 0x00D
42#define AD9656_REG_OUTPUT_MODE 0x014
43#define AD9656_REG_USER_TEST_PATTERN_1_LSB 0x19
44#define AD9656_REG_USER_TEST_PATTERN_1_MSB 0x1A
45#define AD9656_REG_USER_TEST_PATTERN_2_LSB 0x1B
46#define AD9656_REG_USER_TEST_PATTERN_2_MSB 0x1C
47#define AD9656_REG_LINK_CONTROL 0x05F
48#define AD9656_REG_LINK_MODE 0x61
49#define AD9656_REG_JESD204B_LANE_RATE_CTRL 0x021
50#define AD9656_REG_JESD204B_PLL_LOCK_STATUS 0x00A
51#define AD9656_REG_JESD204B_QUICK_CONFIG 0x05E
52#define AD9656_REG_JESD204B_SCR_L 0x06E
53#define AD9656_REG_JESD204B_MF_CTRL 0x070
54#define AD9656_REG_JESD204B_M_CTRL 0x071
55#define AD9656_REG_JESD204B_CSN_CONFIG 0x072
56#define AD9656_REG_JESD204B_SUBCLASS_CONFIG 0x073
57#define AD9656_REG_JESD204B_LANE_SERD_OUT1_OUT0_ASSIGN 0x082
58#define AD9656_REG_JESD204B_LANE_SERD_OUT3_OUT2_ASSIGN 0x083
59
60#define AD9656_CHIP_ID 0x0C0
61#define AD9656_TEST_OFF 0x000
62#define AD9656_TEST_PN9 0x006
63#define AD9656_TEST_PN23 0x005
64#define AD9656_LINK_OFF 0x000
65#define AD9656_LINK_PN9 0x004
66#define AD9656_LINK_PN23 0x003
67#define AD9656_TEST_USER_INPUT 0x048
68#define AD9656_FORMAT_2S_COMPLEMENT 0x001
69#define AD9656_FORMAT_OFFSET_BINARY 0x000
70
71struct ad9656_dev {
72 /* SPI */
74};
75
77 /* SPI */
79 /* Device Settings */
81};
82
84 /* User input test pattern 1 */
86 /* User input test pattern 2 */
88};
89
90int32_t ad9656_reg_read(struct ad9656_dev *dev,
91 uint16_t reg_addr,
92 uint8_t *reg_data);
93
94int32_t ad9656_reg_write(struct ad9656_dev *dev,
95 uint16_t reg_addr,
96 uint8_t reg_data);
97
98int32_t ad9656_setup(struct ad9656_dev **device,
99 const struct ad9656_init_param *init_param);
100
101int32_t ad9656_remove(struct ad9656_dev *dev);
102
103int32_t ad9656_JESD204_test(struct ad9656_dev *dev,
104 uint32_t test_mode, uint32_t link_mode);
105
106int32_t ad9656_user_input_test(struct ad9656_dev *dev, uint32_t test_mode,
107 struct ad9656_user_input_test_pattern user_input_test_pattern);
108
109#endif
struct ad7616_init_param init_param
Definition ad7616_sdz.c:107
int32_t ad9656_reg_read(struct ad9656_dev *dev, uint16_t reg_addr, uint8_t *reg_data)
Reads from the ad9656 that is contected to the SPI.
Definition ad9656.c:49
int32_t ad9656_reg_write(struct ad9656_dev *dev, uint16_t reg_addr, uint8_t reg_data)
Write to the ad9656 that is conected to the SPI.
Definition ad9656.c:82
int32_t ad9656_remove(struct ad9656_dev *dev)
Free the resources allocated by ad9656_setup().
Definition ad9656.c:292
int32_t ad9656_setup(struct ad9656_dev **device, const struct ad9656_init_param *init_param)
Setup the working parameters of the ad9656 chip.
Definition ad9656.c:180
int32_t ad9656_JESD204_test(struct ad9656_dev *dev, uint32_t test_mode, uint32_t link_mode)
Launch the JESD204 test functionality for the receive path for the ad9656 chip.
Definition ad9656.c:111
int32_t ad9656_user_input_test(struct ad9656_dev *dev, uint32_t test_mode, struct ad9656_user_input_test_pattern user_input_test_pattern)
Launch the user input test functionality for the receive path for the ad9656 chip....
Definition ad9656.c:144
Header file of SPI Interface.
Definition ad9656.h:71
struct no_os_spi_desc * spi_desc
Definition ad9656.h:73
Definition ad9656.h:76
struct no_os_spi_init_param spi_init
Definition ad9656.h:78
uint32_t lane_rate_kbps
Definition ad9656.h:80
Definition ad9656.h:83
uint16_t user_test_pattern1
Definition ad9656.h:85
uint16_t user_test_pattern2
Definition ad9656.h:87
Definition ad9361_util.h:63
Structure holding SPI descriptor.
Definition no_os_spi.h:180
Structure holding the parameters for SPI initialization.
Definition no_os_spi.h:128