34#ifndef __COMMON_DATA_H__
35#define __COMMON_DATA_H__
37#if defined(PQM_CONN_T1L)
38#include "lwip_socket.h"
39#include "lwip_adin1110.h"
53#include "parameters.h"
58#define IIO_BUFF_TYPE int16_t
59#define SAMPLES_PER_CHANNEL_PLATFORM 256
60#define MAX_SIZE_BASE_ADDR (SAMPLES_PER_CHANNEL_PLATFORM * TOTAL_PQM_CHANNELS)
61#define MAX_SIZE_BASE_ADDR_WITH_SIZE \
62 (MAX_SIZE_BASE_ADDR * sizeof(IIO_BUFF_TYPE))
61#define MAX_SIZE_BASE_ADDR_WITH_SIZE \ …
64#define TOTAL_PQM_CHANNELS 11
65#define VOLTAGE_CH_NUMBER 3
66#define MAX_CH_ATTRS 23
67#define PQM_DEVICE_ATTR_NUMBER 35
68#define WAVEFORM_BUFFER_LENGTH (256 * 7)
69#define MAX_EVENT_NUMBER 6
73#if defined(PQM_CONN_USB)
75#elif defined(PQM_CONN_SERIAL)
77#elif defined(PQM_CONN_T1L)
89extern struct lwip_network_param lwip_ip;
102static const char *
const pqm_v_consel_available[] = {
110static const char *
const pqm_flicker_model_available[] = {
111 [ADI_PQLIB_FLICKER_MODEL_230V_50HZ] =
"230V_50HZ",
112 [ADI_PQLIB_FLICKER_MODEL_120V_50HZ] =
"120V_50HZ",
113 [ADI_PQLIB_FLICKER_MODEL_230V_60HZ] =
"230V_60HZ",
114 [ADI_PQLIB_FLICKER_MODEL_120V_60HZ] =
"120V_60HZ",
117static const char *
const pqm_nominal_frequency_available[] = {
118 [ADI_PQLIB_NOMINAL_FREQUENCY_50HZ] =
"50",
119 [ADI_PQLIB_NOMINAL_FREQUENCY_60HZ] =
"60",
struct no_os_spi_init_param adin1110_spi_ip
Definition common_data.c:46
struct no_os_gpio_init_param reset_gpio_ip
Definition common_data.c:218
struct no_os_timer_init_param timer_ip
Definition common_data.c:54
struct no_os_uart_init_param uart_ip_stdio
Definition common_data.c:197
struct no_os_gpio_init_param intr_gpio_ip
Definition common_data.c:226
struct no_os_callback_desc afe0_callback_desc
Definition common_data.c:242
struct no_os_irq_init_param afe_callback_ctrl_ip
Definition common_data.c:235
struct no_os_spi_init_param spi_egy_ip
Definition common_data.c:208
IIO_BUFF_TYPE iio_data_buffer_loc[MAX_SIZE_BASE_ADDR]
Definition common_data.c:141
struct pqm_init_para pqm_ip
Definition common_data.c:143
struct no_os_i2c_init_param i2c_ip
Definition common_data.c:189
#define TOTAL_PQM_CHANNELS
Definition common_data.h:64
#define MAX_CH_ATTRS
Definition common_data.h:66
#define PQM_DEVICE_ATTR_NUMBER
Definition common_data.h:67
#define IIO_BUFF_TYPE
Definition common_data.h:58
struct adin1110_init_param adin1110_ip
Definition iio_lwip_example.c:67
Header file for iio_types.
Header file of I2C Interface.
Header file of IRQ interface.
Header file of SPI Interface.
Timer control module header.
Header file of UART interface.
@ VCONSEL_4W_WYE
Definition pqlib_example.h:67
@ VCONSEL_4W_WYE_VB_NEGVA_NEGVC
Definition pqlib_example.h:69
@ VCONSEL_4W_DELTA_VA_VB_VC
Definition pqlib_example.h:71
@ VCONSEL_4W_DELTA_VB_NEGVA
Definition pqlib_example.h:70
@ VCONSEL_3W_DELTA_VB_VA_NEGVC
Definition pqlib_example.h:68
Initialization parameter for the device descriptor.
Definition adin1110.h:220
Structure describing a callback to be registered.
Definition no_os_irq.h:136
Structure holding the parameters for GPIO initialization.
Definition no_os_gpio.h:67
Structure holding the parameters for I2C initialization.
Definition no_os_i2c.h:52
Structure holding the initial parameters for Interrupt Request.
Definition no_os_irq.h:101
Structure holding the parameters for SPI initialization.
Definition no_os_spi.h:128
Structure holding the parameters for timer initialization.
Definition no_os_timer.h:71
Structure holding the parameters for UART initialization.
Definition no_os_uart.h:98
Definition common_data.h:122
float pqm_global_attr[PQM_DEVICE_ATTR_NUMBER]
Definition common_data.h:124
uint32_t active_ch
Definition common_data.h:126
uint32_t ext_buff_len
Definition common_data.h:127
uint32_t pqm_ch_attr[TOTAL_PQM_CHANNELS][MAX_CH_ATTRS]
Definition common_data.h:125
int16_t * ext_buff
Definition common_data.h:128
uint8_t reg[TOTAL_PQM_CHANNELS]
Definition common_data.h:123
Definition common_data.h:131
uint32_t dev_ch_attr[TOTAL_PQM_CHANNELS][MAX_CH_ATTRS]
Definition common_data.h:133
float dev_global_attr[PQM_DEVICE_ATTR_NUMBER]
Definition common_data.h:132
int16_t * ext_buff
Definition common_data.h:135
uint32_t ext_buff_len
Definition common_data.h:134
const struct no_os_gpio_init_param adin1110_tx2p4_ip
Definition common_data.c:173
const struct no_os_gpio_init_param adin1110_rst_gpio_ip
Definition common_data.c:77
const struct no_os_gpio_init_param adin1110_int_ip
Definition common_data.c:69
const struct no_os_gpio_init_param adin1110_mssel_ip
Definition common_data.c:181
const struct no_os_gpio_init_param adin1110_cfg0_ip
Definition common_data.c:189
const struct no_os_gpio_init_param adin1110_swpd_ip
Definition common_data.c:165
const struct no_os_gpio_init_param adin1110_cfg1_ip
Definition common_data.c:197