Loading...
Searching...
No Matches
periph_conf.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021 BISSELL Homecare, Inc.
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 <stdint.h>
23
24#include "cpu.h"
25#include "periph_cpu.h"
26#include "clk_conf.h"
27#include "cfg_rtt_default.h"
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
37static const timer_conf_t timer_config[] = {
38 {
39 .dev = TIM1,
40 .max = 0x0000ffff,
41 .rcc_mask = RCC_APBENR2_TIM1EN,
42 .bus = APB12,
43 .irqn = TIM1_CC_IRQn
44 }
45};
46
47#define TIMER_0_ISR isr_tim1_cc
48#define TIMER_0_MAX_VALUE 0xffff
49
50#define TIMER_NUMOF ARRAY_SIZE(timer_config)
57static const uart_conf_t uart_config[] = {
58 {
59 .dev = USART1,
60 .rcc_mask = RCC_APBENR2_USART1EN,
61 .rx_pin = GPIO_PIN(PORT_B, 7),
62 .tx_pin = GPIO_PIN(PORT_B, 6),
63 .rx_af = GPIO_AF0,
64 .tx_af = GPIO_AF0,
65 .bus = APB12,
66 .irqn = USART1_IRQn,
67 }
68};
69
70#define UART_0_ISR (isr_usart1)
71
72#define UART_NUMOF ARRAY_SIZE(uart_config)
75#ifdef __cplusplus
76}
77#endif
78
79#endif /* PERIPH_CONF_H */
@ PORT_B
port B
Definition periph_cpu.h:48
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:46
@ GPIO_AF0
use alternate function 0
Definition cpu_gpio.h:102
Timer device configuration.
Definition periph_cpu.h:264
TC0_t * dev
Pointer to the used as Timer device.
Definition periph_cpu.h:265
UART device configuration.
Definition periph_cpu.h:218
USART_t * dev
pointer to the used UART device
Definition periph_cpu.h:219