Go to the documentation of this file.
33 #ifndef __PLATFORM_H__
34 #define __PLATFORM_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"
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
67 #define GPIO_RDY_PORT 2
68 #define GPIO_RDY_PIN 10
70 #define SPI_DEVICE_ID 1
71 #define SPI_BAUDRATE 1000000
75 #define SPI_SLAVE_NUM 3
78 #define UART_BAUD 115200
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
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
Header file of SPI Interface.
@ NO_OS_UART_STOP_1_BIT
Definition: no_os_uart.h:94
int32_t no_os_gpio_get_value(struct no_os_gpio_desc *desc, uint8_t *value)
Get the value of the specified GPIO.
Definition: no_os_gpio.c:221
#define pr_err(fmt, args...)
Definition: no_os_print_log.h:88
@ SPI_SS_POL_LOW
Definition: maxim_spi.h:49
Header file of Delay functions.
int32_t port
Definition: no_os_gpio.h:81
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:117
@ NO_OS_PULL_NONE
Definition: no_os_gpio.h:66
@ NO_OS_SPI_MODE_3
Definition: no_os_spi.h:67
@ NO_OS_GPIO_LOW
Definition: no_os_gpio.h:115
uint32_t device_id
Definition: no_os_spi.h:142
enum max_uart_flow_ctrl flow
Definition: maxim_uart.h:56
int32_t no_os_irq_set_priority(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, uint32_t priority_level)
Set the priority for an interrupt.
Definition: no_os_irq.c:216
Maxim specific SPI initialization parameters.
Definition: maxim_spi.h:53
struct no_os_irq_ctrl_desc * ade7913_nvic_desc
Definition: main.c:54
const struct no_os_irq_platform_ops max_irq_ops
maxim specific IRQ platform ops structure
Definition: maxim_irq.c:657
const struct no_os_irq_platform_ops * platform_ops
Definition: no_os_irq.h:111
const struct no_os_spi_platform_ops max_spi_ops
maxim platform specific SPI platform ops structure
Definition: maxim_spi.c:795
int32_t no_os_irq_ctrl_init(struct no_os_irq_ctrl_desc **desc, const struct no_os_irq_init_param *param)
Initialize the IRQ interrupts.
Definition: no_os_irq.c:45
Aditional UART config parameters.
Definition: maxim_uart.h:55
@ UART_FLOW_DIS
Definition: maxim_uart.h:47
const struct no_os_gpio_platform_ops max_gpio_ops
maxim platform specific GPIO platform ops structure
Definition: maxim_gpio.c:320
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
Header file of ADE7913 Driver.
mxc_gpio_vssel_t vssel
Definition: maxim_gpio.h:57
const struct no_os_uart_platform_ops max_uart_ops
Maxim platform specific UART platform ops structure.
Definition: maxim_uart.c:475
GPIO platform specific init parameters.
Definition: maxim_gpio.h:55
uint32_t num_slaves
Definition: maxim_spi.h:54
Header file of PWM Interface.
@ NO_OS_SPI_BIT_ORDER_MSB_FIRST
Definition: no_os_spi.h:76
Structure holding the parameters for UART initialization.
Definition: no_os_uart.h:110
int32_t no_os_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: no_os_gpio.c:197
Structure holding the initial parameters for Interrupt Request.
Definition: no_os_irq.h:107
@ NO_OS_UART_PAR_NO
Definition: no_os_uart.h:77
int32_t no_os_irq_ctrl_remove(struct no_os_irq_ctrl_desc *desc)
Free the resources allocated by no_os_irq_ctrl_init().
Definition: no_os_irq.c:71
uint8_t device_id
Definition: no_os_uart.h:112
@ NO_OS_PULL_UP
Definition: no_os_gpio.h:68
int32_t no_os_irq_enable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Enable specific interrupt.
Definition: no_os_irq.c:181
Header file of GPIO Interface.
Header file of UART interface.
Header file of utility functions.
@ NO_OS_SPI_MODE_0
Definition: no_os_spi.h:61
Definition: no_os_irq.h:123
@ NO_OS_UART_CS_8
Definition: no_os_uart.h:66
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140