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 "ade7913.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 /* Configuration for AD-APARD32690-SL */
61 // Port and pin for user LED
62 #define GPIO_LED_PORT 2
63 #define GPIO_LED_PIN 1
64 #define GPIO_OPS &max_gpio_ops
65 #define GPIO_EXTRA &ade9153_gpio_extra_ip
66 // Data ready pin
67 #define GPIO_RDY_PORT 2
68 #define GPIO_RDY_PIN 10
69 // SPI config
70 #define SPI_DEVICE_ID 1
71 #define SPI_BAUDRATE 1000000
72 #define SPI_CS0 0
73 #define SPI_CS1 1
74 #define SPI_CS2 2
75 #define SPI_SLAVE_NUM 3
76 // UART config
77 #define UART_DEV_ID 0
78 #define UART_BAUD 115200
79 // IRQ config
80 #define GPIO_IRQ_OPS &max_gpio_irq_ops
81 #define GPIO_CTRL_IRQ_ID 0
82 #define GPIO_IRQ_EXTRA &ade7913_gpio_extra_ip
83 #define NVIC_GPIO_IRQ GPIO2_IRQn
84 
85 /******************************************************************************/
86 /************************ Functions Declarations ******************************/
87 /******************************************************************************/
88 
89 // Init NVIC
91 
92 #endif /* __PLATFORM_H__ */
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.
no_os_error.h
Error codes definition.
ade7913_nvic_desc
struct no_os_irq_ctrl_desc * ade7913_nvic_desc
Definition: main.c:54
ade7913.h
Header file of ADE7913 Driver.
no_os_pwm.h
Header file of PWM Interface.
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.
no_os_irq_ctrl_desc
Definition: no_os_irq.h:123
init_nvic
int init_nvic(struct no_os_irq_ctrl_desc *ade7913_nvic_desc)
Init NVIC.
Definition: platform.c:138