Loading...
Searching...
No Matches
periph_conf.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021 BISSELL Homecare, Inc.
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include <stdint.h>
19
20#include "cpu.h"
21#include "periph_cpu.h"
22#include "clk_conf.h"
23#include "cfg_rtt_default.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
33static const timer_conf_t timer_config[] = {
34 {
35 .dev = TIM1,
36 .max = 0x0000ffff,
37 .rcc_mask = RCC_APBENR2_TIM1EN,
38 .bus = APB12,
39 .irqn = TIM1_CC_IRQn
40 }
41};
42
43#define TIMER_0_ISR isr_tim1_cc
44#define TIMER_0_MAX_VALUE 0xffff
45
46#define TIMER_NUMOF ARRAY_SIZE(timer_config)
48
53static const uart_conf_t uart_config[] = {
54 {
55 .dev = USART1,
56 .rcc_mask = RCC_APBENR2_USART1EN,
57 .rx_pin = GPIO_PIN(PORT_B, 7),
58 .tx_pin = GPIO_PIN(PORT_B, 6),
59 .rx_af = GPIO_AF0,
60 .tx_af = GPIO_AF0,
61 .bus = APB12,
62 .irqn = USART1_IRQn,
63 }
64};
65
66#define UART_0_ISR (isr_usart1)
67
68#define UART_NUMOF ARRAY_SIZE(uart_config)
70
71#ifdef __cplusplus
72}
73#endif
74
@ PORT_B
port B
Definition periph_cpu.h:44
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:42
@ GPIO_AF0
use alternate function 0
Definition cpu_gpio.h:101
Timer device configuration.
Definition periph_cpu.h:260
UART device configuration.
Definition periph_cpu.h:214