no-OS
ad5758.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef AD5758_H_
34 #define AD5758_H_
35 
36 #include "no_os_gpio.h"
37 #include "no_os_spi.h"
38 
39 /******************************************************************************/
40 /********************** Macros and Constants Definitions **********************/
41 /******************************************************************************/
42 /*
43  * Create a contiguous bitmask starting at bit position @l and ending at
44  * position @h.
45  */
46 #define NO_OS_GENMASK(h, l) \
47  (((~0UL) - (1UL << (l)) + 1) & (~0UL >> (31 - (h))))
48 #define NO_OS_BIT(x) (1UL << (x))
49 
50 /* AD5758 registers definition */
51 #define AD5758_REG_NOP 0x00
52 #define AD5758_REG_DAC_INPUT 0x01
53 #define AD5758_REG_DAC_OUTPUT 0x02
54 #define AD5758_REG_CLEAR_CODE 0x03
55 #define AD5758_REG_USER_GAIN 0x04
56 #define AD5758_REG_USER_OFFSET 0x05
57 #define AD5758_REG_DAC_CONFIG 0x06
58 #define AD5758_REG_SW_LDAC 0x07
59 #define AD5758_REG_KEY 0x08
60 #define AD5758_REG_GP_CONFIG1 0x09
61 #define AD5758_REG_GP_CONFIG2 0x0A
62 #define AD5758_REG_DCDC_CONFIG1 0x0B
63 #define AD5758_REG_DCDC_CONFIG2 0x0C
64 #define AD5758_REG_WDT_CONFIG 0x0F
65 #define AD5758_REG_DIGITAL_DIAG_CONFIG 0x10
66 #define AD5758_REG_ADC_CONFIG 0x11
67 #define AD5758_REG_FAULT_PIN_CONFIG 0x12
68 #define AD5758_REG_TWO_STAGE_READBACK_SELECT 0x13
69 #define AD5758_REG_DIGITAL_DIAG_RESULTS 0x14
70 #define AD5758_REG_ANALOG_DIAG_RESULTS 0x15
71 #define AD5758_REG_STATUS 0x16
72 #define AD5758_REG_CHIP_ID 0x17
73 #define AD5758_REG_FREQ_MONITOR 0x18
74 #define AD5758_REG_DEVICE_ID_0 0x19
75 #define AD5758_REG_DEVICE_ID_1 0x1A
76 #define AD5758_REG_DEVICE_ID_2 0x1B
77 #define AD5758_REG_DEVICE_ID_3 0x1C
78 
79 /* AD5758_REG_DAC_CONFIG */
80 #define AD5758_DAC_CONFIG_RANGE_MSK NO_OS_GENMASK(3, 0)
81 #define AD5758_DAC_CONFIG_RANGE_MODE(x) (((x) & 0xF) << 0)
82 #define AD5758_DAC_CONFIG_OVRNG_EN_MSK NO_OS_BIT(4)
83 #define AD5758_DAC_CONFIG_OVRNG_EN_MODE(x) (((x) & 0x1) << 4)
84 #define AD5758_DAC_CONFIG_INT_EN_MSK NO_OS_BIT(5)
85 #define AD5758_DAC_CONFIG_INT_EN_MODE(x) (((x) & 0x1) << 5)
86 #define AD5758_DAC_CONFIG_OUT_EN_MSK NO_OS_BIT(6)
87 #define AD5758_DAC_CONFIG_OUT_EN_MODE(x) (((x) & 0x1) << 6)
88 #define AD5758_DAC_CONFIG_RSET_EXT_EN_MSK NO_OS_BIT(7)
89 #define AD5758_DAC_CONFIG_RSET_EXT_EN_MODE(x) (((x) & 0x1) << 7)
90 #define AD5758_DAC_CONFIG_SR_EN_MSK NO_OS_BIT(8)
91 #define AD5758_DAC_CONFIG_SR_EN_MODE(x) (((x) & 0x1) << 8)
92 #define AD5758_DAC_CONFIG_SR_CLOCK_MSK NO_OS_GENMASK(12, 9)
93 #define AD5758_DAC_CONFIG_SR_CLOCK_MODE(x) (((x) & 0xF) << 9)
94 #define AD5758_DAC_CONFIG_SR_STEP_MSK NO_OS_GENMASK(15, 13)
95 #define AD5758_DAC_CONFIG_SR_STEP_MODE(x) (((x) & 0x7) << 13)
96 
97 /* AD5758_REG_SW_LDAC */
98 #define AD5758_SW_LDAC_COMMAND 0x1DAC
99 
100 /* AD5758_REG_KEY */
101 #define AD5758_KEY_CODE_RESET_1 0x15FA
102 #define AD5758_KEY_CODE_RESET_2 0xAF51
103 #define AD5758_KEY_CODE_SINGLE_ADC_CONV 0x1ADC
104 #define AD5758_KEY_CODE_RESET_WDT 0x0D06
105 #define AD5758_KEY_CODE_CALIB_MEM_REFRESH 0xFCBA
106 
107 /* AD5758_REG_GP_CONFIG1 */
108 #define AD5758_GP_CONFIG1_OSC_STOP_DETECT_EN_MSK NO_OS_BIT(2)
109 #define AD5758_GP_CONFIG1_OSC_STOP_DETECT_EN_MODE(x) (((x) & 0x1) << 2)
110 #define AD5758_GP_CONFIG1_SPI_DIAG_QUIET_EN_MSK NO_OS_BIT(3)
111 #define AD5758_GP_CONFIG1_SPI_DIAG_QUIET_EN_MODE(x) (((x) & 0x1) << 3)
112 #define AD5758_GP_CONFIG1_CLEAR_NOW_EN_MSK NO_OS_BIT(4)
113 #define AD5758_GP_CONFIG1_CLEAR_NOW_EN_MODE(x) (((x) & 0x1) << 4)
114 #define AD5758_GP_CONFIG1_NEG_OFFSET_EN_MSK NO_OS_BIT(5)
115 #define AD5758_GP_CONFIG1_NEG_OFFSET_EN_MODE(x) (((x) & 0x1) << 5)
116 #define AD5758_GP_CONFIG1_HART_EN_MSK NO_OS_BIT(6)
117 #define AD5758_GP_CONFIG1_HART_EN_MODE(x) (((x) & 0x1) << 6)
118 #define AD5758_GP_CONFIG1_CLKOUT_FREQ_MSK NO_OS_GENMASK(9, 7)
119 #define AD5758_GP_CONFIG1_CLKOUT_FREQ_MODE(x) (((x) & 0x7) << 7)
120 #define AD5758_GP_CONFIG1_CLKOUT_CONFIG_MSK NO_OS_GENMASK(11, 10)
121 #define AD5758_GP_CONFIG1_CLKOUT_CONFIG_MODE(x) (((x) & 0x3) << 10)
122 #define AD5758_GP_CONFIG1_SET_TEMP_THRESHOLD_MSK NO_OS_GENMASK(13, 12)
123 #define AD5758_GP_CONFIG1_SET_TEMP_THRESHOLD_MODE(x) (((x) & 0x3) << 12)
124 
125 /* AD5758_REG_GP_CONFIG2 */
126 #define AD5758_GP_CONFIG2_FAULT_TIMEOUT_MSK NO_OS_BIT(9)
127 #define AD5758_GP_CONFIG2_FAULT_TIMEOUT_MODE(x) (((x) & 0x1) << 9)
128 #define AD5758_GP_CONFIG2_GLOBAL_SW_LDAC_MSK NO_OS_BIT(10)
129 #define AD5758_GP_CONFIG2_GLOBAL_SW_LDAC_MODE(x) (((x) & 0x1) << 10)
130 #define AD5758_GP_CONFIG2_INT_I_MONITOR_EN_MSK NO_OS_BIT(11)
131 #define AD5758_GP_CONFIG2_INT_I_MONITOR_EN_MODE(x) (((x) & 0x1) << 11)
132 #define AD5758_GP_CONFIG2_COMPARATOR_CONFIG_MSK NO_OS_GENMASK(14, 13)
133 #define AD5758_GP_CONFIG2_COMPARATOR_CONFIG_MODE(x) (((x) & 0x3) << 13)
134 
135 /* AD5758_REG_DCDC_CONFIG1 */
136 #define AD5758_DCDC_CONFIG1_DCDC_VPROG_MSK NO_OS_GENMASK(4, 0)
137 #define AD5758_DCDC_CONFIG1_DCDC_VPROG_MODE(x) (((x) & 0x1F) << 0)
138 #define AD5758_DCDC_CONFIG1_DCDC_MODE_MSK NO_OS_GENMASK(6, 5)
139 #define AD5758_DCDC_CONFIG1_DCDC_MODE_MODE(x) (((x) & 0x3) << 5)
140 
141 /* AD5758_REG_DCDC_CONFIG2 */
142 #define AD5758_DCDC_CONFIG2_ILIMIT_MSK NO_OS_GENMASK(3, 1)
143 #define AD5758_DCDC_CONFIG2_ILIMIT_MODE(x) (((x) & 0x7) << 1)
144 #define AD5758_DCDC_CONFIG2_ADC_CONTROL_DIAG_MSK NO_OS_GENMASK(5, 4)
145 #define AD5758_DCDC_CONFIG2_ADC_CONTROL_DIAG_MODE(x) (((x) & 0x3) << 4)
146 #define AD5758_DCDC_CONFIG2_VIOUT_PULLDOWN_EN_MSK NO_OS_BIT(6)
147 #define AD5758_DCDC_CONFIG2_VIOUT_PULLDOWN_EN_MODE(x) (((x) & 0x1) << 6)
148 #define AD5758_DCDC_CONFIG2_SHORT_DEGLITCH_MSK NO_OS_BIT(7)
149 #define AD5758_DCDC_CONFIG2_SHORT_DEGLITCH_MODE(x) (((x) & 0x1) << 7)
150 #define AD5758_DCDC_CONFIG2_READ_COMP_DIS_MSK NO_OS_BIT(10)
151 #define AD5758_DCDC_CONFIG2_READ_COMP_DIS_MODE(x) (((x) & 0x1) << 10)
152 #define AD5758_DCDC_CONFIG2_INTR_SAT_3WI_MSK NO_OS_BIT(11)
153 #define AD5758_DCDC_CONFIG2_BUSY_3WI_MSK NO_OS_BIT(12)
154 
155 /* AD5758_REG_WDT_CONFIG */
156 #define AD5758_WDT_CONFIG_WDT_TIMEOUT_MSK NO_OS_GENMASK(3, 0)
157 #define AD5758_WDT_CONFIG_WDT_TIMEOUT_MODE(x) (((x) & 0xF) << 0)
158 #define AD5758_WDT_CONFIG_WDT_EN_MSK NO_OS_BIT(6)
159 #define AD5758_WDT_CONFIG_WDT_EN_MODE(x) (((x) & 0x1) << 6)
160 #define AD5758_WDT_CONFIG_KICK_ON_VALID_WRITE_MSK NO_OS_BIT(8)
161 #define AD5758_WDT_CONFIG_KICK_ON_VALID_WRITE_MODE(x) (((x) & 0x1) << 8)
162 #define AD5758_WDT_CONFIG_RESET_ON_WDT_FAIL_MSK NO_OS_BIT(9)
163 #define AD5758_WDT_CONFIG_RESET_ON_WDT_FAIL_MODE(x) (((x) & 0x1) << 9)
164 #define AD5758_WDT_CONFIG_CLEAR_ON_WDT_FAIL_MSK NO_OS_BIT(10)
165 #define AD5758_WDT_CONFIG_CLEAR_ON_WDT_FAIL_MODE(x) (((x) & 0x1) << 10)
166 
167 /* AD5758_REG_DIGITAL_DIAG_CONFIG */
168 #define AD5758_DIG_DIAG_CONFIG_SPI_CRC_EN_MSK NO_OS_BIT(0)
169 #define AD5758_DIG_DIAG_CONFIG_SPI_CRC_EN_MODE(x) (((x) & 0x1) << 0)
170 #define AD5758_DIG_DIAG_CONFIG_FREQ_MON_EN_MSK NO_OS_BIT(2)
171 #define AD5758_DIG_DIAG_CONFIG_FREQ_MON_EN_MODE(x) (((x) & 0x1) << 2)
172 #define AD5758_DIG_DIAG_CONFIG_CAL_MEM_CRC_EN_MSK NO_OS_BIT(3)
173 #define AD5758_DIG_DIAG_CONFIG_CAL_MEM_CRC_EN_MODE(x) (((x) & 0x1) << 3)
174 #define AD5758_DIG_DIAG_CONFIG_INV_DAC_CHECK_EN_MSK NO_OS_BIT(4)
175 #define AD5758_DIG_DIAG_CONFIG_INV_DAC_CHECK_EN_MODE(x) (((x) & 0x1) << 4)
176 #define AD5758_DIG_DIAG_CONFIG_DAC_LATCH_MON_EN_MSK NO_OS_BIT(6)
177 #define AD5758_DIG_DIAG_CONFIG_DAC_LATCH_MON_EN_MODE(x) (((x) & 0x1) << 6)
178 
179 /* AD5758_REG_ADC_CONFIG */
180 #define AD5758_ADC_CONFIG_ADC_IP_SELECT_MSK NO_OS_GENMASK(4, 0)
181 #define AD5758_ADC_CONFIG_ADC_IP_SELECT_MODE(x) (((x) & 0x1F) << 0)
182 #define AD5758_ADC_CONFIG_SEQUENCE_DATA_MSK NO_OS_GENMASK(7, 5)
183 #define AD5758_ADC_CONFIG_SEQUENCE_DATA_MODE(x) (((x) & 0x7) << 5)
184 #define AD5758_ADC_CONFIG_SEQUENCE_COMMAND_MSK NO_OS_GENMASK(10, 8)
185 #define AD5758_ADC_CONFIG_SEQUENCE_COMMAND_MODE(x) (((x) & 0x7) << 8)
186 #define AD5758_ADC_CONFIG_PPC_BUF_MSK NO_OS_BIT(11)
187 #define AD5758_ADC_CONFIG_PPC_BUF_EN(x) (((x) & 0x1) << 11)
188 
189 /* AD5758_REG_FAULT_PIN_CONFIG */
190 #define AD5758_FAULT_PIN_CONFIG_MAIN_DIE_TEMP_ERR_MSK NO_OS_BIT(0)
191 #define AD5758_FAULT_PIN_CONFIG_MAIN_DIE_TEMP_ERR_MODE(x) (((x) & 0x1) << 0)
192 #define AD5758_FAULT_PIN_CONFIG_DCDC_DIE_TEMP_ERR_MSK NO_OS_BIT(1)
193 #define AD5758_FAULT_PIN_CONFIG_DCDC_DIE_TEMP_ERR_MODE(x) (((x) & 0x1) << 1)
194 #define AD5758_FAULT_PIN_CONFIG_VOUT_SC_ERR_MSK NO_OS_BIT(2)
195 #define AD5758_FAULT_PIN_CONFIG_VOUT_SC_ERR_MODE(x) (((x) & 0x1) << 2)
196 #define AD5758_FAULT_PIN_CONFIG_IOUT_OC_ERR_MSK NO_OS_BIT(3)
197 #define AD5758_FAULT_PIN_CONFIG_IOUT_OC_ERR_MODE(x) (((x) & 0x1) << 3)
198 #define AD5758_FAULT_PIN_CONFIG_DCDC_P_SC_ERR_MSK NO_OS_BIT(4)
199 #define AD5758_FAULT_PIN_CONFIG_DCDC_P_SC_ERR_MODE(x) (((x) & 0x1) << 4)
200 #define AD5758_FAULT_PIN_CONFIG_SPI_CRC_ERR_MSK NO_OS_BIT(6)
201 #define AD5758_FAULT_PIN_CONFIG_SPI_CRC_ERR_MODE(x) (((x) & 0x1) << 6)
202 #define AD5758_FAULT_PIN_CONFIG_SLIPBIT_ERR_MSK NO_OS_BIT(7)
203 #define AD5758_FAULT_PIN_CONFIG_SLIPBIT_ERR_MODE(x) (((x) & 0x1) << 7)
204 #define AD5758_FAULT_PIN_CONFIG_WDT_ERR_MSK NO_OS_BIT(8)
205 #define AD5758_FAULT_PIN_CONFIG_WDT_ERR_MODE(x) (((x) & 0x1) << 8)
206 #define AD5758_FAULT_PIN_CONFIG_DAC_LATCH_MON_ERR_MSK NO_OS_BIT(9)
207 #define AD5758_FAULT_PIN_CONFIG_DAC_LATCH_MON_ERR_MODE(x) (((x) & 0x1) << 9)
208 #define AD5758_FAULT_PIN_CONFIG_OSC_STOP_DETECT_MSK NO_OS_BIT(10)
209 #define AD5758_FAULT_PIN_CONFIG_OSC_STOP_DETECT_MODE(x) (((x) & 0x1) << 10)
210 #define AD5758_FAULT_PIN_CONFIG_INV_DAC_CHECK_ERR_MSK NO_OS_BIT(12)
211 #define AD5758_FAULT_PIN_CONFIG_INV_DAC_CHECK_ERR_MODE(x) (((x) & 0x1) << 12)
212 #define AD5758_FAULT_PIN_CONFIG_PROT_SW_ERR_MSK NO_OS_BIT(14)
213 #define AD5758_FAULT_PIN_CONFIG_PROT_SW_ERR_MODE(x) (((x) & 0x1) << 14)
214 #define AD5758_FAULT_PIN_CONFIG_SPI_ACC_ERR_MSK NO_OS_BIT(15)
215 #define AD5758_FAULT_PIN_CONFIG_SPI_ACC_ERR_MODE(x) (((x) & 0x1) << 15)
216 
217 /* AD5758_REG_TWO_STAGE_READBACK_SELECT */
218 #define AD5758_TWO_STAGE_READBACK_SELECT_MSK NO_OS_GENMASK(4, 0)
219 #define AD5758_TWO_STAGE_READBACK_SELECT_MODE(x) (((x) & 0x1F) << 0)
220 #define AD5758_TWO_STAGE_READBACK_SELECT_MODE_MSK NO_OS_GENMASK(6, 5)
221 #define AD5758_TWO_STAGE_READBACK_SELECT_MODE_MODE(x) (((x) & 0x3) << 5)
222 
223 /* AD5758_REG_DIGITAL_DIAG_RESULTS */
224 #define AD5758_DIG_DIAG_RESULTS_SPI_CRC_ERR NO_OS_BIT(0)
225 #define AD5758_DIG_DIAG_RESULTS_SLIPBIT_ERR_MSK NO_OS_BIT(1)
226 #define AD5758_DIG_DIAG_RESULTS_SCLK_COUNT_ERR_MSK NO_OS_BIT(2)
227 #define AD5758_DIG_DIAG_RESULTS_INVALID_SPI_ACC_ERR_MSK NO_OS_BIT(4)
228 #define AD5758_DIG_DIAG_RESULTS_CAL_MEM_CRC_ERR_MSK NO_OS_BIT(5)
229 #define AD5758_DIG_DIAG_RESULTS_INV_DAC_CHECK_ERR_MSK NO_OS_BIT(6)
230 #define AD5758_DIG_DIAG_RESULTS_DAC_LATCH_MON_ERR_MSK NO_OS_BIT(8)
231 #define AD5758_DIG_DIAG_RESULTS_3WI_RC_ERR_MSK NO_OS_BIT(9)
232 #define AD5758_DIG_DIAG_RESULTS_WDT_ERR_MSK NO_OS_BIT(11)
233 #define AD5758_DIG_DIAG_RESULTS_ERR_3WI_MSK NO_OS_BIT(12)
234 #define AD5758_DIG_DIAG_RESULTS_RES_OCCURRED_MSK NO_OS_BIT(13)
235 #define AD5758_DIG_DIAG_RESULTS_SLEW_BUSY_MSK NO_OS_BIT(14)
236 #define AD5758_DIG_DIAG_RESULTS_CAL_MEM_UNREFRESHED_MSK NO_OS_BIT(15)
237 
238 /* AD5758_REG_ANALOG_DIAG_RESULTS */
239 #define AD5758_ANA_DIAG_RESULTS_REGOUT_ERR_MSK NO_OS_BIT(0)
240 #define AD5758_ANA_DIAG_RESULTS_INT_AVCC_ERR_MSK NO_OS_BIT(1)
241 #define AD5758_ANA_DIAG_RESULTS_REFIN_ERR_MSK NO_OS_BIT(2)
242 #define AD5758_ANA_DIAG_RESULTS_REFOUT_ERR_MSK NO_OS_BIT(3)
243 #define AD5758_ANA_DIAG_RESULTS_MAIN_DIE_TEMP_ERR_MSK NO_OS_BIT(4)
244 #define AD5758_ANA_DIAG_RESULTS_DCDC_DIE_TEMP_ERR_MSK NO_OS_BIT(5)
245 #define AD5758_ANA_DIAG_RESULTS_VOUT_SC_ERR_MSK NO_OS_BIT(6)
246 #define AD5758_ANA_DIAG_RESULTS_IOUT_OC_ERR_MSK NO_OS_BIT(7)
247 #define AD5758_ANA_DIAG_RESULTS_DCDC_P_PWR_ERR_MSK NO_OS_BIT(9)
248 #define AD5758_ANA_DIAG_RESULTS_DCDC_P_SC_ERR_MSK NO_OS_BIT(11)
249 #define AD5758_ANA_DIAG_RESULTS_FAULT_PROT_SW_ERR_MSK NO_OS_BIT(13)
250 
251 /* AD5758_REG_STATUS */
252 #define AD5758_STATUS_ADC_DATA_MSK NO_OS_GENMASK(11, 0)
253 #define AD5758_STATUS_ADC_CH_MSK NO_OS_GENMASK(16, 12)
254 #define AD5758_STATUS_ADC_BUSY_MSK NO_OS_BIT(17)
255 #define AD5758_STATUS_WDT_STATUS_MSK NO_OS_BIT(18)
256 #define AD5758_STATUS_ANA_DIAG_STATUS_MSK NO_OS_BIT(19)
257 #define AD5758_STATUS_DIG_DIAG_STATUS_MSK NO_OS_BIT(20)
258 
259 #define AD5758_REG_WRITE(x) ((0x80) | (x & 0x1F))
260 #define AD5758_CRC8_POLY 0x07 // x^8 + x^2 + x^1 + x^0
261 
262 /*****************************************************************************/
263 /*************************** Types Declarations *******************************/
264 /******************************************************************************/
270 };
271 
284 };
285 
289 };
290 
300 };
301 
319 };
320 
328 };
329 
341 };
342 
362 };
363 
369 };
370 
371 struct ad5758_dev {
372  /* SPI */
374  /* GPIO */
377  /* Device Settings */
378  uint8_t crc_en;
385 };
386 
388  /* SPI */
390  /* GPIO */
393  /* Device Settings */
394  uint8_t crc_en;
401 };
402 
403 /******************************************************************************/
404 /************************ Functions Declarations ******************************/
405 /******************************************************************************/
406 int32_t ad5758_set_crc(struct ad5758_dev *dev, uint8_t crc_en);
407 int32_t ad5758_wait_for_refresh_cycle(struct ad5758_dev *dev);
408 int32_t ad5758_soft_reset(struct ad5758_dev *dev);
409 int32_t ad5758_calib_mem_refresh(struct ad5758_dev *dev);
410 int32_t ad5758_set_dc_dc_conv_mode(struct ad5758_dev *dev,
411  enum ad5758_dc_dc_mode mode);
412 int32_t ad5758_set_dc_dc_ilimit(struct ad5758_dev *dev,
413  enum ad5758_dc_dc_ilimt ilimit);
414 int32_t ad5758_fault_prot_switch_en(struct ad5758_dev *dev, uint8_t enable);
415 int32_t ad5758_internal_buffers_en(struct ad5758_dev *dev, uint8_t enable);
416 int32_t ad5758_set_out_range(struct ad5758_dev *dev,
417  enum ad5758_output_range range);
418 int32_t ad5758_slew_rate_config(struct ad5758_dev *dev,
419  enum ad5758_slew_rate_clk clk,
420  uint8_t enable);
421 int32_t ad5758_dac_input_write(struct ad5758_dev *dev, uint16_t code);
422 int32_t ad5758_dac_output_en(struct ad5758_dev *dev, uint8_t enable);
423 int32_t ad5758_clear_dig_diag_flag(struct ad5758_dev *dev,
424  enum ad5758_dig_diag_flags flag);
425 int32_t ad5758_select_adc_ip(struct ad5758_dev *dev,
426  enum ad5758_adc_ip adc_ip_sel);
427 int32_t ad5758_set_clkout_config(struct ad5758_dev *dev,
428  enum ad5758_clkout_config config,
429  enum ad5758_clkout_freq freq);
430 int32_t ad5758_select_adc_depth(struct ad5758_dev *dev,
431  uint8_t num_of_channels);
432 int32_t ad5758_set_adc_channel_input(struct ad5758_dev *dev,
433  uint8_t channel,
434  enum ad5758_adc_ip adc_ip_sel);
435 int32_t ad5758_set_adc_mode(struct ad5758_dev *dev,
436  enum ad5758_adc_mode adc_mode,
437  uint8_t enable);
438 int32_t ad5758_init(struct ad5758_dev **device,
439  struct ad5758_init_param *init_param);
440 #endif /* AD5758_H_ */
ad5758_set_adc_channel_input
int32_t ad5758_set_adc_channel_input(struct ad5758_dev *dev, uint8_t channel, enum ad5758_adc_ip adc_ip_sel)
Definition: ad5758.c:705
RANGE_0mA_20mA
@ RANGE_0mA_20mA
Definition: ad5758.h:335
AD5758_DAC_CONFIG_OUT_EN_MODE
#define AD5758_DAC_CONFIG_OUT_EN_MODE(x)
Definition: ad5758.h:87
AD5758_ADC_CONFIG_SEQUENCE_COMMAND_MODE
#define AD5758_ADC_CONFIG_SEQUENCE_COMMAND_MODE(x)
Definition: ad5758.h:185
ad5758_set_adc_mode
int32_t ad5758_set_adc_mode(struct ad5758_dev *dev, enum ad5758_adc_mode adc_mode, uint8_t enable)
Definition: ad5758.c:739
ad5758_dc_dc_ilimt
ad5758_dc_dc_ilimt
Definition: ad5758.h:321
DIAG_SCLK_COUNT_ERR
@ DIAG_SCLK_COUNT_ERR
Definition: ad5758.h:275
ADC_IP_MAIN_DIE_TEMP
@ ADC_IP_MAIN_DIE_TEMP
Definition: ad5758.h:344
ad5758_calib_mem_refresh
int32_t ad5758_calib_mem_refresh(struct ad5758_dev *dev)
Definition: ad5758.c:259
CLKOUT_FREQ_555_KHZ
@ CLKOUT_FREQ_555_KHZ
Definition: ad5758.h:298
AD5758_REG_NOP
#define AD5758_REG_NOP
Definition: ad5758.h:51
no_os_alloc.h
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
ad5758_clkout_config
ad5758_clkout_config
Definition: ad5758.h:286
ad5758_dev::output_range
enum ad5758_output_range output_range
Definition: ad5758.h:383
AD5758_REG_ADC_CONFIG
#define AD5758_REG_ADC_CONFIG
Definition: ad5758.h:66
ad5758_init_param::output_range
enum ad5758_output_range output_range
Definition: ad5758.h:399
ad5758_select_adc_depth
int32_t ad5758_select_adc_depth(struct ad5758_dev *dev, uint8_t num_of_channels)
Definition: ad5758.c:656
AD5758_ADC_CONFIG_ADC_IP_SELECT_MODE
#define AD5758_ADC_CONFIG_ADC_IP_SELECT_MODE(x)
Definition: ad5758.h:181
ADC_IP_DCDC_DIE_NODE
@ ADC_IP_DCDC_DIE_NODE
Definition: ad5758.h:360
DIAG_INVALID_SPI_ACCESS_ERR
@ DIAG_INVALID_SPI_ACCESS_ERR
Definition: ad5758.h:276
AD5758_ADC_CONFIG_ADC_IP_SELECT_MSK
#define AD5758_ADC_CONFIG_ADC_IP_SELECT_MSK
Definition: ad5758.h:180
ADC_IP_REFOUT
@ ADC_IP_REFOUT
Definition: ad5758.h:361
AD5758_REG_DIGITAL_DIAG_CONFIG
#define AD5758_REG_DIGITAL_DIAG_CONFIG
Definition: ad5758.h:65
ad5758_output_range
ad5758_output_range
Definition: ad5758.h:330
RANGE_M24mA_24mA
@ RANGE_M24mA_24mA
Definition: ad5758.h:339
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
ad5758_init_param::slew_rate_clk
enum ad5758_slew_rate_clk slew_rate_clk
Definition: ad5758.h:400
ad5758_select_adc_depth
int32_t ad5758_select_adc_depth(struct ad5758_dev *dev, uint8_t num_of_channels)
Definition: ad5758.c:656
ADC_IP_VSENSE
@ ADC_IP_VSENSE
Definition: ad5758.h:348
no_os_spi.h
Header file of SPI Interface.
ADC_IP_DCDC_DIE_TEMP
@ ADC_IP_DCDC_DIE_TEMP
Definition: ad5758.h:345
ad5758_dc_dc_mode
ad5758_dc_dc_mode
Definition: ad5758.h:265
SR_CLOCK_128_KHZ
@ SR_CLOCK_128_KHZ
Definition: ad5758.h:306
ad5758_dac_input_write
int32_t ad5758_dac_input_write(struct ad5758_dev *dev, uint16_t code)
Definition: ad5758.c:487
AD5758_DAC_CONFIG_INT_EN_MODE
#define AD5758_DAC_CONFIG_INT_EN_MODE(x)
Definition: ad5758.h:85
ADC_IP_AGND
@ ADC_IP_AGND
Definition: ad5758.h:355
ad5758_dev::ldac_n
struct no_os_gpio_desc * ldac_n
Definition: ad5758.h:376
ad5758_init
int32_t ad5758_init(struct ad5758_dev **device, struct ad5758_init_param *init_param)
Definition: ad5758.c:767
pr_err
#define pr_err(fmt, args...)
Definition: no_os_print_log.h:88
AD5758_DCDC_CONFIG2_ILIMIT_MSK
#define AD5758_DCDC_CONFIG2_ILIMIT_MSK
Definition: ad5758.h:142
no_os_delay.h
Header file of Delay functions.
RANGE_0V_5V
@ RANGE_0V_5V
Definition: ad5758.h:331
AD5758_DAC_CONFIG_OUT_EN_MSK
#define AD5758_DAC_CONFIG_OUT_EN_MSK
Definition: ad5758.h:86
pr_info
#define pr_info(fmt, args...)
Definition: no_os_print_log.h:115
ADC_IP_INT_AVCC
@ ADC_IP_INT_AVCC
Definition: ad5758.h:350
AD5758_REG_DCDC_CONFIG2
#define AD5758_REG_DCDC_CONFIG2
Definition: ad5758.h:63
ADC_IP_REFGND
@ ADC_IP_REFGND
Definition: ad5758.h:354
AD5758_DCDC_CONFIG2_BUSY_3WI_MSK
#define AD5758_DCDC_CONFIG2_BUSY_3WI_MSK
Definition: ad5758.h:153
CLKOUT_FREQ_435_KHZ
@ CLKOUT_FREQ_435_KHZ
Definition: ad5758.h:293
CLKOUT_ENABLE
@ CLKOUT_ENABLE
Definition: ad5758.h:288
ad5758_set_crc
int32_t ad5758_set_crc(struct ad5758_dev *dev, uint8_t crc_en)
Definition: ad5758.c:189
ILIMIT_400_mA
@ ILIMIT_400_mA
Definition: ad5758.h:327
device
Definition: ad9361_util.h:69
NO_OS_GPIO_HIGH
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:117
no_os_print_log.h
Print messages helpers.
CLKOUT_FREQ_588_KHZ
@ CLKOUT_FREQ_588_KHZ
Definition: ad5758.h:299
SR_CLOCK_8_KHZ
@ SR_CLOCK_8_KHZ
Definition: ad5758.h:310
AD5758_REG_DAC_INPUT
#define AD5758_REG_DAC_INPUT
Definition: ad5758.h:52
RANGE_0V_10V
@ RANGE_0V_10V
Definition: ad5758.h:332
AD5758_REG_TWO_STAGE_READBACK_SELECT
#define AD5758_REG_TWO_STAGE_READBACK_SELECT
Definition: ad5758.h:68
ad5758_dac_input_write
int32_t ad5758_dac_input_write(struct ad5758_dev *dev, uint16_t code)
Definition: ad5758.c:487
AD5758_ADC_CONFIG_PPC_BUF_EN
#define AD5758_ADC_CONFIG_PPC_BUF_EN(x)
Definition: ad5758.h:187
ADC_MODE_SINGLE_KEY_CONV
@ ADC_MODE_SINGLE_KEY_CONV
Definition: ad5758.h:368
ad5758_set_dc_dc_ilimit
int32_t ad5758_set_dc_dc_ilimit(struct ad5758_dev *dev, enum ad5758_dc_dc_ilimt ilimit)
Definition: ad5758.c:336
AD5758_GP_CONFIG1_CLKOUT_CONFIG_MODE
#define AD5758_GP_CONFIG1_CLKOUT_CONFIG_MODE(x)
Definition: ad5758.h:121
ad5758_set_clkout_config
int32_t ad5758_set_clkout_config(struct ad5758_dev *dev, enum ad5758_clkout_config config, enum ad5758_clkout_freq freq)
Definition: ad5758.c:580
ad5758_dev::dc_dc_mode
enum ad5758_dc_dc_mode dc_dc_mode
Definition: ad5758.h:379
SR_CLOCK_512_HZ
@ SR_CLOCK_512_HZ
Definition: ad5758.h:314
AD5758_REG_DCDC_CONFIG1
#define AD5758_REG_DCDC_CONFIG1
Definition: ad5758.h:62
DPC_CURRENT_MODE
@ DPC_CURRENT_MODE
Definition: ad5758.h:267
NO_OS_GPIO_LOW
@ NO_OS_GPIO_LOW
Definition: no_os_gpio.h:115
ADC_IP_AVDD2
@ ADC_IP_AVDD2
Definition: ad5758.h:358
AD5758_REG_DAC_CONFIG
#define AD5758_REG_DAC_CONFIG
Definition: ad5758.h:57
ad5758.h
Header file for ad5758 Driver.
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
ad5758_set_clkout_config
int32_t ad5758_set_clkout_config(struct ad5758_dev *dev, enum ad5758_clkout_config config, enum ad5758_clkout_freq freq)
Definition: ad5758.c:580
ad5758_set_crc
int32_t ad5758_set_crc(struct ad5758_dev *dev, uint8_t crc_en)
Definition: ad5758.c:189
DIAG_RESET_OCCURRED
@ DIAG_RESET_OCCURRED
Definition: ad5758.h:283
ad5758_dev::clkout_config
enum ad5758_clkout_config clkout_config
Definition: ad5758.h:380
no_os_error.h
Error codes definition.
RANGE_M20mA_20mA
@ RANGE_M20mA_20mA
Definition: ad5758.h:338
DPC_VOLTAGE_MODE
@ DPC_VOLTAGE_MODE
Definition: ad5758.h:268
ad5758_dac_output_en
int32_t ad5758_dac_output_en(struct ad5758_dev *dev, uint8_t enable)
Definition: ad5758.c:509
ad5758_init_param::dc_dc_mode
enum ad5758_dc_dc_mode dc_dc_mode
Definition: ad5758.h:395
SR_CLOCK_2_KHZ
@ SR_CLOCK_2_KHZ
Definition: ad5758.h:312
ad5758_calib_mem_refresh
int32_t ad5758_calib_mem_refresh(struct ad5758_dev *dev)
Definition: ad5758.c:259
SR_CLOCK_256_HZ
@ SR_CLOCK_256_HZ
Definition: ad5758.h:315
ad5758_slew_rate_clk
ad5758_slew_rate_clk
Definition: ad5758.h:302
DIAG_THREE_WI_RC_ERR
@ DIAG_THREE_WI_RC_ERR
Definition: ad5758.h:280
ad5758_set_dc_dc_conv_mode
int32_t ad5758_set_dc_dc_conv_mode(struct ad5758_dev *dev, enum ad5758_dc_dc_mode mode)
Definition: ad5758.c:284
ad5758_spi_reg_write
int32_t ad5758_spi_reg_write(struct ad5758_dev *dev, uint8_t reg_addr, uint16_t reg_data)
Definition: ad5758.c:141
ILIMIT_300_mA
@ ILIMIT_300_mA
Definition: ad5758.h:325
ad5758_init_param::dc_dc_ilimit
enum ad5758_dc_dc_ilimt dc_dc_ilimit
Definition: ad5758.h:398
RANGE_4mA_24mA
@ RANGE_4mA_24mA
Definition: ad5758.h:337
ad5758_spi_reg_read
int32_t ad5758_spi_reg_read(struct ad5758_dev *dev, uint8_t reg_addr, uint16_t *reg_data)
Definition: ad5758.c:85
AD5758_DCDC_CONFIG1_DCDC_MODE_MSK
#define AD5758_DCDC_CONFIG1_DCDC_MODE_MSK
Definition: ad5758.h:138
AD5758_DCDC_CONFIG1_DCDC_MODE_MODE
#define AD5758_DCDC_CONFIG1_DCDC_MODE_MODE(x)
Definition: ad5758.h:139
ILIMIT_350_mA
@ ILIMIT_350_mA
Definition: ad5758.h:326
ad5758_soft_reset
int32_t ad5758_soft_reset(struct ad5758_dev *dev)
Definition: ad5758.c:231
ad5758_dig_diag_flags
ad5758_dig_diag_flags
Definition: ad5758.h:272
ad5758_dev::crc_en
uint8_t crc_en
Definition: ad5758.h:378
ADC_IP_MVSENSE
@ ADC_IP_MVSENSE
Definition: ad5758.h:349
ILIMIT_250_mA
@ ILIMIT_250_mA
Definition: ad5758.h:324
AD5758_REG_KEY
#define AD5758_REG_KEY
Definition: ad5758.h:59
ad5758_set_out_range
int32_t ad5758_set_out_range(struct ad5758_dev *dev, enum ad5758_output_range range)
Definition: ad5758.c:403
CLKOUT_DISABLE
@ CLKOUT_DISABLE
Definition: ad5758.h:287
ADC_IP_REF2
@ ADC_IP_REF2
Definition: ad5758.h:347
AD5758_DAC_CONFIG_SR_EN_MODE
#define AD5758_DAC_CONFIG_SR_EN_MODE(x)
Definition: ad5758.h:91
AD5758_DAC_CONFIG_INT_EN_MSK
#define AD5758_DAC_CONFIG_INT_EN_MSK
Definition: ad5758.h:84
ad5758_dac_output_en
int32_t ad5758_dac_output_en(struct ad5758_dev *dev, uint8_t enable)
Definition: ad5758.c:509
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
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
ADC_IP_INT_CURR_MON_VOUT
@ ADC_IP_INT_CURR_MON_VOUT
Definition: ad5758.h:353
AD5758_GP_CONFIG1_CLKOUT_FREQ_MODE
#define AD5758_GP_CONFIG1_CLKOUT_FREQ_MODE(x)
Definition: ad5758.h:119
SR_CLOCK_200_KHZ
@ SR_CLOCK_200_KHZ
Definition: ad5758.h:304
AD5758_DAC_CONFIG_SR_CLOCK_MODE
#define AD5758_DAC_CONFIG_SR_CLOCK_MODE(x)
Definition: ad5758.h:93
AD5758_DAC_CONFIG_SR_CLOCK_MSK
#define AD5758_DAC_CONFIG_SR_CLOCK_MSK
Definition: ad5758.h:92
SR_CLOCK_128_HZ
@ SR_CLOCK_128_HZ
Definition: ad5758.h:316
ad5758_dev::slew_rate_clk
enum ad5758_slew_rate_clk slew_rate_clk
Definition: ad5758.h:384
ad5758_init
int32_t ad5758_init(struct ad5758_dev **device, struct ad5758_init_param *init_param)
Definition: ad5758.c:767
RANGE_0mA_24mA
@ RANGE_0mA_24mA
Definition: ad5758.h:336
ad5758_slew_rate_config
int32_t ad5758_slew_rate_config(struct ad5758_dev *dev, enum ad5758_slew_rate_clk clk, uint8_t enable)
Definition: ad5758.c:451
RANGE_M10V_10V
@ RANGE_M10V_10V
Definition: ad5758.h:334
AD5758_CRC8_POLY
#define AD5758_CRC8_POLY
Definition: ad5758.h:260
ad5758_set_adc_channel_input
int32_t ad5758_set_adc_channel_input(struct ad5758_dev *dev, uint8_t channel, enum ad5758_adc_ip adc_ip_sel)
Definition: ad5758.c:705
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
ad5758_set_adc_mode
int32_t ad5758_set_adc_mode(struct ad5758_dev *dev, enum ad5758_adc_mode adc_mode, uint8_t enable)
Definition: ad5758.c:739
SR_CLOCK_64_HZ
@ SR_CLOCK_64_HZ
Definition: ad5758.h:317
PPC_CURRENT_MODE
@ PPC_CURRENT_MODE
Definition: ad5758.h:269
RANGE_M5V_5V
@ RANGE_M5V_5V
Definition: ad5758.h:333
CLKOUT_FREQ_526_KHZ
@ CLKOUT_FREQ_526_KHZ
Definition: ad5758.h:297
SR_CLOCK_1_KHZ
@ SR_CLOCK_1_KHZ
Definition: ad5758.h:313
ad5758_internal_buffers_en
int32_t ad5758_internal_buffers_en(struct ad5758_dev *dev, uint8_t enable)
Definition: ad5758.c:371
ad5758_init_param::reset_n
struct no_os_gpio_init_param reset_n
Definition: ad5758.h:391
ad5758_adc_mode
ad5758_adc_mode
Definition: ad5758.h:364
CLKOUT_FREQ_500_KHZ
@ CLKOUT_FREQ_500_KHZ
Definition: ad5758.h:296
DIAG_ERR_3WI
@ DIAG_ERR_3WI
Definition: ad5758.h:282
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
SR_CLOCK_16_KHZ
@ SR_CLOCK_16_KHZ
Definition: ad5758.h:309
AD5758_REG_DIGITAL_DIAG_RESULTS
#define AD5758_REG_DIGITAL_DIAG_RESULTS
Definition: ad5758.h:69
ad5758_dev::clkout_freq
enum ad5758_clkout_freq clkout_freq
Definition: ad5758.h:381
ad5758_init_param::spi_init
struct no_os_spi_init_param spi_init
Definition: ad5758.h:389
DIAG_WDT_ERR
@ DIAG_WDT_ERR
Definition: ad5758.h:281
no_os_malloc
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
SR_CLOCK_4_KHZ
@ SR_CLOCK_4_KHZ
Definition: ad5758.h:311
AD5758_ADC_CONFIG_SEQUENCE_DATA_MODE
#define AD5758_ADC_CONFIG_SEQUENCE_DATA_MODE(x)
Definition: ad5758.h:183
ADC_IP_REFIN
@ ADC_IP_REFIN
Definition: ad5758.h:346
AD5758_DIG_DIAG_RESULTS_CAL_MEM_UNREFRESHED_MSK
#define AD5758_DIG_DIAG_RESULTS_CAL_MEM_UNREFRESHED_MSK
Definition: ad5758.h:236
ad5758_dev::dc_dc_ilimit
enum ad5758_dc_dc_ilimt dc_dc_ilimit
Definition: ad5758.h:382
ad5758_set_dc_dc_conv_mode
int32_t ad5758_set_dc_dc_conv_mode(struct ad5758_dev *dev, enum ad5758_dc_dc_mode mode)
Definition: ad5758.c:284
SR_CLOCK_64_KHZ
@ SR_CLOCK_64_KHZ
Definition: ad5758.h:307
AD5758_DIG_DIAG_CONFIG_SPI_CRC_EN_MODE
#define AD5758_DIG_DIAG_CONFIG_SPI_CRC_EN_MODE(x)
Definition: ad5758.h:169
CLKOUT_FREQ_454_KHZ
@ CLKOUT_FREQ_454_KHZ
Definition: ad5758.h:294
ad5758_clear_dig_diag_flag
int32_t ad5758_clear_dig_diag_flag(struct ad5758_dev *dev, enum ad5758_dig_diag_flags flag)
Definition: ad5758.c:543
NO_OS_BIT
#define NO_OS_BIT(x)
Definition: no_os_util.h:45
ILIMIT_150_mA
@ ILIMIT_150_mA
Definition: ad5758.h:322
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
ad5758_adc_ip
ad5758_adc_ip
Definition: ad5758.h:343
ad5758_dev::spi_desc
struct no_os_spi_desc * spi_desc
Definition: ad5758.h:373
AD5758_KEY_CODE_RESET_2
#define AD5758_KEY_CODE_RESET_2
Definition: ad5758.h:102
AD5758_REG_WRITE
#define AD5758_REG_WRITE(x)
Definition: ad5758.h:259
ILIMIT_200_mA
@ ILIMIT_200_mA
Definition: ad5758.h:323
ad5758_wait_for_refresh_cycle
int32_t ad5758_wait_for_refresh_cycle(struct ad5758_dev *dev)
Definition: ad5758.c:211
ad5758_init_param::clkout_config
enum ad5758_clkout_config clkout_config
Definition: ad5758.h:396
no_os_udelay
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: aducm3029_delay.c:114
ad5758_set_out_range
int32_t ad5758_set_out_range(struct ad5758_dev *dev, enum ad5758_output_range range)
Definition: ad5758.c:403
ad5758_init_param
Definition: ad5758.h:387
ad5758_internal_buffers_en
int32_t ad5758_internal_buffers_en(struct ad5758_dev *dev, uint8_t enable)
Definition: ad5758.c:371
RANGE_M1mA_22mA
@ RANGE_M1mA_22mA
Definition: ad5758.h:340
AD5758_ADC_CONFIG_PPC_BUF_MSK
#define AD5758_ADC_CONFIG_PPC_BUF_MSK
Definition: ad5758.h:186
ad5758_init_param::clkout_freq
enum ad5758_clkout_freq clkout_freq
Definition: ad5758.h:397
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
ad5758_wait_for_refresh_cycle
int32_t ad5758_wait_for_refresh_cycle(struct ad5758_dev *dev)
Definition: ad5758.c:211
ad5758_select_adc_ip
int32_t ad5758_select_adc_ip(struct ad5758_dev *dev, enum ad5758_adc_ip adc_ip_sel)
Definition: ad5758.c:632
DC_DC_POWER_OFF
@ DC_DC_POWER_OFF
Definition: ad5758.h:266
AD5758_DAC_CONFIG_RANGE_MODE
#define AD5758_DAC_CONFIG_RANGE_MODE(x)
Definition: ad5758.h:81
ADC_MODE_AUTO_SEQ
@ ADC_MODE_AUTO_SEQ
Definition: ad5758.h:366
AD5758_GP_CONFIG1_CLKOUT_CONFIG_MSK
#define AD5758_GP_CONFIG1_CLKOUT_CONFIG_MSK
Definition: ad5758.h:120
ad5758_dev
Definition: ad5758.h:371
SR_CLOCK_150_KHZ
@ SR_CLOCK_150_KHZ
Definition: ad5758.h:305
ADC_IP_VLOGIC
@ ADC_IP_VLOGIC
Definition: ad5758.h:352
DIAG_SPI_CRC_ERR
@ DIAG_SPI_CRC_ERR
Definition: ad5758.h:273
DIAG_SLIPBIT_ERR
@ DIAG_SLIPBIT_ERR
Definition: ad5758.h:274
ad5758_fault_prot_switch_en
int32_t ad5758_fault_prot_switch_en(struct ad5758_dev *dev, uint8_t enable)
AD5758_GP_CONFIG1_CLKOUT_FREQ_MSK
#define AD5758_GP_CONFIG1_CLKOUT_FREQ_MSK
Definition: ad5758.h:118
AD5758_DCDC_CONFIG2_ILIMIT_MODE
#define AD5758_DCDC_CONFIG2_ILIMIT_MODE(x)
Definition: ad5758.h:143
AD5758_DIG_DIAG_CONFIG_SPI_CRC_EN_MSK
#define AD5758_DIG_DIAG_CONFIG_SPI_CRC_EN_MSK
Definition: ad5758.h:168
DIAG_DAC_LATCH_MON_ERR
@ DIAG_DAC_LATCH_MON_ERR
Definition: ad5758.h:279
no_os_gpio.h
Header file of GPIO Interface.
SR_CLOCK_240_KHZ
@ SR_CLOCK_240_KHZ
Definition: ad5758.h:303
ADC_MODE_KEY_SEQ
@ ADC_MODE_KEY_SEQ
Definition: ad5758.h:365
ADC_IP_AVSS
@ ADC_IP_AVSS
Definition: ad5758.h:359
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
CLKOUT_FREQ_416_KHZ
@ CLKOUT_FREQ_416_KHZ
Definition: ad5758.h:292
SR_CLOCK_32_KHZ
@ SR_CLOCK_32_KHZ
Definition: ad5758.h:308
AD5758_REG_GP_CONFIG1
#define AD5758_REG_GP_CONFIG1
Definition: ad5758.h:60
ad5758_set_dc_dc_ilimit
int32_t ad5758_set_dc_dc_ilimit(struct ad5758_dev *dev, enum ad5758_dc_dc_ilimt ilimit)
Definition: ad5758.c:336
ad5758_soft_reset
int32_t ad5758_soft_reset(struct ad5758_dev *dev)
Definition: ad5758.c:231
ad5758_dev::reset_n
struct no_os_gpio_desc * reset_n
Definition: ad5758.h:375
DIAG_INVERSE_DAC_CHECK_ERR
@ DIAG_INVERSE_DAC_CHECK_ERR
Definition: ad5758.h:278
SR_CLOCK_16_HZ
@ SR_CLOCK_16_HZ
Definition: ad5758.h:318
ad5758_init_param::ldac_n
struct no_os_gpio_init_param ldac_n
Definition: ad5758.h:392
ad5758_clear_dig_diag_flag
int32_t ad5758_clear_dig_diag_flag(struct ad5758_dev *dev, enum ad5758_dig_diag_flags flag)
Definition: ad5758.c:543
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
ADC_IP_DGND
@ ADC_IP_DGND
Definition: ad5758.h:356
AD5758_DAC_CONFIG_SR_EN_MSK
#define AD5758_DAC_CONFIG_SR_EN_MSK
Definition: ad5758.h:90
ADC_MODE_SINGLE_CONV
@ ADC_MODE_SINGLE_CONV
Definition: ad5758.h:367
ad5758_init_param::crc_en
uint8_t crc_en
Definition: ad5758.h:394
AD5758_DAC_CONFIG_RANGE_MSK
#define AD5758_DAC_CONFIG_RANGE_MSK
Definition: ad5758.h:80
ADC_IP_VDPC
@ ADC_IP_VDPC
Definition: ad5758.h:357
DIAG_CAL_MEM_CRC_ERR
@ DIAG_CAL_MEM_CRC_ERR
Definition: ad5758.h:277
AD5758_KEY_CODE_CALIB_MEM_REFRESH
#define AD5758_KEY_CODE_CALIB_MEM_REFRESH
Definition: ad5758.h:105
ad5758_clkout_freq
ad5758_clkout_freq
Definition: ad5758.h:291
AD5758_KEY_CODE_RESET_1
#define AD5758_KEY_CODE_RESET_1
Definition: ad5758.h:101
ADC_IP_REGOUT
@ ADC_IP_REGOUT
Definition: ad5758.h:351
CLKOUT_FREQ_476_KHZ
@ CLKOUT_FREQ_476_KHZ
Definition: ad5758.h:295
ad5758_slew_rate_config
int32_t ad5758_slew_rate_config(struct ad5758_dev *dev, enum ad5758_slew_rate_clk clk, uint8_t enable)
Definition: ad5758.c:451
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
ad5758_select_adc_ip
int32_t ad5758_select_adc_ip(struct ad5758_dev *dev, enum ad5758_adc_ip adc_ip_sel)
Definition: ad5758.c:632