Go to the documentation of this file.
34 #ifndef __COMMON_DATA_H__
35 #define __COMMON_DATA_H__
41 #if defined(PQM_CONN_T1L)
42 #include "lwip_socket.h"
43 #include "lwip_adin1110.h"
47 #include "adi_pqlib.h"
57 #include "parameters.h"
64 #define FW_VERSION 2.2
66 #define IIO_BUFF_TYPE int16_t
67 #define SAMPLES_PER_CHANNEL_PLATFORM 256
68 #define MAX_SIZE_BASE_ADDR (SAMPLES_PER_CHANNEL_PLATFORM * TOTAL_PQM_CHANNELS)
69 #define MAX_SIZE_BASE_ADDR_WITH_SIZE \
70 (MAX_SIZE_BASE_ADDR * sizeof(IIO_BUFF_TYPE))
72 #define TOTAL_PQM_CHANNELS 11
73 #define VOLTAGE_CH_NUMBER 3
74 #define MAX_CH_ATTRS 23
75 #define PQM_DEVICE_ATTR_NUMBER 35
76 #define WAVEFORM_BUFFER_LENGTH (256 * 7)
77 #define MAX_EVENT_NUMBER 6
81 #if defined(PQM_CONN_USB)
83 #elif defined(PQM_CONN_SERIAL)
85 #elif defined(PQM_CONN_T1L)
97 extern struct lwip_network_param lwip_ip;
110 static const char *
const pqm_v_consel_available[] = {
118 static const char *
const pqm_flicker_model_available[] = {
119 [ADI_PQLIB_FLICKER_MODEL_230V_50HZ] =
"230V_50HZ",
120 [ADI_PQLIB_FLICKER_MODEL_120V_50HZ] =
"120V_50HZ",
121 [ADI_PQLIB_FLICKER_MODEL_230V_60HZ] =
"230V_60HZ",
122 [ADI_PQLIB_FLICKER_MODEL_120V_60HZ] =
"120V_60HZ",
125 static const char *
const pqm_nominal_frequency_available[] = {
126 [ADI_PQLIB_NOMINAL_FREQUENCY_50HZ] =
"50",
127 [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:66
float dev_global_attr[PQM_DEVICE_ATTR_NUMBER]
Definition: common_data.h:140
#define PQM_DEVICE_ATTR_NUMBER
Definition: common_data.h:75
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:132
Header file of SPI Interface.
Header file of IRQ interface.
IIO_BUFF_TYPE iio_data_buffer_loc[MAX_SIZE_BASE_ADDR]
Definition: common_data.c:149
uint8_t reg[TOTAL_PQM_CHANNELS]
Definition: common_data.h:131
@ VCONSEL_4W_DELTA_VA_VB_VC
Definition: pqlib_example.h:79
Definition: common_data.h:130
const struct no_os_gpio_init_param adin1110_swpd_ip
Definition: common_data.c:165
Initialization parameter for the device descriptor.
Definition: adin1110.h:214
#define TOTAL_PQM_CHANNELS
Definition: common_data.h:72
Timer control module header.
uint32_t dev_ch_attr[TOTAL_PQM_CHANNELS][MAX_CH_ATTRS]
Definition: common_data.h:141
uint32_t active_ch
Definition: common_data.h:134
#define MAX_SIZE_BASE_ADDR
Definition: common_data.h:68
uint32_t pqm_ch_attr[TOTAL_PQM_CHANNELS][MAX_CH_ATTRS]
Definition: common_data.h:133
uint32_t ext_buff_len
Definition: common_data.h:135
struct no_os_gpio_init_param reset_gpio_ip
Definition: common_data.c:226
struct no_os_spi_init_param spi_egy_ip
Definition: common_data.c:216
@ VCONSEL_4W_DELTA_VB_NEGVA
Definition: pqlib_example.h:78
int16_t * ext_buff
Definition: common_data.h:136
const struct no_os_gpio_init_param adin1110_cfg0_ip
Definition: common_data.c:189
struct no_os_spi_init_param adin1110_spi_ip
Definition: common_data.c:46
int16_t * ext_buff
Definition: common_data.h:143
const struct no_os_gpio_init_param adin1110_int_ip
Definition: common_data.c:69
struct no_os_irq_init_param afe_callback_ctrl_ip
Definition: common_data.c:243
const struct no_os_gpio_init_param adin1110_cfg1_ip
Definition: common_data.c:197
struct no_os_i2c_init_param i2c_ip
Definition: common_data.c:197
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:250
Header file for iio_types.
const struct no_os_gpio_init_param adin1110_mssel_ip
Definition: common_data.c:181
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
const struct no_os_gpio_init_param adin1110_tx2p4_ip
Definition: common_data.c:173
@ 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:151
struct no_os_gpio_init_param intr_gpio_ip
Definition: common_data.c:234
struct adin1110_init_param adin1110_ip
Definition: common_data.c:221
Header file of UART interface.
uint32_t ext_buff_len
Definition: common_data.h:142
struct no_os_timer_init_param timer_ip
Definition: common_data.c:60
@ VCONSEL_4W_WYE_VB_NEGVA_NEGVC
Definition: pqlib_example.h:77
const struct no_os_gpio_init_param adin1110_rst_gpio_ip
Definition: common_data.c:77
#define MAX_CH_ATTRS
Definition: common_data.h:74
Definition: common_data.h:139
@ VCONSEL_3W_DELTA_VB_VA_NEGVC
Definition: pqlib_example.h:76
struct no_os_uart_init_param uart_ip_stdio
Definition: common_data.c:205
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140