Loading...
Searching...
No Matches
periph_conf.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2020 Benjamin Valentin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
18
19#include "periph_cpu.h"
20#include "cfg_clock_32_1.h"
21#include "cfg_rtt_default.h"
22#include "cfg_timer_default.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
36static const uart_conf_t uart_config[] = {
37 {
38 .dev = NRF_UARTE0,
39 .rx_pin = GPIO_PIN(0, 6),
40 .tx_pin = GPIO_PIN(0, 7),
41#ifdef MODULE_PERIPH_UART_HW_FC
42 .rts_pin = GPIO_UNDEF,
43 .cts_pin = GPIO_UNDEF,
44#endif
45 .irqn = UARTE0_UART0_IRQn,
46 },
47};
48
49#define UART_0_ISR isr_uart0
50
51#define UART_NUMOF ARRAY_SIZE(uart_config)
53
62static const pwm_conf_t pwm_config[] = {
63 { NRF_PWM0, { GPIO_PIN(0, 23), GPIO_PIN(0, 22), GPIO_PIN(0, 24) } }
64};
65#define PWM_NUMOF ARRAY_SIZE(pwm_config)
67
68#ifdef __cplusplus
69}
70#endif
71
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:42
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
Common clock configuration for the nRF52 based boards.
PWM device configuration.
UART device configuration.
Definition periph_cpu.h:214