no-OS
adaq8092.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef __ADAQ8092_H__
34 #define __ADAQ8092_H__
35 
36 /******************************************************************************/
37 /***************************** Include Files **********************************/
38 /******************************************************************************/
39 #include <stdint.h>
40 #include <string.h>
41 #include "no_os_util.h"
42 #include "no_os_spi.h"
43 #include "no_os_gpio.h"
44 
45 /******************************************************************************/
46 /********************** Macros and Constants Definitions **********************/
47 /******************************************************************************/
48 /* SPI commands */
49 #define ADAQ8092_SPI_READ NO_OS_BIT(7)
50 #define ADAQ8092_ADDR(x) ((x) & 0xFF)
51 
52 /* ADAQ8092 Register Map */
53 #define ADAQ8092_REG_RESET 0x00
54 #define ADAQ8092_REG_POWERDOWN 0x01
55 #define ADAQ8092_REG_TIMING 0x02
56 #define ADAQ8092_REG_OUTPUT_MODE 0x03
57 #define ADAQ8092_REG_DATA_FORMAT 0x04
58 
59 /* ADAQ8092_REG_RESET Bit Definition */
60 #define ADAQ8092_RESET NO_OS_BIT(7)
61 
62 /* ADAQ8092_REG_POWERDOWN Bit Definition */
63 #define ADAQ8092_POWERDOWN_MODE NO_OS_GENMASK(1, 0)
64 
65 /* ADAQ8092_REG_TIMING Bit Definition */
66 #define ADAQ8092_CLK_INVERT NO_OS_BIT(3)
67 #define ADAQ8092_CLK_PHASE NO_OS_GENMASK(2, 1)
68 #define ADAQ8092_CLK_DUTYCYCLE NO_OS_BIT(0)
69 
70 /* ADAQ8092_REG_OUTPUT_MODE Bit Definition */
71 #define ADAQ8092_ILVDS NO_OS_GENMASK(6, 4)
72 #define ADAQ8092_TERMON NO_OS_BIT(3)
73 #define ADAQ8092_OUTOFF NO_OS_BIT(2)
74 #define ADAQ8092_OUTMODE NO_OS_GENMASK(1, 0)
75 
76 /* ADAQ8092_REG_DATA_FORMAT Bit Definition */
77 #define ADAQ8092_OUTTEST NO_OS_GENMASK(5, 3)
78 #define ADAQ8092_ABP NO_OS_BIT(2)
79 #define ADAQ8092_RAND NO_OS_BIT(1)
80 #define ADAQ8092_TWOSCOMP NO_OS_BIT(0)
81 
82 /******************************************************************************/
83 /*************************** Types Declarations *******************************/
84 /******************************************************************************/
85 /* ADAQ8092 Power Down Modes */
91 };
92 
93 /* ADAQ8092 Output Clock Invert */
97 };
98 
99 /* ADAQ8092 Output Clock Phase Delay Bits */
105 };
106 
107 /*ADAQ8092 Clock Duty Cycle Stabilizer */
111 };
112 
113 /* ADAQ8092 LVDS Output Current */
122 };
123 
124 /* ADAQ8092 LVDS Internal Termination */
128 };
129 
130 /* ADAQ8092 Digital Output */
134 };
135 
136 /* ADAQ8092 Digital Output Mode */
141 };
142 
143 /* ADAQ8092 Digital Test Pattern */
150 };
151 
152 /* ADAQ8092 Alternate Bit Polarity Mode */
156 };
157 
158 /* ADAQ8092 Data Output Randomizer*/
162 };
163 
164 /* ADAQ8092 Twos Complement Mode */
168 };
169 
193 };
194 
199 struct adaq8092_dev {
218 };
219 
220 /******************************************************************************/
221 /************************ Functions Declarations ******************************/
222 /******************************************************************************/
223 
224 /* Read device register. */
225 int adaq8092_read(struct adaq8092_dev *dev, uint8_t reg_addr,
226  uint8_t *reg_data);
227 
228 /* Write device register. */
229 int adaq8092_write(struct adaq8092_dev *dev, uint8_t reg_addr,
230  uint8_t reg_data);
231 
232 /* Update specific register bits. */
233 int adaq8092_update_bits(struct adaq8092_dev *dev, uint8_t reg_addr,
234  uint8_t mask, uint8_t reg_data);
235 
236 /* Initialize the device. */
237 int adaq8092_init(struct adaq8092_dev **device,
239 
240 /* Remove the device and release resources. */
241 int adaq8092_remove(struct adaq8092_dev *dev);
242 
243 /* Set the device powerodown mode. */
244 int adaq8092_set_pd_mode(struct adaq8092_dev *dev,
245  enum adaq8092_powerdown_modes mode);
246 
247 /* Get the device powerdown mode. */
249 
250 /* Set the clock polarity mode. */
252  enum adaq8092_clk_invert mode);
253 
254 /* Get the clock polarity mode. */
256 
257 /* Set the clock phase delay mode. */
259  enum adaq8092_clk_phase_delay mode);
260 
261 /* Get the clock phase delay mode. */
263  struct adaq8092_dev *dev);
264 
265 /* Set the clock duty cycle stabilizer mode. */
266 int adaq8092_set_clk_dc_mode(struct adaq8092_dev *dev,
267  enum adaq8092_clk_dutycycle mode);
268 
269 /* Get the clock duty cycle stabilizer mode. */
271 
272 /* Set the LVDS output current mode. */
274  enum adaq8092_lvds_out_current mode);
275 
276 /* Get the LVDS output current mode. */
278  struct adaq8092_dev *dev);
279 
280 /* Set the LVDS internal temination mode. */
282  enum adaq8092_internal_term mode);
283 
284 /* Get the LVDS internal temination device mode. */
286  struct adaq8092_dev *dev);
287 
288 /* Set digital outputs. */
289 int adaq8092_set_dout_en(struct adaq8092_dev *dev,
290  enum adaq8092_dout_enable mode);
291 
292 /* Get digital outputs. */
294 
295 /* Set the digital output mode. */
296 int adaq8092_set_dout_mode(struct adaq8092_dev *dev,
297  enum adaq8092_dout_modes mode);
298 
299 /* Get the digital output mode. */
301 
302 /* Set digital output test pattern mode. */
303 int adaq8092_set_test_mode(struct adaq8092_dev *dev,
304  enum adaq8092_out_test_modes mode);
305 
306 /* Get digital output test pattern mode. */
308 
309 /* Set the alternate bit polarity mode. */
310 int adaq8092_set_alt_pol_en(struct adaq8092_dev *dev,
311  enum adaq8092_alt_bit_pol mode);
312 
313 /* Get the alternate bit polarity mode. */
315 
316 /* Set the data output randomizer mode. */
318  enum adaq8092_data_rand mode);
319 
320 /* Get the data output randomizer mode. */
322 
323 /* Set the Tows Complement mode. */
324 int adaq8092_set_twos_comp(struct adaq8092_dev *dev,
325  enum adaq8092_twoscomp mode);
326 
327 /* Get the Tows Complement mode. */
329 
330 #endif /* __ADAQ8092_H__ */
ADAQ8092_ALT_BIT_POL_OFF
@ ADAQ8092_ALT_BIT_POL_OFF
Definition: adaq8092.h:154
adaq8092_set_test_mode
int adaq8092_set_test_mode(struct adaq8092_dev *dev, enum adaq8092_out_test_modes mode)
Set digital output test pattern mode.
Definition: adaq8092.c:562
adaq8092_get_test_mode
enum adaq8092_out_test_modes adaq8092_get_test_mode(struct adaq8092_dev *dev)
Get digital output test pattern mode.
Definition: adaq8092.c:583
ADAQ8092_CLK_PHASE
#define ADAQ8092_CLK_PHASE
Definition: adaq8092.h:67
no_os_alloc.h
adaq8092_update_bits
int adaq8092_update_bits(struct adaq8092_dev *dev, uint8_t reg_addr, uint8_t mask, uint8_t reg_data)
Update specific register bits.
Definition: adaq8092.c:96
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
adaq8092_read
int adaq8092_read(struct adaq8092_dev *dev, uint8_t reg_addr, uint8_t *reg_data)
Read device register.
Definition: adaq8092.c:55
ADAQ8092_DOUT_OFF
@ ADAQ8092_DOUT_OFF
Definition: adaq8092.h:133
adaq8092_write
int adaq8092_write(struct adaq8092_dev *dev, uint8_t reg_addr, uint8_t reg_data)
Write device register.
Definition: adaq8092.c:78
ADAQ8092_CLK_INVERT
#define ADAQ8092_CLK_INVERT
Definition: adaq8092.h:66
adaq8092_set_lvds_cur_mode
int adaq8092_set_lvds_cur_mode(struct adaq8092_dev *dev, enum adaq8092_lvds_out_current mode)
Set the LVDS output current mode.
Definition: adaq8092.c:432
adaq8092_get_dout_en
enum adaq8092_dout_enable adaq8092_get_dout_en(struct adaq8092_dev *dev)
Get digital outputs.
Definition: adaq8092.c:519
adaq8092_dev::data_rand_en
enum adaq8092_data_rand data_rand_en
Definition: adaq8092.h:216
adaq8092_dev::alt_bit_pol_en
enum adaq8092_alt_bit_pol alt_bit_pol_en
Definition: adaq8092.h:215
ADAQ8092_CLKOUT_DELAY_180DEG
@ ADAQ8092_CLKOUT_DELAY_180DEG
Definition: adaq8092.h:104
adaq8092_set_clk_pol_mode
int adaq8092_set_clk_pol_mode(struct adaq8092_dev *dev, enum adaq8092_clk_invert mode)
Set the clock polarity mode.
Definition: adaq8092.c:335
adaq8092_clk_phase_delay
adaq8092_clk_phase_delay
Definition: adaq8092.h:100
adaq8092_set_pd_mode
int adaq8092_set_pd_mode(struct adaq8092_dev *dev, enum adaq8092_powerdown_modes mode)
Set the device powerodown mode.
Definition: adaq8092.c:303
adaq8092_set_dout_mode
int adaq8092_set_dout_mode(struct adaq8092_dev *dev, enum adaq8092_dout_modes mode)
Set the digital output mode.
Definition: adaq8092.c:530
adaq8092_write
int adaq8092_write(struct adaq8092_dev *dev, uint8_t reg_addr, uint8_t reg_data)
Write device register.
Definition: adaq8092.c:78
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
ADAQ8092_DOUBLE_RATE_CMOS
@ ADAQ8092_DOUBLE_RATE_CMOS
Definition: adaq8092.h:140
adaq8092_dev::gpio_par_ser
struct no_os_gpio_desc * gpio_par_ser
Definition: adaq8092.h:205
adaq8092_dev::clk_pol_mode
enum adaq8092_clk_invert clk_pol_mode
Definition: adaq8092.h:207
adaq8092_set_data_rand_en
int adaq8092_set_data_rand_en(struct adaq8092_dev *dev, enum adaq8092_data_rand mode)
Set the data output randomizer mode.
Definition: adaq8092.c:626
no_os_spi.h
Header file of SPI Interface.
ADAQ8092_OUTMODE
#define ADAQ8092_OUTMODE
Definition: adaq8092.h:74
adaq8092_get_twos_comp
enum adaq8092_twoscomp adaq8092_get_twos_comp(struct adaq8092_dev *dev)
Get the Tows Complement mode.
Definition: adaq8092.c:679
ADAQ8092_DATA_RAND_OFF
@ ADAQ8092_DATA_RAND_OFF
Definition: adaq8092.h:160
adaq8092_dout_modes
adaq8092_dout_modes
Definition: adaq8092.h:137
ADAQ8092_REG_TIMING
#define ADAQ8092_REG_TIMING
Definition: adaq8092.h:55
adaq8092_dout_enable
adaq8092_dout_enable
Definition: adaq8092.h:131
ADAQ8092_CLK_POL_INVERTED
@ ADAQ8092_CLK_POL_INVERTED
Definition: adaq8092.h:96
adaq8092_dev::gpio_en_1p8
struct no_os_gpio_desc * gpio_en_1p8
Definition: adaq8092.h:204
adaq8092_set_dout_en
int adaq8092_set_dout_en(struct adaq8092_dev *dev, enum adaq8092_dout_enable mode)
Set digital outputs.
Definition: adaq8092.c:498
adaq8092_get_test_mode
enum adaq8092_out_test_modes adaq8092_get_test_mode(struct adaq8092_dev *dev)
Get digital output test pattern mode.
Definition: adaq8092.c:583
adaq8092_init_param::gpio_adc_pd1_param
struct no_os_gpio_init_param * gpio_adc_pd1_param
Definition: adaq8092.h:177
ADAQ8092_2M5A
@ ADAQ8092_2M5A
Definition: adaq8092.h:119
adaq8092_clk_dutycycle
adaq8092_clk_dutycycle
Definition: adaq8092.h:108
ADAQ8092_CLK_DC_STABILIZER_ON
@ ADAQ8092_CLK_DC_STABILIZER_ON
Definition: adaq8092.h:110
adaq8092_remove
int adaq8092_remove(struct adaq8092_dev *dev)
Remove the device and release resources.
Definition: adaq8092.c:268
no_os_delay.h
Header file of Delay functions.
adaq8092_remove
int adaq8092_remove(struct adaq8092_dev *dev)
Remove the device and release resources.
Definition: adaq8092.c:268
adaq8092_set_clk_phase_mode
int adaq8092_set_clk_phase_mode(struct adaq8092_dev *dev, enum adaq8092_clk_phase_delay mode)
Set the clock phase delay mode.
Definition: adaq8092.c:367
ADAQ8092_TERM_ON
@ ADAQ8092_TERM_ON
Definition: adaq8092.h:127
device
Definition: ad9361_util.h:69
ADAQ8092_CH1_CH2_NAP
@ ADAQ8092_CH1_CH2_NAP
Definition: adaq8092.h:89
NO_OS_GPIO_HIGH
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:117
adaq8092_set_test_mode
int adaq8092_set_test_mode(struct adaq8092_dev *dev, enum adaq8092_out_test_modes mode)
Set digital output test pattern mode.
Definition: adaq8092.c:562
adaq8092_get_clk_phase_mode
enum adaq8092_clk_phase_delay adaq8092_get_clk_phase_mode(struct adaq8092_dev *dev)
Get the clock phase delay mode.
Definition: adaq8092.c:388
no_os_calloc
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
adaq8092_set_lvds_cur_mode
int adaq8092_set_lvds_cur_mode(struct adaq8092_dev *dev, enum adaq8092_lvds_out_current mode)
Set the LVDS output current mode.
Definition: adaq8092.c:432
ADAQ8092_REG_POWERDOWN
#define ADAQ8092_REG_POWERDOWN
Definition: adaq8092.h:54
ADAQ8092_SLEEP
@ ADAQ8092_SLEEP
Definition: adaq8092.h:90
adaq8092_get_clk_phase_mode
enum adaq8092_clk_phase_delay adaq8092_get_clk_phase_mode(struct adaq8092_dev *dev)
Get the clock phase delay mode.
Definition: adaq8092.c:388
ADAQ8092_CH1_NORMAL_CH2_NAP
@ ADAQ8092_CH1_NORMAL_CH2_NAP
Definition: adaq8092.h:88
adaq8092_init_param::test_mode
enum adaq8092_out_test_modes test_mode
Definition: adaq8092.h:189
NO_OS_GPIO_LOW
@ NO_OS_GPIO_LOW
Definition: no_os_gpio.h:115
ADAQ8092_CLKOUT_DELAY_45DEG
@ ADAQ8092_CLKOUT_DELAY_45DEG
Definition: adaq8092.h:102
ADAQ8092_FULL_RATE_CMOS
@ ADAQ8092_FULL_RATE_CMOS
Definition: adaq8092.h:138
adaq8092_set_data_rand_en
int adaq8092_set_data_rand_en(struct adaq8092_dev *dev, enum adaq8092_data_rand mode)
Set the data output randomizer mode.
Definition: adaq8092.c:626
adaq8092_init_param::alt_bit_pol_en
enum adaq8092_alt_bit_pol alt_bit_pol_en
Definition: adaq8092.h:190
adaq8092_dev::spi_desc
struct no_os_spi_desc * spi_desc
Definition: adaq8092.h:201
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
no_os_field_prep
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
ADAQ8092_OFFSET_BINARY
@ ADAQ8092_OFFSET_BINARY
Definition: adaq8092.h:166
ADAQ8092_1M75
@ ADAQ8092_1M75
Definition: adaq8092.h:121
adaq8092_init_param::dout_en
enum adaq8092_dout_enable dout_en
Definition: adaq8092.h:187
ADAQ8092_2M1A
@ ADAQ8092_2M1A
Definition: adaq8092.h:120
adaq8092_init_param::gpio_en_1p8_param
struct no_os_gpio_init_param * gpio_en_1p8_param
Definition: adaq8092.h:179
ADAQ8092_POWERDOWN_MODE
#define ADAQ8092_POWERDOWN_MODE
Definition: adaq8092.h:63
adaq8092_init_param::gpio_par_ser_param
struct no_os_gpio_init_param * gpio_par_ser_param
Definition: adaq8092.h:180
ADAQ8092_CLKOUT_DELAY_90DEG
@ ADAQ8092_CLKOUT_DELAY_90DEG
Definition: adaq8092.h:103
adaq8092_get_pd_mode
enum adaq8092_powerdown_modes adaq8092_get_pd_mode(struct adaq8092_dev *dev)
Get the device powerdown mode.
Definition: adaq8092.c:324
adaq8092_twoscomp
adaq8092_twoscomp
Definition: adaq8092.h:165
ADAQ8092_DOUT_ON
@ ADAQ8092_DOUT_ON
Definition: adaq8092.h:132
ADAQ8092_TWOSCOMP
#define ADAQ8092_TWOSCOMP
Definition: adaq8092.h:80
ADAQ8092_TEST_ONES
@ ADAQ8092_TEST_ONES
Definition: adaq8092.h:146
ADAQ8092_TERM_OFF
@ ADAQ8092_TERM_OFF
Definition: adaq8092.h:126
adaq8092_set_twos_comp
int adaq8092_set_twos_comp(struct adaq8092_dev *dev, enum adaq8092_twoscomp mode)
Set the Tows Complement mode.
Definition: adaq8092.c:658
ADAQ8092_DOUBLE_RATE_LVDS
@ ADAQ8092_DOUBLE_RATE_LVDS
Definition: adaq8092.h:139
ADAQ8092_ALT_BIT_POL_ON
@ ADAQ8092_ALT_BIT_POL_ON
Definition: adaq8092.h:155
ADAQ8092_CLK_DUTYCYCLE
#define ADAQ8092_CLK_DUTYCYCLE
Definition: adaq8092.h:68
adaq8092_dev::twos_comp
enum adaq8092_twoscomp twos_comp
Definition: adaq8092.h:217
adaq8092_dev::lvds_term_mode
enum adaq8092_internal_term lvds_term_mode
Definition: adaq8092.h:211
adaq8092_set_pd_mode
int adaq8092_set_pd_mode(struct adaq8092_dev *dev, enum adaq8092_powerdown_modes mode)
Set the device powerodown mode.
Definition: adaq8092.c:303
ADAQ8092_CLK_DC_STABILIZER_OFF
@ ADAQ8092_CLK_DC_STABILIZER_OFF
Definition: adaq8092.h:109
adaq8092_get_clk_pol_mode
enum adaq8092_clk_invert adaq8092_get_clk_pol_mode(struct adaq8092_dev *dev)
Get the clock polarity mode.
Definition: adaq8092.c:356
ADAQ8092_NORMAL_OP
@ ADAQ8092_NORMAL_OP
Definition: adaq8092.h:87
adaq8092_dev::dout_mode
enum adaq8092_dout_modes dout_mode
Definition: adaq8092.h:213
adaq8092_init_param::lvds_cur_mode
enum adaq8092_lvds_out_current lvds_cur_mode
Definition: adaq8092.h:185
adaq8092_dev::lvds_cur_mode
enum adaq8092_lvds_out_current lvds_cur_mode
Definition: adaq8092.h:210
no_os_gpio_remove
int32_t no_os_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: no_os_gpio.c:104
adaq8092_get_clk_dc_mode
enum adaq8092_clk_dutycycle adaq8092_get_clk_dc_mode(struct adaq8092_dev *dev)
Get the clock duty cycle stabilizer mode.
Definition: adaq8092.c:421
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
ADAQ8092_TERMON
#define ADAQ8092_TERMON
Definition: adaq8092.h:72
adaq8092_set_clk_dc_mode
int adaq8092_set_clk_dc_mode(struct adaq8092_dev *dev, enum adaq8092_clk_dutycycle mode)
Set the clock duty cycle stabilizer mode.
Definition: adaq8092.c:400
adaq8092_dev
ADAQ8092 Device structure.
Definition: adaq8092.h:199
ADAQ8092_TWOS_COMPLEMENT
@ ADAQ8092_TWOS_COMPLEMENT
Definition: adaq8092.h:167
ADAQ8092_TEST_ALTERNATING
@ ADAQ8092_TEST_ALTERNATING
Definition: adaq8092.h:149
adaq8092_init
int adaq8092_init(struct adaq8092_dev **device, struct adaq8092_init_param init_param)
Initialize the device.
Definition: adaq8092.c:119
ADAQ8092_DATA_RAND_ON
@ ADAQ8092_DATA_RAND_ON
Definition: adaq8092.h:161
adaq8092_init_param
ADAQ8092 Device initialization parameters.
Definition: adaq8092.h:174
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
adaq8092_out_test_modes
adaq8092_out_test_modes
Definition: adaq8092.h:144
adaq8092_get_dout_mode
enum adaq8092_dout_modes adaq8092_get_dout_mode(struct adaq8092_dev *dev)
Get the digital output mode.
Definition: adaq8092.c:551
adaq8092.h
Header file of ADAQ8092 Driver.
ADAQ8092_REG_OUTPUT_MODE
#define ADAQ8092_REG_OUTPUT_MODE
Definition: adaq8092.h:56
adaq8092_set_twos_comp
int adaq8092_set_twos_comp(struct adaq8092_dev *dev, enum adaq8092_twoscomp mode)
Set the Tows Complement mode.
Definition: adaq8092.c:658
adaq8092_init_param::lvds_term_mode
enum adaq8092_internal_term lvds_term_mode
Definition: adaq8092.h:186
ADAQ8092_ILVDS
#define ADAQ8092_ILVDS
Definition: adaq8092.h:71
ADAQ8092_REG_RESET
#define ADAQ8092_REG_RESET
Definition: adaq8092.h:53
ADAQ8092_OUTOFF
#define ADAQ8092_OUTOFF
Definition: adaq8092.h:73
adaq8092_dev::clk_dc_mode
enum adaq8092_clk_dutycycle clk_dc_mode
Definition: adaq8092.h:209
adaq8092_lvds_out_current
adaq8092_lvds_out_current
Definition: adaq8092.h:114
ADAQ8092_ABP
#define ADAQ8092_ABP
Definition: adaq8092.h:78
no_os_gpio_get
int32_t no_os_gpio_get(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Obtain the GPIO decriptor.
Definition: no_os_gpio.c:49
adaq8092_set_clk_phase_mode
int adaq8092_set_clk_phase_mode(struct adaq8092_dev *dev, enum adaq8092_clk_phase_delay mode)
Set the clock phase delay mode.
Definition: adaq8092.c:367
adaq8092_get_pd_mode
enum adaq8092_powerdown_modes adaq8092_get_pd_mode(struct adaq8092_dev *dev)
Get the device powerdown mode.
Definition: adaq8092.c:324
ADAQ8092_3M5A
@ ADAQ8092_3M5A
Definition: adaq8092.h:115
adaq8092_set_clk_pol_mode
int adaq8092_set_clk_pol_mode(struct adaq8092_dev *dev, enum adaq8092_clk_invert mode)
Set the clock polarity mode.
Definition: adaq8092.c:335
adaq8092_dev::clk_phase_mode
enum adaq8092_clk_phase_delay clk_phase_mode
Definition: adaq8092.h:208
adaq8092_get_clk_dc_mode
enum adaq8092_clk_dutycycle adaq8092_get_clk_dc_mode(struct adaq8092_dev *dev)
Get the clock duty cycle stabilizer mode.
Definition: adaq8092.c:421
ADAQ8092_REG_DATA_FORMAT
#define ADAQ8092_REG_DATA_FORMAT
Definition: adaq8092.h:57
adaq8092_set_clk_dc_mode
int adaq8092_set_clk_dc_mode(struct adaq8092_dev *dev, enum adaq8092_clk_dutycycle mode)
Set the clock duty cycle stabilizer mode.
Definition: adaq8092.c:400
adaq8092_dev::pd_mode
enum adaq8092_powerdown_modes pd_mode
Definition: adaq8092.h:206
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
ADAQ8092_CLK_POL_NORMAL
@ ADAQ8092_CLK_POL_NORMAL
Definition: adaq8092.h:95
adaq8092_init_param::clk_phase_mode
enum adaq8092_clk_phase_delay clk_phase_mode
Definition: adaq8092.h:183
adaq8092_init_param::clk_pol_mode
enum adaq8092_clk_invert clk_pol_mode
Definition: adaq8092.h:182
adaq8092_get_twos_comp
enum adaq8092_twoscomp adaq8092_get_twos_comp(struct adaq8092_dev *dev)
Get the Tows Complement mode.
Definition: adaq8092.c:679
adaq8092_set_lvds_term_mode
int adaq8092_set_lvds_term_mode(struct adaq8092_dev *dev, enum adaq8092_internal_term mode)
Set the LVDS internal temination mode.
Definition: adaq8092.c:465
adaq8092_powerdown_modes
adaq8092_powerdown_modes
Definition: adaq8092.h:86
ADAQ8092_OUTTEST
#define ADAQ8092_OUTTEST
Definition: adaq8092.h:77
adaq8092_internal_term
adaq8092_internal_term
Definition: adaq8092.h:125
adaq8092_init_param::spi_init
struct no_os_spi_init_param * spi_init
Definition: adaq8092.h:176
ADAQ8092_TEST_CHECKERBOARD
@ ADAQ8092_TEST_CHECKERBOARD
Definition: adaq8092.h:148
adaq8092_dev::gpio_adc_pd1
struct no_os_gpio_desc * gpio_adc_pd1
Definition: adaq8092.h:202
adaq8092_get_clk_pol_mode
enum adaq8092_clk_invert adaq8092_get_clk_pol_mode(struct adaq8092_dev *dev)
Get the clock polarity mode.
Definition: adaq8092.c:356
no_os_gpio_set_value
int32_t no_os_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: no_os_gpio.c:197
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
ADAQ8092_NO_DELAY
@ ADAQ8092_NO_DELAY
Definition: adaq8092.h:101
adaq8092_get_data_rand_en
enum adaq8092_data_rand adaq8092_get_data_rand_en(struct adaq8092_dev *dev)
Get the data output randomizer mode.
Definition: adaq8092.c:647
adaq8092_get_dout_mode
enum adaq8092_dout_modes adaq8092_get_dout_mode(struct adaq8092_dev *dev)
Get the digital output mode.
Definition: adaq8092.c:551
adaq8092_dev::dout_en
enum adaq8092_dout_enable dout_en
Definition: adaq8092.h:212
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
adaq8092_alt_bit_pol
adaq8092_alt_bit_pol
Definition: adaq8092.h:153
adaq8092_get_lvds_cur_mode
enum adaq8092_lvds_out_current adaq8092_get_lvds_cur_mode(struct adaq8092_dev *dev)
Get the LVDS output current mode.
Definition: adaq8092.c:453
adaq8092_get_lvds_term_mode
enum adaq8092_internal_term adaq8092_get_lvds_term_mode(struct adaq8092_dev *dev)
Get the LVDS internal temination device mode.
Definition: adaq8092.c:486
adaq8092_get_dout_en
enum adaq8092_dout_enable adaq8092_get_dout_en(struct adaq8092_dev *dev)
Get digital outputs.
Definition: adaq8092.c:519
no_os_gpio.h
Header file of GPIO Interface.
adaq8092_clk_invert
adaq8092_clk_invert
Definition: adaq8092.h:94
adaq8092_init_param::clk_dc_mode
enum adaq8092_clk_dutycycle clk_dc_mode
Definition: adaq8092.h:184
adaq8092_set_lvds_term_mode
int adaq8092_set_lvds_term_mode(struct adaq8092_dev *dev, enum adaq8092_internal_term mode)
Set the LVDS internal temination mode.
Definition: adaq8092.c:465
adaq8092_dev::gpio_adc_pd2
struct no_os_gpio_desc * gpio_adc_pd2
Definition: adaq8092.h:203
adaq8092_init_param::data_rand_en
enum adaq8092_data_rand data_rand_en
Definition: adaq8092.h:191
adaq8092_get_data_rand_en
enum adaq8092_data_rand adaq8092_get_data_rand_en(struct adaq8092_dev *dev)
Get the data output randomizer mode.
Definition: adaq8092.c:647
adaq8092_set_alt_pol_en
int adaq8092_set_alt_pol_en(struct adaq8092_dev *dev, enum adaq8092_alt_bit_pol mode)
Set the alternate bit polarity mode.
Definition: adaq8092.c:594
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
adaq8092_init_param::twos_comp
enum adaq8092_twoscomp twos_comp
Definition: adaq8092.h:192
adaq8092_get_lvds_cur_mode
enum adaq8092_lvds_out_current adaq8092_get_lvds_cur_mode(struct adaq8092_dev *dev)
Get the LVDS output current mode.
Definition: adaq8092.c:453
adaq8092_get_alt_pol_en
enum adaq8092_alt_bit_pol adaq8092_get_alt_pol_en(struct adaq8092_dev *dev)
Get the alternate bit polarity mode.
Definition: adaq8092.c:615
adaq8092_init_param::gpio_adc_pd2_param
struct no_os_gpio_init_param * gpio_adc_pd2_param
Definition: adaq8092.h:178
no_os_util.h
Header file of utility functions.
adaq8092_init_param::pd_mode
enum adaq8092_powerdown_modes pd_mode
Definition: adaq8092.h:181
adaq8092_update_bits
int adaq8092_update_bits(struct adaq8092_dev *dev, uint8_t reg_addr, uint8_t mask, uint8_t reg_data)
Update specific register bits.
Definition: adaq8092.c:96
adaq8092_read
int adaq8092_read(struct adaq8092_dev *dev, uint8_t reg_addr, uint8_t *reg_data)
Read device register.
Definition: adaq8092.c:55
ADAQ8092_SPI_READ
#define ADAQ8092_SPI_READ
Definition: adaq8092.h:49
adaq8092_set_alt_pol_en
int adaq8092_set_alt_pol_en(struct adaq8092_dev *dev, enum adaq8092_alt_bit_pol mode)
Set the alternate bit polarity mode.
Definition: adaq8092.c:594
adaq8092_dev::test_mode
enum adaq8092_out_test_modes test_mode
Definition: adaq8092.h:214
adaq8092_data_rand
adaq8092_data_rand
Definition: adaq8092.h:159
ADAQ8092_TEST_OFF
@ ADAQ8092_TEST_OFF
Definition: adaq8092.h:145
ADAQ8092_3MA
@ ADAQ8092_3MA
Definition: adaq8092.h:118
ADAQ8092_4M5A
@ ADAQ8092_4M5A
Definition: adaq8092.h:117
adaq8092_get_alt_pol_en
enum adaq8092_alt_bit_pol adaq8092_get_alt_pol_en(struct adaq8092_dev *dev)
Get the alternate bit polarity mode.
Definition: adaq8092.c:615
ADAQ8092_4MA
@ ADAQ8092_4MA
Definition: adaq8092.h:116
no_os_gpio_direction_output
int32_t no_os_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO.
Definition: no_os_gpio.c:147
adaq8092_set_dout_en
int adaq8092_set_dout_en(struct adaq8092_dev *dev, enum adaq8092_dout_enable mode)
Set digital outputs.
Definition: adaq8092.c:498
ADAQ8092_TEST_ZEROS
@ ADAQ8092_TEST_ZEROS
Definition: adaq8092.h:147
ADAQ8092_RESET
#define ADAQ8092_RESET
Definition: adaq8092.h:60
adaq8092_set_dout_mode
int adaq8092_set_dout_mode(struct adaq8092_dev *dev, enum adaq8092_dout_modes mode)
Set the digital output mode.
Definition: adaq8092.c:530
adaq8092_init_param::dout_mode
enum adaq8092_dout_modes dout_mode
Definition: adaq8092.h:188
errno.h
Error macro definition for ARM Compiler.
adaq8092_get_lvds_term_mode
enum adaq8092_internal_term adaq8092_get_lvds_term_mode(struct adaq8092_dev *dev)
Get the LVDS internal temination device mode.
Definition: adaq8092.c:486
ADAQ8092_RAND
#define ADAQ8092_RAND
Definition: adaq8092.h:79
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
adaq8092_init
int adaq8092_init(struct adaq8092_dev **device, struct adaq8092_init_param init_param)
Initialize the device.
Definition: adaq8092.c:119