no-OS
platform.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef __PLATFORM_H__
34 #define __PLATFORM_H__
35 
36 /******************************************************************************/
37 /***************************** Include Files **********************************/
38 /******************************************************************************/
39 #include "ade9078.h"
40 #include "no_os_uart.h"
41 #include "no_os_pwm.h"
42 #include "no_os_delay.h"
43 #include "no_os_gpio.h"
44 #include "no_os_spi.h"
45 #include "no_os_print_log.h"
46 #include "no_os_units.h"
47 #include "no_os_util.h"
48 #include "no_os_error.h"
49 #include "maxim_uart.h"
50 #include "maxim_gpio.h"
51 #include "maxim_uart_stdio.h"
52 #include "maxim_pwm.h"
53 #include "maxim_spi.h"
54 #include "maxim_irq.h"
55 
56 /******************************************************************************/
57 /********************** Macros and Constants Definitions **********************/
58 /******************************************************************************/
59 
60 // UART init params
61 extern struct no_os_uart_init_param uart_ip;
62 // GPIO LED init params
64 // GPIO PSM0 init params
66 // GPIO PSM1 init params
68 // GPIO Reset init params
70 // SPI init params
72 
73 /* Configuration for AD-APARD32690-SL */
74 // Port and Pin for user LED
75 #define GPIO_LED_PORT 2
76 #define GPIO_LED_PIN 1
77 // Port and Pin for PSM0
78 #define GPIO_PSM0_PORT 2
79 #define GPIO_PSM0_PIN 7
80 // Port and Pin for PSM1
81 #define GPIO_PSM1_PORT 2
82 #define GPIO_PSM1_PIN 8
83 // Port and Pin for PSM1
84 #define GPIO_RESET_PORT 2
85 #define GPIO_RESET_PIN 9
86 
87 #define GPIO_OPS &max_gpio_ops
88 #define GPIO_EXTRA &ade9078_gpio_extra_ip
89 // SPI config
90 #define SPI_DEVICE_ID 1
91 #define SPI_BAUDRATE 1000000
92 #define SPI_CS 0
93 #define SPI_SLAVE_NUM 1
94 // UART config
95 #define UART_DEV_ID 0
96 #define UART_BAUD 115200
97 
98 #define RESET_TIME 500
99 // Read data interval in ms
100 #define READ_INTERVAL 3000
101 
102 #endif // __PLATFORM_H__
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
gpio_reset_ip
struct no_os_gpio_init_param gpio_reset_ip
Definition: platform.c:95
gpio_psm0_ip
struct no_os_gpio_init_param gpio_psm0_ip
Definition: platform.c:77
gpio_led1_ip
struct no_os_gpio_init_param gpio_led1_ip
Definition: platform.c:68
no_os_spi.h
Header file of SPI Interface.
no_os_units.h
Header file of Units.
no_os_delay.h
Header file of Delay functions.
no_os_print_log.h
Print messages helpers.
ade9078_spi_ip
struct no_os_spi_init_param ade9078_spi_ip
Definition: platform.c:105
no_os_error.h
Error codes definition.
no_os_pwm.h
Header file of PWM Interface.
ade9078.h
Header file of ADE9078 Driver.
no_os_uart_init_param
Structure holding the parameters for UART initialization.
Definition: no_os_uart.h:110
uart_ip
struct no_os_uart_init_param uart_ip
Definition: common_data.c:52
no_os_gpio.h
Header file of GPIO Interface.
no_os_uart.h
Header file of UART interface.
no_os_util.h
Header file of utility functions.
gpio_psm1_ip
struct no_os_gpio_init_param gpio_psm1_ip
Definition: platform.c:86
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140