no-OS
Loading...
Searching...
No Matches
common_data.h
Go to the documentation of this file.
1/***************************************************************************/
33#ifndef __COMMON_DATA_H__
34#define __COMMON_DATA_H__
35
36#include "ade9430.h"
37#include "no_os_uart.h"
38#include "no_os_gpio.h"
39#include "no_os_spi.h"
40#include "no_os_delay.h"
41#include "no_os_print_log.h"
42#include "no_os_units.h"
43#include "no_os_util.h"
44#include "no_os_error.h"
45#include "no_os_alloc.h"
46#include "maxim_uart.h"
47#include "maxim_uart_stdio.h"
48#include "maxim_gpio.h"
49#include "maxim_spi.h"
50
51/* UART configuration (stdio/debug console) */
52#define UART_DEV_ID 0
53#define UART_BAUD 115200
54#define UART_IRQ UART0_IRQn
55
56/* SPI configuration for the ADE9430 energy meter */
57#define SPI_DEVICE_ID 1
58#define SPI_BAUDRATE 1000000
59#define SPI_CS 0
60
61#ifdef HW_RESET_ENABLED
62/* ADE9430 hardware reset pin (EVAL-PQMON board) */
63#define GPIO_RESET_PORT 1
64#define GPIO_RESET_NUMBER 27
65#endif
66
67/* Number of samples used by the energy accumulation model */
68#define ADE9430_SAMPLES_NR 7999
69
70/* Delay (ms) to allow the ADE9430 to settle after power-up */
71#define RESET_TIME 500
72
73/* Delay (ms) between consecutive readings */
74#define READ_INTERVAL 1000
75
76extern struct no_os_uart_init_param uart_ip;
78#ifdef HW_RESET_ENABLED
80#endif
81
82#endif /* __COMMON_DATA_H__ */
struct no_os_uart_init_param uart_ip
Definition common_data.c:55
Header file of ADE9430 Driver.
struct no_os_gpio_init_param gpio_reset_ip
Definition platform.c:74
struct no_os_spi_init_param ade9430_spi_ip
Definition common_data.c:58
Header file of Delay functions.
Error codes definition.
Header file of GPIO Interface.
Print messages helpers.
Header file of SPI Interface.
Header file of UART interface.
Header file of Units.
Header file of utility functions.
Structure holding the parameters for GPIO initialization.
Definition no_os_gpio.h:67
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