no-OS
Loading...
Searching...
No Matches
platform.h
Go to the documentation of this file.
1/***************************************************************************/
33#ifndef __PLATFORM_H__
34#define __PLATFORM_H__
35
36#include "ade9078.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 PSM0 init params
59// GPIO PSM1 init params
61// GPIO Reset init params
63// SPI init params
65
66// Toggle Led
67int interface_toggle_led(struct no_os_gpio_desc *gpio_led_desc);
68
69/* Configuration for AD-APARD32690-SL */
70// Port and Pin for user LED
71#define GPIO_LED_PORT 2
72#define GPIO_LED_PIN 1
73// Port and Pin for PSM0
74#define GPIO_PSM0_PORT 2
75#define GPIO_PSM0_PIN 7
76// Port and Pin for PSM1
77#define GPIO_PSM1_PORT 2
78#define GPIO_PSM1_PIN 8
79// Port and Pin for PSM1
80#define GPIO_RESET_PORT 2
81#define GPIO_RESET_PIN 9
82
83#define GPIO_OPS &max_gpio_ops
84#define GPIO_EXTRA &ade9078_gpio_extra_ip
85// SPI config
86#define SPI_DEVICE_ID 1
87#define SPI_BAUDRATE 1000000
88#define SPI_CS 0
89#define SPI_SLAVE_NUM 1
90// UART config
91#define UART_DEV_ID 0
92#define UART_BAUD 115200
93
94#define RESET_TIME 500
95// Read data interval in ms
96#define READ_INTERVAL 3000
97
98#endif // __PLATFORM_H__
struct no_os_uart_init_param uart_ip
Definition common_data.c:55
Header file of ADE9078 Driver.
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_gpio_init_param gpio_psm1_ip
Definition platform.c:79
struct no_os_gpio_init_param gpio_psm0_ip
Definition platform.c:70
struct no_os_spi_init_param ade9078_spi_ip
Definition platform.c:98
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 parameters for SPI initialization.
Definition no_os_spi.h:128
Structure holding the parameters for UART initialization.
Definition no_os_uart.h:98