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
9#pragma once
10
20
21#include <stdint.h>
22
23#include "cpu.h"
24#include "periph_cpu.h"
25#include "clk_conf.h"
26#include "cfg_rtt_default.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
36static const timer_conf_t timer_config[] = {
37 {
38 .dev = TIM1,
39 .max = 0x0000ffff,
40 .rcc_mask = RCC_APBENR2_TIM1EN,
41 .bus = APB12,
42 .irqn = TIM1_CC_IRQn
43 }
44};
45
46#define TIMER_0_ISR isr_tim1_cc
47#define TIMER_0_MAX_VALUE 0xffff
48
49#define TIMER_NUMOF ARRAY_SIZE(timer_config)
51
56static const uart_conf_t uart_config[] = {
57 {
58 .dev = USART1,
59 .rcc_mask = RCC_APBENR2_USART1EN,
60 .rx_pin = GPIO_PIN(PORT_B, 7),
61 .tx_pin = GPIO_PIN(PORT_B, 6),
62 .rx_af = GPIO_AF0,
63 .tx_af = GPIO_AF0,
64 .bus = APB12,
65 .irqn = USART1_IRQn,
66 }
67};
68
69#define UART_0_ISR (isr_usart1)
70
71#define UART_NUMOF ARRAY_SIZE(uart_config)
73
74#ifdef __cplusplus
75}
76#endif
77
@ PORT_B
port B
Definition periph_cpu.h:47
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:45
@ GPIO_AF0
use alternate function 0
Definition cpu_gpio.h:101
Timer device configuration.
Definition periph_cpu.h:263
UART device configuration.
Definition periph_cpu.h:217