no-OS
pqlib_example.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * @file pqlib_example.h
3  * @brief Header file for pqlib display example functions
4  * @author Robert Budai (robert.budai@analog.com)
5  ********************************************************************************
6  * Copyright (c) 2024 Analog Devices, Inc.
7  *
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions are met:
12  * - Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  * - Redistributions in binary form must reproduce the above copyright
15  * notice, this list of conditions and the following disclaimer in
16  * the documentation and/or other materials provided with the
17  * distribution.
18  * - Neither the name of Analog Devices, Inc. nor the names of its
19  * contributors may be used to endorse or promote products derived
20  * from this software without specific prior written permission.
21  * - The use of this software may or may not infringe the patent rights
22  * of one or more patent holders. This license does not release you
23  * from the requirement that you obtain separate licenses from these
24  * patent holders to use this software.
25  * - Use of the software either in source or binary form, must be run
26  * on or directly connected to an Analog Devices Inc. component.
27  *
28  * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
29  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
30  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
31  * IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
32  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33  * LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
34  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
35  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38  *******************************************************************************/
39 
40 #ifndef __PQLIB_EXAMPLE_H__
41 #define __PQLIB_EXAMPLE_H__
42 
43 /******************************************************************************/
44 /***************************** Include Files **********************************/
45 /******************************************************************************/
46 
47 #include "ade9430.h"
48 #include "adi_pqlib.h"
49 #include "adi_pqlib_memory.h"
50 #include "adi_pqlib_profile.h"
51 #include "pqlib_convert.h"
52 #include "status.h"
53 #include <stddef.h>
54 #include "no_os_circular_buffer.h"
55 
56 /******************************************************************************/
57 /********************** Macros and Constants Definitions **********************/
58 /******************************************************************************/
59 
60 #define PQLIB_MAX_CHANNELS 7
61 #define ADI_PQLIB_NUM_WAVEFORM_BLOCKS 4
62 #define PQLIB_MAX_HARMONICS 50
63 #define PQLIB_MAX_INTER_HARMONICS 50
64 #define SIZE_OF_INPUT_RTC 19
65 
70 typedef enum {
74 } PQLIB_STATE;
75 
80 typedef enum {
87 
91 typedef struct {
95  uint8_t harmonics[PQLIB_MAX_HARMONICS];
96  uint8_t interHarmonics[PQLIB_MAX_INTER_HARMONICS];
97  uint8_t maxHarmonics;
99  uint8_t rtcBuff[SIZE_OF_INPUT_RTC];
100  uint16_t currentCorrCoef[PQLIB_MAX_HARMONICS];
101  uint16_t voltageCorrCoef[PQLIB_MAX_HARMONICS];
106  uint32_t cyclesToRun;
108  uint32_t correction;
110  uint64_t syncTime;
125  float inputCurrentCorrCoef50Hz[PQLIB_MAX_HARMONICS];
126  float inputVoltageCorrCoef50Hz[PQLIB_MAX_HARMONICS];
127  float inputCurrentCorrCoef60Hz[PQLIB_MAX_HARMONICS];
128  float inputVoltageCorrCoef60Hz[PQLIB_MAX_HARMONICS];
129  char *pEnabledChannels[PQLIB_MAX_CHANNELS];
130  ADI_PQLIB_REF_CHANNEL refChannel;
131  ADI_PQLIB_CORR_COEF correctionData;
132  ADI_PQLIB_FLICKER_MODEL flickerModel;
133  ADI_PQLIB_PHASE_MAP phaseMap;
135 
136 } EXAMPLE_CONFIG; // pqlib example config
137 
138 typedef struct {
139 
143  uint16_t syncCycles;
144  uint32_t processedCycles;
146  uint32_t timeOutCount;
147  uint32_t pqlibStateMemory[ADI_PQLIB_STATE_MEM_NUM_BYTES / 4];
148  uint32_t pqlibTempMemory[ADI_PQLIB_TEMP_MEM_NUM_BYTES / 4];
150  char *pChannel;
151  ADI_PQLIB_HANDLE hDevice;
152  ADI_PQLIB_CONFIG config;
153  ADI_PQLIB_CYCLE_INPUT inputCycle;
154  ADI_PQLIB_1012_CYCLE_INPUT input1012Cycles;
155  ADI_PQLIB_WAVEFORM inputWaveform;
157  ADI_PQLIB_OUTPUT *output;
158  ADI_PQLIB_PHASE_MAP channelMap;
161 
162 } PQLIB_EXAMPLE; // pqlib example struct
163 
164 /******************************************************************************/
165 /************************ Functions Declarations ******************************/
166 /******************************************************************************/
167 
173 int pqm_one_cycle(void);
174 
183 int process_pqlib_error(PQLIB_EXAMPLE *pExample,
184  ADI_PQLIB_RESULT pqlibStatus);
185 
191 int open_pqlib(PQLIB_EXAMPLE *pExample);
192 
203 int SyncLibTime(PQLIB_EXAMPLE *pExample, bool checkRtcTime);
204 
215 int config_measurement(PQLIB_EXAMPLE *pExample);
216 
223 void set_default_config(EXAMPLE_CONFIG *pConfig);
224 
233 void populate_event_config(EXAMPLE_CONFIG *pExampleConfig);
234 
249 int cpy_correction_coeffs(ADI_PQLIB_NOMINAL_FREQUENCY nominalFrequency,
250  ADI_PQLIB_CORR_COEF *pCorrCoef);
251 
266  ADI_PQLIB_RESULT pqlibStatus);
267 
274 void SyncToDip(PQLIB_EXAMPLE *pExample, ADI_PQLIB_RESULT pqlibStatus);
275 
277 
283 int pqm_measurement_init(void);
284 
293 int pqm_start_measurement(bool waitingForSync);
294 
310 
311 #endif /* __PQLIB_EXAMPLE_H__ */
EXAMPLE_CONFIG::msvCarrierFrequency
float msvCarrierFrequency
Definition: pqlib_example.h:120
EXAMPLE_CONFIG::msvThreshold
float msvThreshold
Definition: pqlib_example.h:119
PQLIB_EXAMPLE::inputWaveform
ADI_PQLIB_WAVEFORM inputWaveform
Definition: pqlib_example.h:155
EXAMPLE_CONFIG::dipThreshold
float dipThreshold
Definition: pqlib_example.h:111
EXAMPLE_CONFIG::useExternalTimestamp
bool useExternalTimestamp
Definition: pqlib_example.h:94
pqm_start_measurement
int pqm_start_measurement(bool waitingForSync)
Starts Power Quality measurement as per configured cycles.
Definition: pqlib_example.c:74
EXAMPLE_CONFIG::voltageCorrCoef
uint16_t voltageCorrCoef[PQLIB_MAX_HARMONICS]
Definition: pqlib_example.h:101
EXAMPLE_CONFIG::correction
uint32_t correction
Definition: pqlib_example.h:108
ade9430.h
Header file of ADE9430 Driver.
set_default_config
void set_default_config(EXAMPLE_CONFIG *pConfig)
Sets default configuration of the example as floating points Note that this function doesn't configur...
Definition: pqlib_example.c:484
cpy_correction_coeffs
int cpy_correction_coeffs(ADI_PQLIB_NOMINAL_FREQUENCY nominalFrequency, ADI_PQLIB_CORR_COEF *pCorrCoef)
Copies the user provided correction factors to the interface structure. This shows how floating point...
Definition: pqlib_example.c:303
EXAMPLE_CONFIG::enableRTCSync
bool enableRTCSync
Definition: pqlib_example.h:92
PQLIB_EXAMPLE::input1012Cycles
ADI_PQLIB_1012_CYCLE_INPUT input1012Cycles
Definition: pqlib_example.h:154
pqm_one_cycle
int pqm_one_cycle(void)
One complete cycle for IIO callback function.
Definition: pqlib_example.c:123
SYS_STATUS_PQLIB_RUNNING
#define SYS_STATUS_PQLIB_RUNNING
Definition: status.h:50
config_measurement
int config_measurement(PQLIB_EXAMPLE *pExample)
Configures AFE and the library . This serves as an example on how to call APIs adi_pqlib_SetConfig an...
Definition: pqlib_example.c:152
EXAMPLE_CONFIG::refChannel
ADI_PQLIB_REF_CHANNEL refChannel
Definition: pqlib_example.h:130
EXAMPLE_CONFIG::numCorrCoefVoltage60Hz
uint16_t numCorrCoefVoltage60Hz
Definition: pqlib_example.h:105
EXAMPLE_CONFIG::rvcHysteresis
float rvcHysteresis
Definition: pqlib_example.h:118
EXAMPLE_CONFIG::numCorrCoefCurrent50Hz
uint16_t numCorrCoefCurrent50Hz
Definition: pqlib_example.h:102
VCONSEL_4W_DELTA_VA_VB_VC
@ VCONSEL_4W_DELTA_VA_VB_VC
Definition: pqlib_example.h:85
afe_read_version
int afe_read_version(uint32_t *pVersion)
reads AFE version.
Definition: afe_config.c:305
PQLIB_EXAMPLE
Definition: pqlib_example.h:138
EXAMPLE_CONFIG::cyclesToRun
uint32_t cyclesToRun
Definition: pqlib_example.h:106
EXAMPLE_CONFIG::intrpHysteresis
float intrpHysteresis
Definition: pqlib_example.h:116
get_afe_input
int get_afe_input()
Definition: pqlib_afe.c:53
PQLIB_EXAMPLE::no_os_cb_desc
struct no_os_circular_buffer * no_os_cb_desc
Definition: pqlib_example.h:160
cpy_correction_coeffs
int cpy_correction_coeffs(ADI_PQLIB_NOMINAL_FREQUENCY nominalFrequency, ADI_PQLIB_CORR_COEF *pCorrCoef)
Copies the user provided correction factors to the interface structure. This shows how floating point...
Definition: pqlib_example.c:303
PQLIB_EXAMPLE::channelMap
ADI_PQLIB_PHASE_MAP channelMap
Definition: pqlib_example.h:158
EXAMPLE_CONFIG::currentCorrCoef
uint16_t currentCorrCoef[PQLIB_MAX_HARMONICS]
Definition: pqlib_example.h:100
EXAMPLE_CONFIG::correctionData
ADI_PQLIB_CORR_COEF correctionData
Definition: pqlib_example.h:131
open_pqlib
int open_pqlib(PQLIB_EXAMPLE *pExample)
Call adi_pqlib_Open with required buffers. Serves as an example how to call adi_pqlib_Open API.
Definition: pqlib_example.c:135
PQLIB_STATE
PQLIB_STATE
PQLIB Example states.
Definition: pqlib_example.h:70
EXAMPLE_CONFIG::flickerModel
ADI_PQLIB_FLICKER_MODEL flickerModel
Definition: pqlib_example.h:132
populate_event_config
void populate_event_config(EXAMPLE_CONFIG *pExampleConfig)
Populates event configuration using user configuration Serves as an example on how to convert thresho...
Definition: pqlib_example.c:382
process_and_prepare_output
int process_and_prepare_output()
The function gets AFE input and calls main processing APIs of the library. This also gets the measure...
Definition: pqlib_example.c:219
pqm_one_cycle
int pqm_one_cycle(void)
One complete cycle for IIO callback function.
Definition: pqlib_example.c:123
EXAMPLE_CONFIG::syncTime
uint64_t syncTime
Definition: pqlib_example.h:110
PQLIB_MAX_CHANNELS
#define PQLIB_MAX_CHANNELS
Definition: pqlib_example.h:60
EXAMPLE_CONFIG::inputVoltageCorrCoef50Hz
float inputVoltageCorrCoef50Hz[PQLIB_MAX_HARMONICS]
Definition: pqlib_example.h:126
pqlib_convert.h
PQLIB_MAX_INTER_HARMONICS
#define PQLIB_MAX_INTER_HARMONICS
Definition: pqlib_example.h:63
EXAMPLE_CONFIG::swellThreshold
float swellThreshold
Definition: pqlib_example.h:113
EXAMPLE_CONFIG::interHarmonics
uint8_t interHarmonics[PQLIB_MAX_INTER_HARMONICS]
Definition: pqlib_example.h:96
process_pqlib_error
int process_pqlib_error(PQLIB_EXAMPLE *pExample, ADI_PQLIB_RESULT pqlibStatus)
Prints error message for errors from the library. Serves as an examples on how to handle the errors f...
Definition: pqlib_example.c:467
configChanged
volatile bool configChanged
Definition: iio_pqm.c:68
SYS_STATUS_SUCCESS
#define SYS_STATUS_SUCCESS
Definition: status.h:47
EXAMPLE_CONFIG::intrpThreshold
float intrpThreshold
Definition: pqlib_example.h:115
EXAMPLE_CONFIG::rvcThreshold
float rvcThreshold
Definition: pqlib_example.h:117
EXAMPLE_CONFIG::currentScale
float currentScale
Definition: pqlib_example.h:123
afe_start
int afe_start(void)
Starts the AFE.
Definition: afe_config.c:137
SyncToDip
void SyncToDip(PQLIB_EXAMPLE *pExample, ADI_PQLIB_RESULT pqlibStatus)
Sync the time to a dip or interruption event. Serves as an example how to sync to an external time ev...
Definition: pqlib_example.c:566
SyncLibTime
int SyncLibTime(PQLIB_EXAMPLE *pExample, bool checkRtcTime)
Sets library internal time using RTC time. Serves as an example how to call the APIs....
Definition: pqlib_example.c:538
EXAMPLE_CONFIG::numCorrCoefVoltage50Hz
uint16_t numCorrCoefVoltage50Hz
Definition: pqlib_example.h:103
PQLIB_EXAMPLE::state
PQLIB_STATE state
Definition: pqlib_example.h:159
PQLIB_EXAMPLE::zeroCrossingCount
uint32_t zeroCrossingCount
Definition: pqlib_example.h:145
pqm_measurement_init
int pqm_measurement_init(void)
Initializes Power Quality Measurement.
Definition: pqlib_example.c:59
VCONSEL_4W_DELTA_VB_NEGVA
@ VCONSEL_4W_DELTA_VB_NEGVA
Definition: pqlib_example.h:84
PQLIB_EXAMPLE::calibration
bool calibration
Definition: pqlib_example.h:142
wait_for_zero_crossing
int wait_for_zero_crossing(PQLIB_EXAMPLE *pExample, ADI_PQLIB_RESULT pqlibStatus)
Looks at the return code from library and checks whether there is a zero crossing timeout....
Definition: pqlib_example.c:418
EXAMPLE_CONFIG::inputCurrentCorrCoef50Hz
float inputCurrentCorrCoef50Hz[PQLIB_MAX_HARMONICS]
Definition: pqlib_example.h:125
PQLIB_STATE_RUNNING
@ PQLIB_STATE_RUNNING
Definition: pqlib_example.h:73
PQLIB_EXAMPLE::config
ADI_PQLIB_CONFIG config
Definition: pqlib_example.h:152
pqlib_example.h
EXAMPLE_CONFIG::vconsel
VCONSEL_CONFIG vconsel
Definition: pqlib_example.h:134
EXAMPLE_CONFIG::enableIconsel
bool enableIconsel
Definition: pqlib_example.h:93
convert_to_pct_type
ADI_PQLIB_PCT_TYPE convert_to_pct_type(float val)
Converts val to percentage.
Definition: pqlib_convert.c:79
no_os_circular_buffer.h
Circular buffer library header.
processData
volatile bool processData
Definition: iio_pqm.c:69
EXAMPLE_CONFIG::maxHarmonics
uint8_t maxHarmonics
Definition: pqlib_example.h:97
EXAMPLE_CONFIG::swellHysteresis
float swellHysteresis
Definition: pqlib_example.h:114
EXAMPLE_CONFIG::inputCurrentCorrCoef60Hz
float inputCurrentCorrCoef60Hz[PQLIB_MAX_HARMONICS]
Definition: pqlib_example.h:127
SYS_STATUS_PQLIB_CONFIG_ERROR
#define SYS_STATUS_PQLIB_CONFIG_ERROR
Definition: status.h:51
PQLIB_EXAMPLE::readyToDisplay
bool readyToDisplay
Definition: pqlib_example.h:140
EXAMPLE_CONFIG::phaseMap
ADI_PQLIB_PHASE_MAP phaseMap
Definition: pqlib_example.h:133
iio_pqm.h
EXAMPLE_CONFIG::numCorrCoefCurrent60Hz
uint16_t numCorrCoefCurrent60Hz
Definition: pqlib_example.h:104
EXAMPLE_CONFIG::maxInterHarmonics
uint8_t maxInterHarmonics
Definition: pqlib_example.h:98
PQLIB_EXAMPLE::pChannel
char * pChannel
Definition: pqlib_example.h:150
PQLIB_EXAMPLE::hDevice
ADI_PQLIB_HANDLE hDevice
Definition: pqlib_example.h:151
SyncToDip
void SyncToDip(PQLIB_EXAMPLE *pExample, ADI_PQLIB_RESULT pqlibStatus)
Sync the time to a dip or interruption event. Serves as an example how to sync to an external time ev...
Definition: pqlib_example.c:566
SyncLibTime
int SyncLibTime(PQLIB_EXAMPLE *pExample, bool checkRtcTime)
Sets library internal time using RTC time. Serves as an example how to call the APIs....
Definition: pqlib_example.c:538
PQLIB_EXAMPLE::timeOutCount
uint32_t timeOutCount
Definition: pqlib_example.h:146
set_default_config
void set_default_config(EXAMPLE_CONFIG *pConfig)
Sets default configuration of the example as floating points Note that this function doesn't configur...
Definition: pqlib_example.c:484
pqlibExample
PQLIB_EXAMPLE pqlibExample
Definition: pqlib_example.c:51
EXAMPLE_CONFIG::pEnabledChannels
char * pEnabledChannels[PQLIB_MAX_CHANNELS]
Definition: pqlib_example.h:129
PQLIB_STATE_WAITING_FOR_TRIGGER
@ PQLIB_STATE_WAITING_FOR_TRIGGER
Definition: pqlib_example.h:72
EXAMPLE_CONFIG::msvRecordingLength
float msvRecordingLength
Definition: pqlib_example.h:121
wait_for_zero_crossing
int wait_for_zero_crossing(PQLIB_EXAMPLE *pExample, ADI_PQLIB_RESULT pqlibStatus)
Looks at the return code from library and checks whether there is a zero crossing timeout....
Definition: pqlib_example.c:418
convert_to_coef_fract_type
ADI_PQLIB_COEF_TYPE convert_to_coef_fract_type(float val)
Converts val to correction coefficient.
Definition: pqlib_convert.c:95
config_measurement
int config_measurement(PQLIB_EXAMPLE *pExample)
Configures AFE and the library . This serves as an example on how to call APIs adi_pqlib_SetConfig an...
Definition: pqlib_example.c:152
EXAMPLE_CONFIG::nominalFrequency
uint32_t nominalFrequency
Definition: pqlib_example.h:107
afe_set_ref_channel
int afe_set_ref_channel(uint16_t refChannel)
sets refChannel.
Definition: afe_config.c:495
afe_wait_settling
void afe_wait_settling(uint32_t cycles)
Waits for passed number of cycles.
Definition: afe_config.c:448
populate_event_config
void populate_event_config(EXAMPLE_CONFIG *pExampleConfig)
Populates event configuration using user configuration Serves as an example on how to convert thresho...
Definition: pqlib_example.c:382
PQLIB_EXAMPLE::waitingForSync
bool waitingForSync
Definition: pqlib_example.h:141
EXAMPLE_CONFIG::inputVoltageCorrCoef60Hz
float inputVoltageCorrCoef60Hz[PQLIB_MAX_HARMONICS]
Definition: pqlib_example.h:128
NULL
#define NULL
Definition: wrapper.h:64
EXAMPLE_CONFIG::voltageScale
float voltageScale
Definition: pqlib_example.h:122
PQLIB_STATE_WAITING_FOR_START_CMD
@ PQLIB_STATE_WAITING_FOR_START_CMD
Definition: pqlib_example.h:71
PQLIB_EXAMPLE::processedCycles
uint32_t processedCycles
Definition: pqlib_example.h:144
VCONSEL_CONFIG
VCONSEL_CONFIG
VCONSEL H/W config selection.
Definition: pqlib_example.h:80
PQLIB_EXAMPLE::pqlibTempMemory
uint32_t pqlibTempMemory[ADI_PQLIB_TEMP_MEM_NUM_BYTES/4]
Definition: pqlib_example.h:148
VCONSEL_4W_WYE
@ VCONSEL_4W_WYE
Definition: pqlib_example.h:81
PQLIB_MAX_HARMONICS
#define PQLIB_MAX_HARMONICS
Definition: pqlib_example.h:62
process_pqlib_error
int process_pqlib_error(PQLIB_EXAMPLE *pExample, ADI_PQLIB_RESULT pqlibStatus)
Prints error message for errors from the library. Serves as an examples on how to handle the errors f...
Definition: pqlib_example.c:467
no_os_circular_buffer
Circular buffer descriptor.
Definition: no_os_circular_buffer.h:73
pqm_start_measurement
int pqm_start_measurement(bool waitingForSync)
Starts Power Quality measurement as per configured cycles.
Definition: pqlib_example.c:74
EXAMPLE_CONFIG::harmonics
uint8_t harmonics[PQLIB_MAX_HARMONICS]
Definition: pqlib_example.h:95
SIZE_OF_INPUT_RTC
#define SIZE_OF_INPUT_RTC
Definition: pqlib_example.h:64
afe_set_acc_mode
int afe_set_acc_mode(uint16_t frequency, uint16_t vconsel, uint16_t iconsel)
sets ACCMODE register for nominal frequency, ICONSEL, VCONSEL.
Definition: afe_config.c:464
PQLIB_EXAMPLE::exampleConfig
EXAMPLE_CONFIG exampleConfig
Definition: pqlib_example.h:156
pqm_measurement_init
int pqm_measurement_init(void)
Initializes Power Quality Measurement.
Definition: pqlib_example.c:59
VCONSEL_4W_WYE_VB_NEGVA_NEGVC
@ VCONSEL_4W_WYE_VB_NEGVA_NEGVC
Definition: pqlib_example.h:83
PQLIB_EXAMPLE::calExpectedRms
float calExpectedRms
Definition: pqlib_example.h:149
pqlibExample
PQLIB_EXAMPLE pqlibExample
Definition: pqlib_example.c:51
EXAMPLE_CONFIG::nominalVoltage
float nominalVoltage
Definition: pqlib_example.h:124
PQLIB_EXAMPLE::inputCycle
ADI_PQLIB_CYCLE_INPUT inputCycle
Definition: pqlib_example.h:153
open_pqlib
int open_pqlib(PQLIB_EXAMPLE *pExample)
Call adi_pqlib_Open with required buffers. Serves as an example how to call adi_pqlib_Open API.
Definition: pqlib_example.c:135
PQLIB_EXAMPLE::output
ADI_PQLIB_OUTPUT * output
Definition: pqlib_example.h:157
convert_to_time_ms
uint32_t convert_to_time_ms(float timesec)
Converts time in sec to time in ms.
Definition: pqlib_convert.c:102
convert_to_freq_type
ADI_PQLIB_FREQ_TYPE convert_to_freq_type(float val)
Converts val to freq in mhz.
Definition: pqlib_convert.c:87
EXAMPLE_CONFIG
Definition: pqlib_example.h:91
process_and_prepare_output
int process_and_prepare_output()
The function gets AFE input and calls main processing APIs of the library. This also gets the measure...
Definition: pqlib_example.c:219
EXAMPLE_CONFIG::zeroCrossingCheck
uint32_t zeroCrossingCheck
Definition: pqlib_example.h:109
PQLIB_EXAMPLE::syncCycles
uint16_t syncCycles
Definition: pqlib_example.h:143
VCONSEL_3W_DELTA_VB_VA_NEGVC
@ VCONSEL_3W_DELTA_VB_VA_NEGVC
Definition: pqlib_example.h:82
status.h
newSyncTimeAvailable
volatile uint8_t newSyncTimeAvailable
Definition: intrpt_handler.c:53
SYS_STATUS_PQLIB_ERROR
#define SYS_STATUS_PQLIB_ERROR
Definition: status.h:48
PQLIB_EXAMPLE::pqlibStateMemory
uint32_t pqlibStateMemory[ADI_PQLIB_STATE_MEM_NUM_BYTES/4]
Definition: pqlib_example.h:147
EXAMPLE_CONFIG::dipHysteresis
float dipHysteresis
Definition: pqlib_example.h:112
SYS_STATUS_NO_SIGNAL
#define SYS_STATUS_NO_SIGNAL
Definition: status.h:49