Go to the documentation of this file.
34 #ifndef __COMMON_DATA_H__
35 #define __COMMON_DATA_H__
41 #include "adi_pqlib.h"
51 #include "parameters.h"
58 #define FW_VERSION 2.1
60 #define IIO_BUFF_TYPE int16_t
61 #define SAMPLES_PER_CHANNEL_PLATFORM 256
62 #define MAX_SIZE_BASE_ADDR (SAMPLES_PER_CHANNEL_PLATFORM * TOTAL_PQM_CHANNELS)
63 #define MAX_SIZE_BASE_ADDR_WITH_SIZE \
64 (MAX_SIZE_BASE_ADDR * sizeof(IIO_BUFF_TYPE))
66 #define TOTAL_PQM_CHANNELS 7
67 #define VOLTAGE_CH_NUMBER 3
68 #define MAX_CH_ATTRS 12
69 #define PQM_DEVICE_ATTR_NUMBER 35
70 #define WAVEFORM_BUFFER_LENGTH (256 * 7)
84 static const char *
const pqm_v_consel_available[] = {
92 static const char *
const pqm_flicker_model_available[] = {
93 [ADI_PQLIB_FLICKER_MODEL_230V_50HZ] =
"230V_50HZ",
94 [ADI_PQLIB_FLICKER_MODEL_120V_50HZ] =
"120V_50HZ",
95 [ADI_PQLIB_FLICKER_MODEL_230V_60HZ] =
"230V_60HZ",
96 [ADI_PQLIB_FLICKER_MODEL_120V_60HZ] =
"120V_60HZ",
99 static const char *
const pqm_nominal_frequency_available[] = {
100 [ADI_PQLIB_NOMINAL_FREQUENCY_50HZ] =
"50",
101 [ADI_PQLIB_NOMINAL_FREQUENCY_60HZ] =
"60",
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
#define IIO_BUFF_TYPE
Definition: common_data.h:60
float dev_global_attr[PQM_DEVICE_ATTR_NUMBER]
Definition: common_data.h:114
#define PQM_DEVICE_ATTR_NUMBER
Definition: common_data.h:69
Structure describing a callback to be registered.
Definition: no_os_irq.h:142
float pqm_global_attr[PQM_DEVICE_ATTR_NUMBER]
Definition: common_data.h:106
Header file of SPI Interface.
struct no_os_uart_init_param iio_demo_uart_ip
Definition: common_data.c:44
Header file of IRQ interface.
IIO_BUFF_TYPE iio_data_buffer_loc[MAX_SIZE_BASE_ADDR]
Definition: common_data.c:56
uint8_t reg[TOTAL_PQM_CHANNELS]
Definition: common_data.h:105
@ VCONSEL_4W_DELTA_VA_VB_VC
Definition: pqlib_example.h:79
Definition: common_data.h:104
#define TOTAL_PQM_CHANNELS
Definition: common_data.h:66
Timer control module header.
uint32_t dev_ch_attr[TOTAL_PQM_CHANNELS][MAX_CH_ATTRS]
Definition: common_data.h:115
uint32_t active_ch
Definition: common_data.h:108
#define MAX_SIZE_BASE_ADDR
Definition: common_data.h:62
uint32_t pqm_ch_attr[TOTAL_PQM_CHANNELS][MAX_CH_ATTRS]
Definition: common_data.h:107
uint32_t ext_buff_len
Definition: common_data.h:109
struct no_os_gpio_init_param reset_gpio_ip
Definition: common_data.c:133
struct no_os_spi_init_param spi_egy_ip
Definition: common_data.c:123
@ VCONSEL_4W_DELTA_VB_NEGVA
Definition: pqlib_example.h:78
int16_t * ext_buff
Definition: common_data.h:110
int16_t * ext_buff
Definition: common_data.h:117
struct no_os_irq_init_param afe_callback_ctrl_ip
Definition: common_data.c:150
struct no_os_i2c_init_param i2c_ip
Definition: common_data.c:104
Structure holding the parameters for timer initialization.
Definition: no_os_timer.h:83
Header file of I2C Interface.
struct no_os_callback_desc afe0_callback_desc
Definition: common_data.c:157
Header file for iio_types.
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
Structure holding the parameters for UART initialization.
Definition: no_os_uart.h:110
@ VCONSEL_4W_WYE
Definition: pqlib_example.h:75
Structure holding the initial parameters for Interrupt Request.
Definition: no_os_irq.h:107
struct pqm_init_para pqm_ip
Definition: common_data.c:58
struct no_os_gpio_init_param intr_gpio_ip
Definition: common_data.c:141
Header file of UART interface.
uint32_t ext_buff_len
Definition: common_data.h:116
struct no_os_timer_init_param timer_ip
Definition: common_data.c:60
@ VCONSEL_4W_WYE_VB_NEGVA_NEGVC
Definition: pqlib_example.h:77
#define MAX_CH_ATTRS
Definition: common_data.h:68
Definition: common_data.h:113
@ VCONSEL_3W_DELTA_VB_VA_NEGVC
Definition: pqlib_example.h:76
struct no_os_uart_init_param uart_ip_stdio
Definition: common_data.c:112
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140