Go to the documentation of this file.
41 #ifndef __COMMON_DATA_H__
42 #define __COMMON_DATA_H__
48 #include "adi_pqlib.h"
58 #include "parameters.h"
65 #define FW_VERSION 2.0
67 #define IIO_BUFF_TYPE int16_t
68 #define SAMPLES_PER_CHANNEL_PLATFORM 256
69 #define MAX_SIZE_BASE_ADDR (SAMPLES_PER_CHANNEL_PLATFORM * TOTAL_PQM_CHANNELS)
70 #define MAX_SIZE_BASE_ADDR_WITH_SIZE \
71 (MAX_SIZE_BASE_ADDR * sizeof(IIO_BUFF_TYPE))
73 #define TOTAL_PQM_CHANNELS 7
74 #define VOLTAGE_CH_NUMBER 3
75 #define MAX_CH_ATTRS 12
76 #define PQM_DEVICE_ATTR_NUMBER 35
77 #define WAVEFORM_BUFFER_LENGTH (256 * 7)
91 static const char *
const pqm_v_consel_available[] = {
99 static const char *
const pqm_flicker_model_available[] = {
100 [ADI_PQLIB_FLICKER_MODEL_230V_50HZ] =
"230V_50HZ",
101 [ADI_PQLIB_FLICKER_MODEL_120V_50HZ] =
"120V_50HZ",
102 [ADI_PQLIB_FLICKER_MODEL_230V_60HZ] =
"230V_60HZ",
103 [ADI_PQLIB_FLICKER_MODEL_120V_60HZ] =
"120V_60HZ",
106 static const char *
const pqm_nominal_frequency_available[] = {
107 [ADI_PQLIB_NOMINAL_FREQUENCY_50HZ] =
"50",
108 [ADI_PQLIB_NOMINAL_FREQUENCY_60HZ] =
"60",
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:85
#define IIO_BUFF_TYPE
Definition: common_data.h:67
float dev_global_attr[PQM_DEVICE_ATTR_NUMBER]
Definition: common_data.h:121
#define PQM_DEVICE_ATTR_NUMBER
Definition: common_data.h:76
Structure describing a callback to be registered.
Definition: no_os_irq.h:148
float pqm_global_attr[PQM_DEVICE_ATTR_NUMBER]
Definition: common_data.h:113
Header file of SPI Interface.
struct no_os_uart_init_param iio_demo_uart_ip
Definition: common_data.c:51
Header file of IRQ interface.
IIO_BUFF_TYPE iio_data_buffer_loc[MAX_SIZE_BASE_ADDR]
Definition: common_data.c:63
uint8_t reg[TOTAL_PQM_CHANNELS]
Definition: common_data.h:112
@ VCONSEL_4W_DELTA_VA_VB_VC
Definition: pqlib_example.h:85
Definition: common_data.h:111
#define TOTAL_PQM_CHANNELS
Definition: common_data.h:73
Timer control module header.
uint32_t dev_ch_attr[TOTAL_PQM_CHANNELS][MAX_CH_ATTRS]
Definition: common_data.h:122
uint32_t active_ch
Definition: common_data.h:115
#define MAX_SIZE_BASE_ADDR
Definition: common_data.h:69
uint32_t pqm_ch_attr[TOTAL_PQM_CHANNELS][MAX_CH_ATTRS]
Definition: common_data.h:114
uint32_t ext_buff_len
Definition: common_data.h:116
struct no_os_gpio_init_param reset_gpio_ip
Definition: common_data.c:140
struct no_os_spi_init_param spi_egy_ip
Definition: common_data.c:130
@ VCONSEL_4W_DELTA_VB_NEGVA
Definition: pqlib_example.h:84
int16_t * ext_buff
Definition: common_data.h:117
int16_t * ext_buff
Definition: common_data.h:124
struct no_os_irq_init_param afe_callback_ctrl_ip
Definition: common_data.c:157
struct no_os_i2c_init_param i2c_ip
Definition: common_data.c:111
Structure holding the parameters for timer initialization.
Definition: no_os_timer.h:89
Header file of I2C Interface.
struct no_os_callback_desc afe0_callback_desc
Definition: common_data.c:164
Header file for iio_types.
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:70
Structure holding the parameters for UART initialization.
Definition: no_os_uart.h:116
@ VCONSEL_4W_WYE
Definition: pqlib_example.h:81
Structure holding the initial parameters for Interrupt Request.
Definition: no_os_irq.h:113
struct pqm_init_para pqm_ip
Definition: common_data.c:65
struct no_os_gpio_init_param intr_gpio_ip
Definition: common_data.c:148
Header file of UART interface.
uint32_t ext_buff_len
Definition: common_data.h:123
struct no_os_timer_init_param timer_ip
Definition: common_data.c:66
@ VCONSEL_4W_WYE_VB_NEGVA_NEGVC
Definition: pqlib_example.h:83
#define MAX_CH_ATTRS
Definition: common_data.h:75
Definition: common_data.h:120
@ VCONSEL_3W_DELTA_VB_VA_NEGVC
Definition: pqlib_example.h:82
struct no_os_uart_init_param uart_ip_stdio
Definition: common_data.c:119
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:131