no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
platform.h
Go to the documentation of this file.
1/***************************************************************************/
33#ifndef __PLATFORM_H__
34#define __PLATFORM_H__
35
36#include "ade7978.h"
37#include "no_os_uart.h"
38#include "no_os_pwm.h"
39#include "no_os_delay.h"
40#include "no_os_gpio.h"
41#include "no_os_spi.h"
42#include "no_os_print_log.h"
43#include "no_os_units.h"
44#include "no_os_util.h"
45#include "no_os_error.h"
46#include "maxim_uart.h"
47#include "maxim_gpio.h"
48#include "maxim_uart_stdio.h"
49#include "maxim_pwm.h"
50#include "maxim_spi.h"
51#include "maxim_irq.h"
52
53/* UART init params */
54extern struct no_os_uart_init_param uart_ip;
55/* GPIO LED init params */
57/* GPIO Reset init params */
59/* SPI init params */
61/* GPIO RDY init params */
63/* Interrupt init params */
65
66/* Configuration for AD-APARD32690-SL */
67/* Port and Pin for user LED */
68#define GPIO_LED_PORT 2
69#define GPIO_LED_PIN 1
70/* Port and Pin for Reset */
71#define GPIO_RESET_PORT 2
72#define GPIO_RESET_PIN 9
73/* Data ready pin */
74#define GPIO_RDY_PORT 2
75#define GPIO_RDY_PIN 7
76
77
78#define GPIO_OPS &max_gpio_ops
79#define GPIO_EXTRA &gpio_extra_ip
80/* SPI config */
81#define SPI_DEVICE_ID 1
82#define SPI_BAUDRATE 1000000
83#define SPI_CS 0
84#define SPI_SLAVE_NUM 1
85/* UART config */
86#define UART_DEV_ID 0
87#define UART_BAUD 115200
88/* IRQ config */
89#define GPIO_IRQ_OPS &max_gpio_irq_ops
90#define GPIO_CTRL_IRQ_ID 0
91#define GPIO_IRQ_EXTRA &gpio_extra_ip
92#define NVIC_GPIO_IRQ GPIO2_IRQn
93
94#define RESET_TIME 500
95/* Read data interval in ms */
96#define READ_INTERVAL 3000
97
98/* Led toggle */
99int interface_toggle_led(struct no_os_gpio_desc *gpio_led_desc);
100
101#endif /* __PLATFORM_H__ */
Header file of ADE7978 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
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_irq_init_param ade7978_gpio_irq_ip
Definition platform.c:98
struct no_os_gpio_init_param ade7978_gpio_rdy_ip
Definition platform.c:79
struct no_os_spi_init_param ade7978_spi_ip
Definition platform.c:88
Header file of Delay functions.
Error codes definition.
Header file of GPIO Interface.
Print messages helpers.
Header file of PWM Interface.
Header file of SPI Interface.
Header file of UART interface.
Header file of Units.
Header file of utility functions.
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