33#ifndef __COMMON_DATA_H__
34#define __COMMON_DATA_H__
46#include "maxim_uart.h"
47#include "maxim_gpio.h"
48#include "maxim_uart_stdio.h"
70#define GPIO_LED_PORT 2
75#define GPIO_SCK_PORT 2
76#define GPIO_SCK_PIN 29
78#define GPIO_RESET_PORT 2
79#define GPIO_RESET_PIN 8
81#define GPIO_OPS &max_gpio_ops
82#define GPIO_EXTRA &ade9153_gpio_extra_ip
83#define GPIO_RDY_PORT 2
86#define SPI_DEVICE_ID 0
87#define SPI_BAUDRATE 1000000
89#define SPI_SLAVE_NUM 1
92#define UART_BAUD 115200
94#define GPIO_IRQ_OPS &max_gpio_irq_ops
95#define GPIO_CTRL_IRQ_ID 0
96#define GPIO_IRQ_EXTRA &ade9153a_gpio_extra_ip
97#define NVIC_GPIO_IRQ GPIO2_IRQn
102#define READ_INTERVAL 3000
106#define ADE9153A_VLEVEL 0x002C11E8
108#define ADE9153A_RSMALL 0x03E8
110#define ADE9153A_NO_SAMPLES 0x0F9F
112#define ADE9153A_AIGAIN -(1 << 28)
113#define ADE9153A_AIGAIN2 -(1 << 27)
117#define ENERGY_CC 0.858307
119#define POWER_CC 1508.743
121#define RMS_CURENT_CC 0.838190
123#define RMS_VOLTAGE_CC 13.41105
125#define PF_CC 134217728
127#define FREQ_CC 262144000
129#define MULT_CC_50HZ 0.017578125
131#define MULT_CC_60HZ 0.02109375
Header file of ADE9153A Driver.
struct no_os_uart_init_param uart_ip
Definition common_data.c:52
struct no_os_gpio_init_param gpio_reset_ip
Definition platform.c:74
int read_measurements(struct ade7753_dev *dev)
Read measurements.
Definition common_data.c:41
struct no_os_gpio_init_param gpio_led1_ip
Definition platform.c:65
int interface_toggle_led(struct no_os_gpio_desc *gpio_led_desc)
Toggle LED.
Definition interface.c:95
struct no_os_gpio_init_param gpio_sck_ip
Definition common_data.c:83
struct no_os_spi_init_param ade9153a_spi_ip
Definition common_data.c:109
struct no_os_gpio_init_param ade9153a_gpio_rdy_ip
Definition common_data.c:101
struct no_os_irq_init_param ade9153a_gpio_irq_ip
Definition common_data.c:119
struct no_os_gpio_init_param gpio_ss_ip
Definition common_data.c:74
int autocalibration_read_vals(struct ade9153a_dev *dev)
Autocalibration read values.
Definition common_data.c:296
int autocalibration_start(struct ade9153a_dev *dev)
Autocalibration start.
Definition common_data.c:353
Header file of Delay functions.
Header file of GPIO Interface.
Header file of PWM Interface.
Header file of SPI Interface.
Header file of UART interface.
Header file of utility functions.
ADE9153A Device structure.
Definition ade9153a.h:701
Structure holding the GPIO descriptor.
Definition no_os_gpio.h:84
Structure holding the parameters for GPIO initialization.
Definition no_os_gpio.h:67
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 UART initialization.
Definition no_os_uart.h:98