periph_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Freie Universit├Ąt Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
19 #ifndef PERIPH_CONF_H
20 #define PERIPH_CONF_H
21 
22 #include "periph_cpu.h"
23 #include "f7/cfg_clock_216_8_1.h"
24 #include "cfg_i2c1_pb8_pb9.h"
25 #include "cfg_rtt_default.h"
26 #include "cfg_timer_tim2.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
36 static const uart_conf_t uart_config[] = {
37  {
38  .dev = USART3,
39  .rcc_mask = RCC_APB1ENR_USART3EN,
40  .rx_pin = GPIO_PIN(PORT_D, 9),
41  .tx_pin = GPIO_PIN(PORT_D, 8),
42  .rx_af = GPIO_AF7,
43  .tx_af = GPIO_AF7,
44  .bus = APB1,
45  .irqn = USART3_IRQn,
46 #ifdef UART_USE_DMA
47  .dma_stream = 6,
48  .dma_chan = 4
49 #endif
50  },
51  {
52  .dev = USART6,
53  .rcc_mask = RCC_APB2ENR_USART6EN,
54  .rx_pin = GPIO_PIN(PORT_G, 9),
55  .tx_pin = GPIO_PIN(PORT_G, 14),
56  .rx_af = GPIO_AF8,
57  .tx_af = GPIO_AF8,
58  .bus = APB2,
59  .irqn = USART6_IRQn,
60 #ifdef UART_USE_DMA
61  .dma_stream = 5,
62  .dma_chan = 4
63 #endif
64  },
65  {
66  .dev = USART2,
67  .rcc_mask = RCC_APB1ENR_USART2EN,
68  .rx_pin = GPIO_PIN(PORT_D, 6),
69  .tx_pin = GPIO_PIN(PORT_D, 5),
70  .rx_af = GPIO_AF7,
71  .tx_af = GPIO_AF7,
72  .bus = APB1,
73  .irqn = USART2_IRQn,
74 #ifdef UART_USE_DMA
75  .dma_stream = 4,
76  .dma_chan = 4
77 #endif
78  }
79 };
80 
81 #define UART_0_ISR (isr_usart3)
82 #define UART_0_DMA_ISR (isr_dma1_stream6)
83 #define UART_1_ISR (isr_usart6)
84 #define UART_1_DMA_ISR (isr_dma1_stream5)
85 #define UART_2_ISR (isr_usart2)
86 #define UART_2_DMA_ISR (isr_dma1_stream4)
87 
88 #define UART_NUMOF ARRAY_SIZE(uart_config)
89 
91 #ifdef __cplusplus
92 }
93 #endif
94 
95 #endif /* PERIPH_CONF_H */
96 
use alternate function 7
cc2538_uart_t * dev
pointer to the used UART device
Definition: periph_cpu.h:167
use alternate function 8
Common configuration for STM32 I2C.
APB1 bus.
Common configuration for STM32 Timer peripheral based on TIM2.
port D
Definition: periph_cpu.h:39
Configure STM32F7 clock to 216MHz and 8MHz HSE using PLL with LSE.
static const uart_conf_t uart_config[]
Static array with configuration for declared I2C devices.
APB2 bus.
UART device configuration.
Definition: periph_cpu.h:166
port G
Definition: periph_cpu.h:42
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:35