Loading...
Searching...
No Matches
periph_conf.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016-2018 Freie Universität Berlin
3 * SPDX-FileCopyrightText: 2018 Inria
4 * SPDX-License-Identifier: LGPL-2.1-only
5 */
6
7#pragma once
8
20
21#include "periph_conf_common.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
31static const spi_conf_t spi_config[] = {
32 {
33 .dev = NRF_SPIM0,
34 .sclk = GPIO_PIN(0, 25),
35 .mosi = GPIO_PIN(0, 23),
36 .miso = GPIO_PIN(0, 24),
37 .ppi = 0,
38 }
39};
40#define SPI_NUMOF ARRAY_SIZE(spi_config)
42
47static const uart_conf_t uart_config[] = {
48 { /* Mapped to USB virtual COM port */
49 .dev = NRF_UARTE0,
50 .rx_pin = GPIO_PIN(0, 8),
51 .tx_pin = GPIO_PIN(0, 6),
52#ifdef MODULE_PERIPH_UART_HW_FC
53 .rts_pin = GPIO_UNDEF,
54 .cts_pin = GPIO_UNDEF,
55#endif
56 .irqn = UARTE0_UART0_IRQn,
57 },
58};
59
60#define UART_NUMOF ARRAY_SIZE(uart_config)
61#define UART_0_ISR (isr_uart0)
63
64#ifdef __cplusplus
65}
66#endif
67
#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.
SPI device configuration.
Definition periph_cpu.h:333
UART device configuration.
Definition periph_cpu.h:214