no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ade9113.h
Go to the documentation of this file.
1/***************************************************************************/
33#ifndef __ADE9113_H__
34#define __ADE9113_H__
35
36#include <stdbool.h>
37#include <stdint.h>
38#include <string.h>
39#include "no_os_util.h"
40#include "no_os_spi.h"
41#include "no_os_gpio.h"
42#include "no_os_irq.h"
43
44/* SPI commands */
45#define ADE9113_SPI_READ NO_OS_BIT(7)
46
47/* Long/Short operation bit, set for lon read/write */
48#define ADE9113_OP_MODE_LONG NO_OS_BIT(6)
49
50/* ADE9113 CRC constants */
51#define ADE9113_CRC8_POLY 0x07
52#define ADE9113_CRC16_POLY 0x1021
53#define ADE9113_CRC16_INIT_VAL 0xFFFF
54
55/* ENABLE and DISABLE */
56#define ENABLE 1u
57#define DISABLE 0u
58
59/* ADE9113 Register Map */
60#define ADE9113_REG_SWRST 0x001
61#define ADE9113_REG_CONFIG0 0x002
62#define ADE9113_REG_CONFIG_FILT 0x003
63#define ADE9113_REG_CONFIG_ISO_ACC 0x005
64#define ADE9113_REG_CRC_RESULT_HI 0x006
65#define ADE9113_REG_CRC_RESULT_LO 0x007
66#define ADE9113_REG_EFUSE_REFRESH 0x008
67#define ADE9113_REG_EMI_CONFIG 0x009
68#define ADE9113_REG_EMI_HI_MASK 0x00A
69#define ADE9113_REG_EMI_LO_MASK 0x00B
70#define ADE9113_REG_EMI_HI_LIMIT 0x00C
71#define ADE9113_REG_EMI_MID_LIMIT 0x00D
72#define ADE9113_REG_EMI_LO_LIMIT 0x00E
73#define ADE9113_REG_MASK0 0x00F
74#define ADE9113_REG_MASK1 0x010
75#define ADE9113_REG_MASK2 0x011
76#define ADE9113_REG_CONFIG_ZX 0x012
77#define ADE9113_REG_SCRATCH 0x013
78#define ADE9113_REG_SYNC_SNAP 0x014
79#define ADE9113_REG_COUNTER_HI 0x015
80#define ADE9113_REG_COUNTER_LO 0x016
81#define ADE9113_REG_SNAPSHOT_COUNT_HI 0x017
82#define ADE9113_REG_SNAPSHOT_COUNT_LO 0x018
83#define ADE9113_REG_WR_LOCK 0x01F
84#define ADE9113_REG_STATUS0 0x020
85#define ADE9113_REG_STATUS1 0x021
86#define ADE9113_REG_STATUS2 0x022
87#define ADE9113_REG_COM_FLT_TYPE 0x023
88#define ADE9113_REG_COM_FLT_COUNT 0x024
89#define ADE9113_REG_CONFIG_CRC 0x025
90#define ADE9113_REG_I_WAV_HI 0x026
91#define ADE9113_REG_I_WAV_MD 0x027
92#define ADE9113_REG_I_WAV_LO 0x028
93#define ADE9113_REG_V1_WAV_HI 0x029
94#define ADE9113_REG_V1_WAV_MD 0x02A
95#define ADE9113_REG_V1_WAV_LO 0x02B
96#define ADE9113_REG_V2_WAV_HI 0x02C
97#define ADE9113_REG_V2_WAV_MD 0x02D
98#define ADE9113_REG_V2_WAV_LO 0x02E
99#define ADE9113_REG_UNIQUE_PART_ID_5 0x075
100#define ADE9113_REG_UNIQUE_PART_ID_4 0x076
101#define ADE9113_REG_UNIQUE_PART_ID_3 0x077
102#define ADE9113_REG_UNIQUE_PART_ID_2 0x078
103#define ADE9113_REG_UNIQUE_PART_ID_1 0x079
104#define ADE9113_REG_UNIQUE_PART_ID_0 0x07A
105#define ADE9113_REG_SILICON_REVISION 0x07D
106#define ADE9113_REG_VERSION_PRODUCT 0x07E
107
108/* ADE9113 SWRST command */
109#define ADE9113_SWRST_CMD 0xD6
110
111/* ADE9113_REG_CONFIG0 Bit Definition */
112#define ADE9113_STREAM_DBG_MSK NO_OS_GENMASK(3, 2)
113#define ADE9113_CRC_EN_SPI_WRITE_MSK NO_OS_BIT(1)
114#define ADE9113_CLOUT_EN_MSK NO_OS_BIT(0)
115
116/* ADE9113_REG_CONFIG_FILT Bit Definition */
117#define ADE9113_V2_ADC_INVERT_MSK NO_OS_BIT(6)
118#define ADE9113_V1_ADC_INVERT_MSK NO_OS_BIT(5)
119#define ADE9113_I_ADC_INVERT_MSK NO_OS_BIT(4)
120#define ADE9113_LPF_BW_MSK NO_OS_BIT(3)
121#define ADE9113_DATAPATH_CONFIG_MSK NO_OS_GENMASK(2, 0)
122
123/* ADE9113_REG_CONFIG_ISO_ACC Bit Definition */
124#define ADE9113_ISO_WR_ACC_EN_MSK NO_OS_BIT(0)
125
126/* ADE9113_REG_EFUSE_REFRESH Bit Definition */
127#define ADE9113_EFUSE_REFRESH_MSK NO_OS_BIT(0)
128
129/* ADE9113_REG_EMI_CONFIG Bit Definition */
130#define ADE9113_EMI_CONFIG_MSK NO_OS_GENMASK(2, 0)
131
132/* ADE9113_REG_MASK0/ADE9113_REG_STATUS0 Bit Definition */
133#define ADE9113_STATUS1X_MSK NO_OS_BIT(7)
134#define ADE9113_STATUS2X_MSK NO_OS_BIT(6)
135#define ADE9113_COM_UP_MSK NO_OS_BIT(4)
136#define ADE9113_CRC_CHG_MSK NO_OS_BIT(3)
137#define ADE9113_SPI_CRC_ERR_MSK NO_OS_BIT(1)
138#define ADE9113_COMFLT_ERR_MSK NO_OS_BIT(0)
139
140/* ADE9113_REG_MASK1/ADE9113_REG_STATUS1 Bit Definition */
141#define ADE9113_V2_WAV_OVRNG_MSK NO_OS_BIT(3)
142#define ADE9113_V1_WAV_OVRNG_MSK NO_OS_BIT(2)
143#define ADE9113_I_WAV_OVRNG_MSK NO_OS_BIT(1)
144#define ADE9113_ADC_SYNC_DONE_MSK NO_OS_BIT(0)
145
146/* ADE9113_REG_MASK2/ADE9113_REG_STATUS2 Bit Definition */
147#define ADE9113_ISO_CLK_STBL_ERR_MSK NO_OS_BIT(6)
148#define ADE9113_ISO_PHY_CRC_ERR_MSK NO_OS_BIT(5)
149#define ADE9113_ISO_EFUSE_MEM_ERR_MSK NO_OS_BIT(4)
150#define ADE9113_ISO_DIG_MOD_V2_OVF_MSK NO_OS_BIT(3)
151#define ADE9113_ISO_DIG_MOD_V1_OVF_MSK NO_OS_BIT(2)
152#define ADE9113_ISO_DIG_MOD_I_OVF_MSK NO_OS_BIT(1)
153#define ADE9113_ISO_TEST_MMR_ERR_MSK NO_OS_BIT(0)
154
155/* ADE9113_REG_CONFIG_ZX Bit Definition */
156#define ADE9113_ZX_EDGE_SEL_MSK NO_OS_GENMASK(3, 2)
157#define ADE9113_ZX_CHANNEL_CONFIG_MSK NO_OS_GENMASK(1, 0)
158
159/* ADE9113_REG_SYNC_SNAP Bit Definition */
160#define ADE9113_PREP_BROADCAST_MSK NO_OS_BIT(2)
161#define ADE9113_ALIGN_MSK NO_OS_BIT(1)
162#define ADE9113_SNAPSHOT_MSK NO_OS_BIT(0)
163
164/* ADE9113_REG_COUNTER_HI Bit Definition */
165#define ADE9113_COUNTER_HI_MSK NO_OS_GENMASK(5, 0)
166
167/* ADE9113_REG_COUNTER_LO Bit Definition */
168#define ADE9113_COUNTER_LO_MSK NO_OS_GENMASK(8, 0)
169
170/* ADE9113_REG_SNAPSHOT_COUNT_HI Bit Definition */
171#define ADE9113_SNAPSHOT_COUNT_HI_MSK NO_OS_GENMASK(5, 0)
172
173/* ADE9113_REG_SNAPSHOT_COUNT_LO Bit Definition */
174#define ADE9113_SNAPSHOT_COUNT_LO_MSK NO_OS_GENMASK(7, 0)
175
176/* ADE9113_REG_STATUS0 Bit Definition */
177#define ADE9113_RESET_DONE_MSK NO_OS_BIT(5)
178#define ADE9113_EFUSE_MEM_ERR_MSK NO_OS_BIT(2)
179
180/* ADE9113_REG_COM_FLT_TYPE Bit Definition */
181#define ADE9113_ISO_STATUS_RD_ECC_ERR_MSK NO_OS_BIT(2)
182#define ADE9113_ISO_PHY_ERR_MSK NO_OS_BIT(1)
183#define ADE9113_ISO_ECC_ERR_MSK NO_OS_BIT(1)
184
185/* ADE9113_REG_CONFIG_CRC Bit Definition */
186#define ADE9113_CRC_DONE_MSK NO_OS_BIT(1)
187#define ADE9113_CRC_FORCE_MSK NO_OS_BIT(0)
188
189/* ADE9113_REG_SILICON_REVISION Bit Definition */
190#define ADE9113_NONISO_CHIP_REV_MSK NO_OS_GENMASK(7, 4)
191#define ADE9113_ISO_CHIP_REV_MSK NO_OS_GENMASK(3, 0)
192
193/* Configuration Register Write Lock */
194#define ADE9113_LOCK_KEY 0XD4
195#define ADE9113_UNLOCK_KEY 0X5E
196
197/* Version Product */
198#define ADE9113_3_CHANNEL_ADE9113 0U
199#define ADE9113_2_CHANNEL_ADE9112 1U
200#define ADE9113_NONISOLATED_ADE9103 3U
201
202/* Nominal reference voltage */
203#define ADE9113_VREF (1249810)
204
210 /* Normal Mode */
212 /* Static Mode */
214 /* Data Increments at ADC Conversion Rate */
216 /* Same as functional mode */
218};
219
225 /* Sinc3, 32KHz Sampling */
227 /* Sinc3, Low-Pass Filter (LPF) Enabled, 32kHz Sampling */
229 /* Sinc3, Compensation Enabled, LPF Enabled, 32KHz Sampling */
231 /* Sinc3, LPF Enabled, 8KHz Sampling */
233 /* Sinc3, Compensation Enabled, LPF Enabled, 8KHz Sampling */
235 /* Sinc3, LPF Enabled, 4kHz Sampling. */
237 /* Sinc3, LPF Enabled, 2kHz Sampling. */
239 /* Sinc3, LPF Enabled, 1kHz Sampling. */
241};
242
248 /* Sawtooth Frequency Rising */
250 /* Sawtooth Frequency Falling */
252 /* Ramp */
254 /* Random Hopping Frequency */
256};
257
263 /* ZX Pin Reflects the Sign of the Input Signal */
265 /* Detect Zero Crossings with Positive Slope */
267 /* Detect Zero Crossings with Negative Slope */
269 /* Detect Zero Crossings with Positive or Negative Slopes */
271};
272
278 /* Disable Zero Crossing Output */
280 /* Output Zero Crossing Function from the I Channel on ZX Pin */
282 /* Output Zero Crossing Function from the V1 Channel on ZX Pin */
284 /* Output Zero Crossing Function from the V2 Channel on ZX Pin */
286};
287
293 /* Long read/write operations */
295 /* Short read/write operations */
297};
298
304 /* I_WAV */
306 /* V1_WAV */
308 /* V1_WAV */
310};
311
312
318 /* Device communication descriptor */
328 void (*drdy_callback)(void *context);
330 uint8_t no_devs;
331};
332
338 /* Device communication descriptor */
340 /* Version product */
341 uint8_t ver_product;
342 /* CRC setting */
343 uint8_t crc_en;
344 /* I_WAV */
345 int32_t *i_wav;
346 /* V1_WAV */
347 int32_t *v1_wav;
348 /* V2_WAV */
349 int32_t *v2_wav;
359 uint8_t no_devs;
360};
361
362/* Read device register. */
363int ade9113_read(struct ade9113_dev *dev, uint8_t reg_addr,
364 uint8_t *reg_data, enum ade9113_operation_e op_mode);
365
366/* Read device register in a daisy-chain setup. */
367int ade9113_read_dc(struct ade9113_dev *dev, uint8_t reg_addr,
368 uint8_t *reg_data);
369
370/* Write device register. */
371int ade9113_write(struct ade9113_dev *dev, uint8_t reg_addr,
372 uint8_t reg_data, enum ade9113_operation_e op_mode);
373
374/* Write device register in a daisy-chain setup. */
375int ade9113_write_dc(struct ade9113_dev *dev, uint8_t reg_addr,
376 uint8_t *reg_data);
377
378/* Initialize the device. */
379int ade9113_init(struct ade9113_dev **device,
381
382/* Remove the device and release resources. */
383int ade9113_remove(struct ade9113_dev *dev);
384
385/* Reset the device using SW reset. */
386int ade9113_sw_reset(struct ade9113_dev *dev);
387
388/* Reset the device using HW reset. */
389int ade9113_hw_reset(struct ade9113_dev *dev);
390
391/* Convert a 24-bit raw sample to millivolts. */
393 uint8_t dev_no, enum ade9113_wav_e ch, int32_t *mv_val);
394
395/* Get STREAM_DBG mode. */
397 enum ade9113_stream_debug_e *stream_dbg);
398
399/* Set STREAM_DBG mode. */
401 enum ade9113_stream_debug_e stream_dbg);
402
403/* Get CRC enable on SPI write setting. */
405 uint8_t *crc_en_state);
406
407/* Set CRC enable on SPI write setting. */
409 uint8_t crc_en_state);
410
411/* Lock device. */
412int ade9113_wr_lock(struct ade9113_dev *dev);
413
414/* Unlock device. */
415int ade9113_wr_unlock(struct ade9113_dev *dev);
416
417/* Write value in the scratchpad register. */
419 uint8_t val);
420
421/* Get the value stired in the scratchpad register. */
423 uint8_t *val);
424
425/* Set normal mode of operation. */
426int ade9113_set_normal_mode(struct ade9113_dev *dev);
427
428/* Set static mode of operation. */
429int ade9113_set_static_mode(struct ade9113_dev *dev);
430
431/* Set static mode of operation. */
433
434/* Get ECC or PHY Error Count on ISO to NONISO Communications. */
435int ade9113_get_err_count(struct ade9113_dev *dev,
436 uint8_t *err_count);
437
438/* Invert V2 channel inputs. */
440
441/* Invert V1 channel inputs. */
443
444/* Invert I channel inputs. */
445int ade9113_invert_i_inputs(struct ade9113_dev *dev);
446
447/* Disable invert V2 channel inputs. */
449
450/* Disable invert V1 channel inputs. */
452
453/* Disable invert I channel inputs. */
455
456/* Set filter bandwidth to 2.7 kHz at 8ksps output data rate. */
457int ade9113_set_lpf_bw_2_7(struct ade9113_dev *dev);
458
459/* Set filter bandwidth to 3.3 kHz at 8ksps output data rate. */
460int ade9113_set_lpf_bw_3_3(struct ade9113_dev *dev);
461
462/* Set digital signal processing configuration. */
463int ade9113_set_dsp_config(struct ade9113_dev *dev,
464 enum ade9113_datapath_config_e config);
465
466/* Enable write access to DC_OFFSET_MODE register. */
468
469/* Disable write access to DC_OFFSET_MODE register. */
471
472/* Get register map CRC. */
473int ade9113_get_crc(struct ade9113_dev *dev, uint16_t *crc);
474
475/* Refresh EFuse Memory. */
476int ade9113_efuse_refresh(struct ade9113_dev *dev);
477
478/* Select EMI frequency hopping. */
479int ade9113_set_emi_config(struct ade9113_dev *dev,
480 enum ade9113_emi_config_e config);
481
482/* Get EMI HI mask. */
483int ade9113_get_emi_hi_mask(struct ade9113_dev *dev, uint8_t *msk);
484
485/* Get EMI LO mask. */
486int ade9113_get_emi_lo_mask(struct ade9113_dev *dev, uint8_t *msk);
487
488/* Set EMI HI mask. */
489int ade9113_set_emi_hi_mask(struct ade9113_dev *dev, uint8_t msk);
490
491/* Set EMI LO mask. */
492int ade9113_set_emi_lo_mask(struct ade9113_dev *dev, uint8_t msk);
493
494/* Get EMI HI limit. */
495int ade9113_get_emi_hi_limit(struct ade9113_dev *dev, uint8_t *limit);
496
497/* Get EMI MID limit. */
498int ade9113_get_emi_mid_limit(struct ade9113_dev *dev, uint8_t *limit);
499
500/* Get EMI LO limit. */
501int ade9113_get_emi_lo_limit(struct ade9113_dev *dev, uint8_t *limit);
502
503/* Enable/Disable interrupt. */
504int ade9113_control_interrupt(struct ade9113_dev *dev, uint8_t reg_addr,
505 uint8_t int_msk, uint8_t en);
506
507/* Enable STATUS1X interrupt. */
509
510/* Disable STATUS1X interrupt. */
512
513/* Enable STATUS2X interrupt. */
515
516/* Disable STATUS2X interrupt. */
518
519/* Enable COM_UP interrupt. */
521
522/* Disable COM_UP interrupt. */
524
525/* Enable CRC_CHG interrupt. */
527
528/* Disable CRC_CHG interrupt. */
530
531/* Enable SPI_CRC_ERR interrupt. */
533
534/* Disable SPI_CRC_ERR interrupt. */
536
537/* Enable COMFLT_ERR interrupt. */
539
540/* Disable COMFLT_ERR interrupt. */
542
543/* Enable V2_WAV_OVRNG interrupt. */
545
546/* Disable V2_WAV_OVRNG interrupt. */
548
549/* Enable V1_WAV_OVRNG interrupt. */
551
552/* Disable V1_WAV_OVRNG interrupt. */
554
555/* Enable I_WAV_OVRNG interrupt. */
557
558/* Disable I_WAV_OVRNG interrupt. */
560
561/* Enable ADC_SYNC_DONE interrupt. */
563
564/* Disable ADC_SYNC_DONE interrupt. */
566
567/* Enable ISO_CLK_STBL_ERR interrupt. */
569
570/* Disable ISO_CLK_STBL_ERR interrupt. */
572
573/* Enable ISO_PHY_CRC_ERR interrupt. */
575
576/* Disable ISO_PHY_CRC_ERR interrupt. */
578
579/* Enable ISO_EFUSE_MEM_ERR interrupt. */
581
582/* Disable ISO_EFUSE_MEM_ERR interrupt. */
584
585/* Enable ISO_DIG_MOD_V2_OVF interrupt. */
587
588/* Disable ISO_DIG_MOD_V2_OVF interrupt. */
590
591/* Enable ISO_DIG_MOD_V1_OVF interrupt. */
593
594/* Disable ISO_DIG_MOD_V1_OVF interrupt. */
596
597/* Enable ISO_DIG_MOD_I_OVF interrupt. */
599
600/* Disable ISO_DIG_MOD_I_OVF interrupt. */
602
603/* Enable ISO_TEST_MMR_ERR interrupt. */
605
606/* Disable ISO_TEST_MMR_ERR interrupt. */
608
609/* Select zero crossing edge. */
611 enum ade9113_zx_edge_sel_e sel);
612
613/* Select zero crossing channel. */
615 enum ade9113_zx_channel_cfg_e cfg);
616
617/* ADC prepare broadcast. */
619
620/* ADC align. */
621int ade9113_adc_align(struct ade9113_dev *dev);
622
623/* ADC snapshot. */
624int ade9113_adc_snapshot(struct ade9113_dev *dev);
625
626/* Get interrupt indicator from STATUS register. */
627int ade9113_get_int_status(struct ade9113_dev *dev, uint8_t addr, uint8_t msk,
628 uint8_t *status);
629
630/* Get STATUSx register value. */
631int ade9113_get_statusx_val(struct ade9113_dev *dev, uint8_t addr,
632 uint8_t *status);
633
634/* Get STATUS1X Indicator. */
635int ade9113_get_status1x(struct ade9113_dev *dev, uint8_t *status);
636
637/* Get STATUS2 indicator. */
638int ade9113_get_status2x(struct ade9113_dev *dev, uint8_t *status);
639
640/* Get RESET_DONE indicator. */
641int ade9113_get_reset_done(struct ade9113_dev *dev, uint8_t *status);
642
643/* Get COM_UP indicator. */
644int ade9113_get_com_up(struct ade9113_dev *dev, uint8_t *status);
645
646/* Get CRC_CHG indicator. */
647int ade9113_get_crc_chg(struct ade9113_dev *dev, uint8_t *status);
648
649/* Get EFUSE_MEM_ERR indicator. */
650int ade9113_get_efuse_mem_err(struct ade9113_dev *dev, uint8_t *status);
651
652/* Get SPI_CRC_ERR indicator. */
653int ade9113_get_spi_crc_err(struct ade9113_dev *dev, uint8_t *status);
654
655/* Get COMFLT_ERR indicator. */
656int ade9113_get_comflt_err(struct ade9113_dev *dev, uint8_t *status);
657
658/* Clear the RESET_DONE int mask. */
660
661/* Clear the COM_UP int mask. */
663
664/* Clear the CRC_CHG int mask. */
666
667/* Clear the SPI_CRC_ERR int mask. */
669
670/* Clear the COMFLT_ERR int mask. */
672
673/* Get V2_WAV_OVRNG indicator. */
674int ade9113_get_v2_wav_ovrng(struct ade9113_dev *dev, uint8_t *status);
675
676/* Clear the V2_WAV_OVRNG int mask. */
678
679/* Get V1_WAV_OVRNG indicator. */
680int ade9113_get_v1_wav_ovrng(struct ade9113_dev *dev, uint8_t *status);
681
682/* Clear the V1_WAV_OVRNG int mask. */
684
685/* Get I_WAV_OVRNG indicator. */
686int ade9113_get_i_wav_ovrng(struct ade9113_dev *dev, uint8_t *status);
687
688/* Clear the I_WAV_OVRNG int mask. */
690
691/* Get ADC_SYNC_DONE indicator. */
692int ade9113_get_adc_sync_done(struct ade9113_dev *dev, uint8_t *status);
693
694/* Clear the ADC_SYNC_DONE int mask. */
696
697/* Get ISO_CLK_STBL_ERR indicator. */
698int ade9113_get_iso_clk_stbl_err(struct ade9113_dev *dev, uint8_t *status);
699
700/* Clear the ISO_CLK_STBL_ERR int mask. */
702
703/* Get ISO_PHY_CRC_ERR indicator. */
704int ade9113_get_iso_phy_crc_err(struct ade9113_dev *dev, uint8_t *status);
705
706/* Clear the ISO_PHY_CRC_ERR int mask. */
708
709/* Get ISO_EFUSE_MEM_ERR indicator. */
710int ade9113_get_iso_efuse_mem_err_err(struct ade9113_dev *dev, uint8_t *status);
711
712/* Clear the ISO_EFUSE_MEM_ERR int mask. */
714
715/* Get ISO_DIG_MOD_V2_OVF indicator. */
716int ade9113_get_iso_dig_mod_v2_ovf(struct ade9113_dev *dev, uint8_t *status);
717
718/* Clear the ISO_DIG_MOD_V2_OVF int mask. */
720
721/* Get ISO_DIG_MOD_V1_OVF indicator. */
722int ade9113_get_iso_dig_mod_v1_ovf(struct ade9113_dev *dev, uint8_t *status);
723
724/* Clear the ISO_DIG_MOD_V1_OVF int mask. */
726
727/* Get ISO_DIG_MOD_I_OVF indicator. */
728int ade9113_get_iso_dig_mod_i_ovf(struct ade9113_dev *dev, uint8_t *status);
729
730/* Clear the ISO_DIG_MOD_I_OVF int mask. */
732
733/* Get ISO_TEST_MMR_ERR indicator. */
734int ade9113_get_iso_test_mmr_err(struct ade9113_dev *dev, uint8_t *status);
735
736/* Clear the ISO_TEST_MMR_ERR int mask. */
738
739/* Get ISO_STATUS_RD_ECC_ERR indicator. */
740int ade9113_get_iso_status_rd_ecc_err(struct ade9113_dev *dev, uint8_t *status);
741
742/* Get ISO_PHY_ERR indicator. */
743int ade9113_get_iso_phy_err(struct ade9113_dev *dev, uint8_t *status);
744
745/* Get ISO_ECC_ERR indicator. */
746int ade9113_get_iso_ecc_err(struct ade9113_dev *dev, uint8_t *status);
747
748/* Get CRC_DONE indicator. */
749int ade9113_get_crc_done_flag(struct ade9113_dev *dev, uint8_t *status);
750
751/* Clear the CRC_DONE int mask. */
753
754/* Force background register map CRC recalculation. */
756
757/* Get SILICON_REVISION value. */
758int ade9113_get_silicon_revision(struct ade9113_dev *dev, uint8_t *silicon_rev);
759
760/* Get VERSION_PRODUCT value. */
761int ade9113_get_version_product(struct ade9113_dev *dev, uint8_t *ver_product);
762
763/* Get wave value. */
764int ade9113_get_wav(struct ade9113_dev *dev, enum ade9113_wav_e selection,
765 uint32_t *val);
766
767/* DRDY inerrupt enable. */
768int ade9113_drdy_int_enable(struct ade9113_dev *dev);
769
770/* DRDY inerrupt disable. */
772
773#endif // __ADE9113_H__
struct ad7616_init_param init_param
Definition ad7616_sdz.c:107
int ade9113_disable_com_up_int(struct ade9113_dev *dev)
Disable COM_UP interrupt.
Definition ade9113.c:1379
int ade9113_disable_iso_dig_mod_i_ovf_int(struct ade9113_dev *dev)
Disable ISO_DIG_MOD_I_OVF interrupt.
Definition ade9113.c:1743
int ade9113_get_crc(struct ade9113_dev *dev, uint16_t *crc)
Get register map CRC.
Definition ade9113.c:1138
int ade9113_enable_iso_phy_crc_err_int(struct ade9113_dev *dev)
Enable ISO_PHY_CRC_ERR interrupt.
Definition ade9113.c:1617
int ade9113_clear_crc_done_int(struct ade9113_dev *dev)
Clear the CRC_DONE int mask.
Definition ade9113.c:2387
int ade9113_efuse_refresh(struct ade9113_dev *dev)
Refresh EFuse Memory.
Definition ade9113.c:1163
int ade9113_disable_spi_crc_err_int(struct ade9113_dev *dev)
Disable SPI_CRC_ERR interrupt.
Definition ade9113.c:1435
int ade9113_get_iso_phy_err(struct ade9113_dev *dev, uint8_t *status)
Get ISO_PHY_ERR indicator.
Definition ade9113.c:2349
int ade9113_clear_iso_clk_stbl_err_int(struct ade9113_dev *dev)
Clear the ISO_CLK_STBL_ERR int mask.
Definition ade9113.c:2180
int ade9113_adc_align(struct ade9113_dev *dev)
ADC align.
Definition ade9113.c:1839
int ade9113_disable_adc_sync_done_int(struct ade9113_dev *dev)
Disable ADC_SYNC_DONE interrupt.
Definition ade9113.c:1575
ade9113_datapath_config_e
ADE9113 digital signal processing configuration.
Definition ade9113.h:224
@ ADE9113_SINC3_COMP_EN_LPF_EN_32_KHZ_SAMPLING
Definition ade9113.h:230
@ ADE9113_SINC3_LPF_EN_2_KHZ_SAMPLING
Definition ade9113.h:238
@ ADE9113_SINC3_LPF_EN_1_KHZ_SAMPLING
Definition ade9113.h:240
@ ADE9113_SINC3_COMP_EN_LPF_EN_8_KHZ_SAMPLING
Definition ade9113.h:234
@ ADE9113_SINC3_LPF_EN_4_KHZ_SAMPLING
Definition ade9113.h:236
@ ADE9113_SINC3_32_KHZ_SAMPLING
Definition ade9113.h:226
@ ADE9113_SINC3_LPF_EN_8_KHZ_SAMPLING
Definition ade9113.h:232
@ ADE9113_SINC3_LPF_EN_32_KHZ_SAMPLING
Definition ade9113.h:228
int ade9113_get_iso_ecc_err(struct ade9113_dev *dev, uint8_t *status)
Get ISO_ECC_ERR indicator.
Definition ade9113.c:2362
int ade9113_clear_comflt_err_int(struct ade9113_dev *dev)
Clear the COMFLT_ERR int mask.
Definition ade9113.c:2061
int ade9113_get_com_up(struct ade9113_dev *dev, uint8_t *status)
Get COM_UP indicator.
Definition ade9113.c:1957
int ade9113_get_comflt_err(struct ade9113_dev *dev, uint8_t *status)
Get COMFLT_ERR indicator.
Definition ade9113.c:2006
int ade9113_clear_iso_efuse_mem_err_int(struct ade9113_dev *dev)
Clear the ISO_EFUSE_MEM_ERR int mask.
Definition ade9113.c:2228
int ade9113_disable_i_wav_ovrng_int(struct ade9113_dev *dev)
Disable I_WAV_OVRNG interrupt.
Definition ade9113.c:1547
int ade9113_disable_comflt_err_int(struct ade9113_dev *dev)
Disable COMFLT_ERR interrupt.
Definition ade9113.c:1463
int ade9113_read(struct ade9113_dev *dev, uint8_t reg_addr, uint8_t *reg_data, enum ade9113_operation_e op_mode)
Read device register.
Definition ade9113.c:56
int ade9113_convert_to_millivolts(struct ade9113_dev *dev, uint8_t dev_no, enum ade9113_wav_e ch, int32_t *mv_val)
Convert a 24-bit raw sample to millivolts.
Definition ade9113.c:712
int ade9113_select_zero_crossing_channel(struct ade9113_dev *dev, enum ade9113_zx_channel_cfg_e cfg)
Select zero crossing channel.
Definition ade9113.c:1805
int ade9113_enable_iso_dig_mod_i_ovf_int(struct ade9113_dev *dev)
Enable ISO_DIG_MOD_I_OVF interrupt.
Definition ade9113.c:1729
int ade9113_clear_iso_dig_mod_i_ovf_int(struct ade9113_dev *dev)
Clear the ISO_DIG_MOD_I_OVF int mask.
Definition ade9113.c:2300
int ade9113_get_int_status(struct ade9113_dev *dev, uint8_t addr, uint8_t msk, uint8_t *status)
Get interrupt indicator from STATUS register.
Definition ade9113.c:1872
int ade9113_disable_iso_test_mmr_err_int(struct ade9113_dev *dev)
Disable ISO_TEST_MMR_ERR interrupt.
Definition ade9113.c:1771
int ade9113_write_scratchpad(struct ade9113_dev *dev, uint8_t val)
Write value in the scratchpad register.
Definition ade9113.c:882
int ade9113_clear_i_wav_ovrng_int(struct ade9113_dev *dev)
Clear the I_WAV_OVRNG int mask.
Definition ade9113.c:2132
int ade9113_enable_v1_wav_ovrng_int(struct ade9113_dev *dev)
Enable V1_WAV_OVRNG interrupt.
Definition ade9113.c:1505
int ade9113_invert_i_inputs(struct ade9113_dev *dev)
Invert I channel inputs.
Definition ade9113.c:1002
int ade9113_disable_iso_clk_stbl_err_int(struct ade9113_dev *dev)
Disable ISO_CLK_STBL_ERR interrupt.
Definition ade9113.c:1603
int ade9113_get_err_count(struct ade9113_dev *dev, uint8_t *err_count)
Get ECC or PHY Error Count on ISO to NONISO Communications.
Definition ade9113.c:960
int ade9113_set_normal_mode(struct ade9113_dev *dev)
Set normal mode of operation.
Definition ade9113.c:920
ade9113_emi_config_e
ADE9113 EMI Frequency Hopping Selection.
Definition ade9113.h:247
@ ADE9113_RAMP
Definition ade9113.h:253
@ ADE9113_SAWTOOTH_FREQUENCY_FALLING
Definition ade9113.h:251
@ ADE9113_SAWTOOTH_FREQUENCY_RISING
Definition ade9113.h:249
@ ADE9113_RANDOM_HOPPING_FREQUENCY
Definition ade9113.h:255
int ade9113_get_status2x(struct ade9113_dev *dev, uint8_t *status)
Get STATUS2 indicator.
Definition ade9113.c:1933
int ade9113_get_silicon_revision(struct ade9113_dev *dev, uint8_t *silicon_rev)
Get SILICON_REVISION value.
Definition ade9113.c:2416
int ade9113_set_data_increments_mode(struct ade9113_dev *dev)
Set data increments mode of operation.
Definition ade9113.c:946
int ade9113_set_static_mode(struct ade9113_dev *dev)
Set static mode of operation.
Definition ade9113.c:933
int ade9113_enable_wa_dc_offset_mode(struct ade9113_dev *dev)
Enable write access to DC_OFFSET_MODE register.
Definition ade9113.c:1108
int ade9113_disable_status1x_int(struct ade9113_dev *dev)
Disable STATUS1X interrupt.
Definition ade9113.c:1323
int ade9113_get_emi_lo_mask(struct ade9113_dev *dev, uint8_t *msk)
Get EMI LO mask.
Definition ade9113.c:1208
int ade9113_enable_iso_clk_stbl_err_int(struct ade9113_dev *dev)
Enable ISO_CLK_STBL_ERR interrupt.
Definition ade9113.c:1589
int ade9113_invert_i_inputs_disable(struct ade9113_dev *dev)
Disable invert I channel inputs.
Definition ade9113.c:1046
int ade9113_enable_iso_efuse_mem_err_int(struct ade9113_dev *dev)
Enable ISO_EFUSE_MEM_ERR interrupt.
Definition ade9113.c:1645
int ade9113_get_iso_status_rd_ecc_err(struct ade9113_dev *dev, uint8_t *status)
Get ISO_STATUS_RD_ECC_ERR indicator.
Definition ade9113.c:2336
int ade9113_disable_iso_dig_mod_v1_ovf_int(struct ade9113_dev *dev)
Disable ISO_DIG_MOD_V1_OVF interrupt.
Definition ade9113.c:1715
int ade9113_clear_com_up_int(struct ade9113_dev *dev)
Clear the COM_UP int mask.
Definition ade9113.c:2028
int ade9113_force_crc_recalculation(struct ade9113_dev *dev)
Force background register map CRC recalculation.
Definition ade9113.c:2401
int ade9113_clear_iso_phy_crc_err_int(struct ade9113_dev *dev)
Clear the ISO_PHY_CRC_ERR int mask.
Definition ade9113.c:2204
int ade9113_enable_com_up_int(struct ade9113_dev *dev)
Enable COM_UP interrupt.
Definition ade9113.c:1365
int ade9113_get_iso_clk_stbl_err(struct ade9113_dev *dev, uint8_t *status)
Get ISO_CLK_STBL_ERR indicator.
Definition ade9113.c:2168
int ade9113_set_stream_dbg_mode(struct ade9113_dev *dev, enum ade9113_stream_debug_e stream_dbg)
Set STREAM_DBG mode.
Definition ade9113.c:784
int ade9113_invert_v1_inputs_disable(struct ade9113_dev *dev)
Disable invert V1 channel inputs.
Definition ade9113.c:1031
int ade9113_set_emi_config(struct ade9113_dev *dev, enum ade9113_emi_config_e config)
Select EMI frequency hopping.
Definition ade9113.c:1178
int ade9113_get_v1_wav_ovrng(struct ade9113_dev *dev, uint8_t *status)
Get V1_WAV_OVRNG indicator.
Definition ade9113.c:2097
int ade9113_get_efuse_mem_err(struct ade9113_dev *dev, uint8_t *status)
Get EFUSE_MEM_ERR indicator.
Definition ade9113.c:1981
int ade9113_remove(struct ade9113_dev *dev)
Remove the device and release resources.
Definition ade9113.c:614
ade9113_zx_edge_sel_e
ADE9113 Zero Crossing Edge Select.
Definition ade9113.h:262
@ ADE9113_ZX_DETECT_NEGATIVE_SLOPE
Definition ade9113.h:268
@ ADE9113_ZX_DETECT_POSITIVE_SLOPE
Definition ade9113.h:266
@ ADE9113_ZX_DETECT_BOTH_SLOPES
Definition ade9113.h:270
@ ADE9113_ZX_INPUT_SIGNAL_SIGN
Definition ade9113.h:264
int ade9113_get_spi_crc_err(struct ade9113_dev *dev, uint8_t *status)
Get SPI_CRC_ERR indicator.
Definition ade9113.c:1994
int ade9113_write(struct ade9113_dev *dev, uint8_t reg_addr, uint8_t reg_data, enum ade9113_operation_e op_mode)
Write device register.
Definition ade9113.c:274
int ade9113_wr_lock(struct ade9113_dev *dev)
Lock device.
Definition ade9113.c:854
int ade9113_enable_adc_sync_done_int(struct ade9113_dev *dev)
Enable ADC_SYNC_DONE interrupt.
Definition ade9113.c:1561
int ade9113_get_iso_efuse_mem_err_err(struct ade9113_dev *dev, uint8_t *status)
Get ISO_EFUSE_MEM_ERR indicator.
Definition ade9113.c:2216
int ade9113_enable_iso_test_mmr_err_int(struct ade9113_dev *dev)
Enable ISO_TEST_MMR_ERR interrupt.
Definition ade9113.c:1757
int ade9113_get_iso_dig_mod_v2_ovf(struct ade9113_dev *dev, uint8_t *status)
Get ISO_DIG_MOD_V2_OVF indicator.
Definition ade9113.c:2240
int ade9113_clear_iso_dig_mod_v2_ovf_int(struct ade9113_dev *dev)
Clear the ISO_DIG_MOD_V2_OVF int mask.
Definition ade9113.c:2252
int ade9113_disable_crc_chg_int(struct ade9113_dev *dev)
Disable CRC_CHG interrupt.
Definition ade9113.c:1407
int ade9113_read_dc(struct ade9113_dev *dev, uint8_t reg_addr, uint8_t *reg_data)
Read device register in a daisy-chain setup.
Definition ade9113.c:159
int ade9113_disable_status2x_int(struct ade9113_dev *dev)
Disable STATUS2X interrupt.
Definition ade9113.c:1351
int ade9113_get_crc_done_flag(struct ade9113_dev *dev, uint8_t *status)
Get CRC_DONE indicator.
Definition ade9113.c:2375
int ade9113_enable_iso_dig_mod_v2_ovf_int(struct ade9113_dev *dev)
Enable ISO_DIG_MOD_V2_OVF interrupt.
Definition ade9113.c:1673
int ade9113_clear_iso_test_mmr_err_int(struct ade9113_dev *dev)
Clear the ISO_TEST_MMR_ERR int mask.
Definition ade9113.c:2324
int ade9113_clear_reset_done_int(struct ade9113_dev *dev)
Clear the RESET_DONE int mask.
Definition ade9113.c:2017
int ade9113_enable_crc_chg_int(struct ade9113_dev *dev)
Enable CRC_CHG interrupt.
Definition ade9113.c:1393
int ade9113_get_iso_dig_mod_i_ovf(struct ade9113_dev *dev, uint8_t *status)
Get ISO_DIG_MOD_I_OVF indicator.
Definition ade9113.c:2288
int ade9113_disable_wa_dc_offset_mode(struct ade9113_dev *dev)
Disable write access to DC_OFFSET_MODE register.
Definition ade9113.c:1122
int ade9113_set_dsp_config(struct ade9113_dev *dev, enum ade9113_datapath_config_e config)
Set digital signal processing configuration.
Definition ade9113.c:1089
int ade9113_get_iso_phy_crc_err(struct ade9113_dev *dev, uint8_t *status)
Get ISO_PHY_CRC_ERR indicator.
Definition ade9113.c:2192
int ade9113_get_v2_wav_ovrng(struct ade9113_dev *dev, uint8_t *status)
Get V2_WAV_OVRNG indicator.
Definition ade9113.c:2073
int ade9113_disable_v1_wav_ovrng_int(struct ade9113_dev *dev)
Disable V1_WAV_OVRNG interrupt.
Definition ade9113.c:1519
int ade9113_clear_adc_sync_done_int(struct ade9113_dev *dev)
Clear the ADC_SYNC_DONE int mask.
Definition ade9113.c:2156
int ade9113_enable_status2x_int(struct ade9113_dev *dev)
Enable STATUS2X interrupt.
Definition ade9113.c:1337
int ade9113_get_i_wav_ovrng(struct ade9113_dev *dev, uint8_t *status)
Get I_WAV_OVRNG indicator.
Definition ade9113.c:2121
int ade9113_disable_iso_dig_mod_v2_ovf_int(struct ade9113_dev *dev)
Disable ISO_DIG_MOD_V2_OVF interrupt.
Definition ade9113.c:1687
int ade9113_enable_spi_crc_err_int(struct ade9113_dev *dev)
Enable SPI_CRC_ERR interrupt.
Definition ade9113.c:1421
ade9113_stream_debug_e
ADE9113 Stream Debug.
Definition ade9113.h:209
@ ADE9113_STREAM_FUNCTIONAL_MODE
Definition ade9113.h:217
@ ADE9113_STREAM_STATIC_MODE
Definition ade9113.h:213
@ ADE9113_STREAM_NORMAL_MODE
Definition ade9113.h:211
@ ADE9113_STREAM_INCREMENTS_MODE
Definition ade9113.h:215
int ade9113_clear_v2_wav_ovrng_int(struct ade9113_dev *dev)
Clear the V2_WAV_OVRNG int mask.
Definition ade9113.c:2085
int ade9113_get_iso_dig_mod_v1_ovf(struct ade9113_dev *dev, uint8_t *status)
Get ISO_DIG_MOD_V1_OVF indicator.
Definition ade9113.c:2264
int ade9113_enable_status1x_int(struct ade9113_dev *dev)
Enable STATUS1X interrupt.
Definition ade9113.c:1309
ade9113_zx_channel_cfg_e
ADE9113 Zero Crossing Channel Select.
Definition ade9113.h:277
@ ADE9113_ZX_I_SEL
Definition ade9113.h:281
@ ADE9113_ZX_DISABLE
Definition ade9113.h:279
@ ADE9113_ZX_V1_SEL
Definition ade9113.h:283
@ ADE9113_ZX_V2_SEL
Definition ade9113.h:285
int ade9113_clear_crc_chg_int(struct ade9113_dev *dev)
Clear the CRC_CHG int mask.
Definition ade9113.c:2039
ade9113_operation_e
ADE9113 long/short operation mode.
Definition ade9113.h:292
@ ADE9113_S_OP
Definition ade9113.h:296
@ ADE9113_L_OP
Definition ade9113.h:294
int ade9113_get_wav(struct ade9113_dev *dev, enum ade9113_wav_e selection, uint32_t *val)
Get wave value.
Definition ade9113.c:2470
int ade9113_invert_v2_inputs_disable(struct ade9113_dev *dev)
Disable invert V2 channel inputs.
Definition ade9113.c:1016
int ade9113_enable_v2_wav_ovrng_int(struct ade9113_dev *dev)
Enable V2_WAV_OVRNG interrupt.
Definition ade9113.c:1477
int ade9113_get_version_product(struct ade9113_dev *dev, uint8_t *ver_product)
Get VERSION_PRODUCT value.
Definition ade9113.c:2431
int ade9113_get_emi_lo_limit(struct ade9113_dev *dev, uint8_t *limit)
Get EMI LO limit.
Definition ade9113.c:1278
int ade9113_get_emi_hi_mask(struct ade9113_dev *dev, uint8_t *msk)
Get EMI HI mask.
Definition ade9113.c:1194
int ade9113_get_adc_sync_done(struct ade9113_dev *dev, uint8_t *status)
Get ADC_SYNC_DONE indicator.
Definition ade9113.c:2144
int ade9113_set_crc_en_state(struct ade9113_dev *dev, uint8_t crc_en_state)
Set CRC enable on SPI write setting.
Definition ade9113.c:829
int ade9113_clear_spi_crc_err_int(struct ade9113_dev *dev)
Clear the SPI_CRC_ERR int mask.
Definition ade9113.c:2050
int ade9113_sw_reset(struct ade9113_dev *dev)
Reset the device using SW reset.
Definition ade9113.c:645
int ade9113_get_statusx_val(struct ade9113_dev *dev, uint8_t addr, uint8_t *status)
Get STATUSx register value.
Definition ade9113.c:1897
int ade9113_init(struct ade9113_dev **device, struct ade9113_init_param init_param)
Initialize the device.
Definition ade9113.c:388
int ade9113_select_zero_crossing_edge(struct ade9113_dev *dev, enum ade9113_zx_edge_sel_e sel)
Select zero crossing edge.
Definition ade9113.c:1786
int ade9113_get_emi_hi_limit(struct ade9113_dev *dev, uint8_t *limit)
Get EMI HI limit.
Definition ade9113.c:1250
int ade9113_disable_iso_phy_crc_err_int(struct ade9113_dev *dev)
Disable ISO_PHY_CRC_ERR interrupt.
Definition ade9113.c:1631
int ade9113_get_iso_test_mmr_err(struct ade9113_dev *dev, uint8_t *status)
Get ISO_TEST_MMR_ERR indicator.
Definition ade9113.c:2312
int ade9113_enable_i_wav_ovrng_int(struct ade9113_dev *dev)
Enable I_WAV_OVRNG interrupt.
Definition ade9113.c:1533
int ade9113_clear_v1_wav_ovrng_int(struct ade9113_dev *dev)
Clear the V1_WAV_OVRNG int mask.
Definition ade9113.c:2109
ade9113_wav_e
ADE9113 waveorm data.
Definition ade9113.h:303
@ ADE9113_V1_WAV
Definition ade9113.h:307
@ ADE9113_V2_WAV
Definition ade9113.h:309
@ ADE9113_I_WAV
Definition ade9113.h:305
int ade9113_get_crc_chg(struct ade9113_dev *dev, uint8_t *status)
Get CRC_CHG indicator.
Definition ade9113.c:1969
int ade9113_wr_unlock(struct ade9113_dev *dev)
Unlock device.
Definition ade9113.c:867
int ade9113_adc_snapshot(struct ade9113_dev *dev)
ADC snapshot.
Definition ade9113.c:1854
int ade9113_adc_prepare_broadcast(struct ade9113_dev *dev)
ADC prepare broadcast.
Definition ade9113.c:1824
int ade9113_invert_v2_inputs(struct ade9113_dev *dev)
Invert V2 channel inputs.
Definition ade9113.c:974
int ade9113_invert_v1_inputs(struct ade9113_dev *dev)
Invert V1 channel inputs.
Definition ade9113.c:988
int ade9113_write_dc(struct ade9113_dev *dev, uint8_t reg_addr, uint8_t *reg_data)
Write device register in a daisy-chain setup.
Definition ade9113.c:299
int ade9113_read_scratchpad(struct ade9113_dev *dev, uint8_t *val)
Get the value stired in the scratchpad register.
Definition ade9113.c:897
int ade9113_get_reset_done(struct ade9113_dev *dev, uint8_t *status)
Get RESET_DONE indicator.
Definition ade9113.c:1945
int ade9113_set_emi_hi_mask(struct ade9113_dev *dev, uint8_t msk)
Set EMI HI mask.
Definition ade9113.c:1222
int ade9113_get_crc_en_state(struct ade9113_dev *dev, uint8_t *crc_en_state)
Get CRC enable on SPI write setting.
Definition ade9113.c:800
int ade9113_enable_iso_dig_mod_v1_ovf_int(struct ade9113_dev *dev)
Enable ISO_DIG_MOD_V1_OVF interrupt.
Definition ade9113.c:1701
int ade9113_get_stream_dbg_mode(struct ade9113_dev *dev, enum ade9113_stream_debug_e *stream_dbg)
Get STREAM_DBG mode.
Definition ade9113.c:747
int ade9113_enable_comflt_err_int(struct ade9113_dev *dev)
Enable COMFLT_ERR interrupt.
Definition ade9113.c:1449
int ade9113_disable_iso_efuse_mem_err_int(struct ade9113_dev *dev)
Disable ISO_EFUSE_MEM_ERR interrupt.
Definition ade9113.c:1659
int ade9113_set_lpf_bw_3_3(struct ade9113_dev *dev)
Set filter bandwidth to 3.3 kHz at 8ksps output data rate.
Definition ade9113.c:1074
int ade9113_set_lpf_bw_2_7(struct ade9113_dev *dev)
Set filter bandwidth to 2.7 kHz at 8ksps output data rate.
Definition ade9113.c:1060
int ade9113_get_emi_mid_limit(struct ade9113_dev *dev, uint8_t *limit)
Get EMI MID limit.
Definition ade9113.c:1264
int ade9113_set_emi_lo_mask(struct ade9113_dev *dev, uint8_t msk)
Set EMI LO mask.
Definition ade9113.c:1236
int ade9113_clear_iso_dig_mod_v1_ovf_int(struct ade9113_dev *dev)
Clear the ISO_DIG_MOD_V1_OVF int mask.
Definition ade9113.c:2276
int ade9113_hw_reset(struct ade9113_dev *dev)
Reset the device using SW reset.
Definition ade9113.c:674
int ade9113_drdy_int_enable(struct ade9113_dev *dev)
DRDY inerrupt enable.
Definition ade9113.c:2516
int ade9113_drdy_int_disable(struct ade9113_dev *dev)
DRDY inerrupt disable.
Definition ade9113.c:2526
int ade9113_disable_v2_wav_ovrng_int(struct ade9113_dev *dev)
Disable V2_WAV_OVRNG interrupt.
Definition ade9113.c:1491
int ade9113_control_interrupt(struct ade9113_dev *dev, uint8_t reg_addr, uint8_t int_msk, uint8_t en)
Enable/disable interrupt.
Definition ade9113.c:1294
int ade9113_get_status1x(struct ade9113_dev *dev, uint8_t *status)
Get STATUS1 indicator.
Definition ade9113.c:1921
Header file of GPIO Interface.
Header file of IRQ interface.
Header file of SPI Interface.
Header file of utility functions.
ADE9113 Device structure.
Definition ade9113.h:337
int32_t * v2_wav
Definition ade9113.h:349
struct no_os_gpio_desc * gpio_reset
Definition ade9113.h:353
int32_t * v1_wav
Definition ade9113.h:347
int32_t * i_wav
Definition ade9113.h:345
struct no_os_spi_desc * spi_desc
Definition ade9113.h:339
struct no_os_callback_desc irq_cb
Definition ade9113.h:357
struct no_os_gpio_desc * gpio_rdy
Definition ade9113.h:351
uint8_t ver_product
Definition ade9113.h:341
uint8_t crc_en
Definition ade9113.h:343
uint8_t no_devs
Definition ade9113.h:359
struct no_os_irq_ctrl_desc * irq_ctrl
Definition ade9113.h:355
ADE9113 Device initialization parameters.
Definition ade9113.h:317
uint8_t no_devs
Definition ade9113.h:330
void(* drdy_callback)(void *context)
Definition ade9113.h:328
struct no_os_irq_ctrl_desc * irq_ctrl
Definition ade9113.h:325
struct no_os_gpio_init_param * gpio_rdy
Definition ade9113.h:321
struct no_os_gpio_init_param * gpio_reset
Definition ade9113.h:323
struct no_os_spi_init_param * spi_init
Definition ade9113.h:319
Definition ad9361_util.h:63
Structure describing a callback to be registered.
Definition no_os_irq.h:136
Structure holding the GPIO descriptor.
Definition no_os_gpio.h:84
Structure holding the parameters for GPIO initialization.
Definition no_os_gpio.h:67
Definition no_os_irq.h:117
Structure holding SPI descriptor.
Definition no_os_spi.h:180
Structure holding the parameters for SPI initialization.
Definition no_os_spi.h:128