boards/f4vi1/include/periph_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Freie Universit├Ąt Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser General
5  * Public License v2.1. See the file LICENSE in the top level directory for more
6  * details.
7  */
8 
21 #ifndef PERIPH_CONF_H
22 #define PERIPH_CONF_H
23 
24 #include "periph_cpu.h"
25 #include "f4/cfg_clock_168_16_0.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
35 static const timer_conf_t timer_config[] = {
36  {
37  .dev = TIM2,
38  .max = 0xffffffff,
39  .rcc_mask = RCC_APB1ENR_TIM2EN,
40  .bus = APB1,
41  .irqn = TIM2_IRQn
42  },
43  {
44  .dev = TIM5,
45  .max = 0xffffffff,
46  .rcc_mask = RCC_APB1ENR_TIM5EN,
47  .bus = APB1,
48  .irqn = TIM5_IRQn
49  }
50 };
51 
52 #define TIMER_0_ISR isr_tim2
53 #define TIMER_1_ISR isr_tim5
54 
55 #define TIMER_NUMOF (sizeof(timer_config) / sizeof(timer_config[0]))
56 
62 static const uart_conf_t uart_config[] = {
63  {
64  .dev = USART6,
65  .rcc_mask = RCC_APB2ENR_USART6EN,
66  .rx_pin = GPIO_PIN(PORT_C, 7),
67  .tx_pin = GPIO_PIN(PORT_C, 6),
68  .rx_af = GPIO_AF8,
69  .tx_af = GPIO_AF8,
70  .bus = APB2,
71  .irqn = USART6_IRQn,
72 #ifdef UART_USE_DMA
73  .dma_stream = 14,
74  .dma_chan = 5
75 #endif
76  }
77 };
78 
79 #define UART_0_ISR (isr_usart6)
80 #define UART_0_DMA_ISR (isr_dma2_stream6)
81 
82 #define UART_NUMOF (sizeof(uart_config) / sizeof(uart_config[0]))
83 
89 #define ADC_NUMOF (0)
90 
92 #ifdef __cplusplus
93 }
94 #endif
95 
96 #endif /* PERIPH_CONF_H */
97 
cc2538_uart_t * dev
pointer to the used UART device
use alternate function 8
Configure STM32F4 clock to 168MHz using PLL.
NRF_TIMER_Type * dev
timer device
UART device configuration.
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Timer configuration.