Loading...
Searching...
No Matches
periph_conf.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016-2017 Freie Universität Berlin
3 * SPDX-FileCopyrightText: 2017 HAW Hamburg
4 * SPDX-License-Identifier: LGPL-2.1-only
5 */
6
7#pragma once
8
20
21#include "periph_cpu.h"
22#include "cfg_clock_32_1.h"
23#include "cfg_rtt_default.h"
24#include "cfg_timer_default.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
35#define CLOCK_CORECLOCK (64000000U) /* fixed for all nRF52832 */
37
42static const uart_conf_t uart_config[] = {
43 {
44 .dev = NRF_UARTE0,
45 .rx_pin = GPIO_PIN(0, 30),
46 .tx_pin = GPIO_PIN(0, 31),
47#ifdef MODULE_PERIPH_UART_HW_FC
48 .rts_pin = GPIO_UNDEF,
49 .cts_pin = GPIO_UNDEF,
50#endif
51 .irqn = UARTE0_UART0_IRQn,
52 },
53};
54
55#define UART_NUMOF ARRAY_SIZE(uart_config)
56#define UART_0_ISR (isr_uart0)
58
63static const spi_conf_t spi_config[] = {
64 {
65 .dev = NRF_SPIM0,
66 .sclk = 4,
67 .mosi = 3,
68 .miso = 13,
69 .ppi = 0
70 }
71};
72
73#define SPI_NUMOF ARRAY_SIZE(spi_config)
75
80static const i2c_conf_t i2c_config[] = {
81 {
82 .dev = NRF_TWIM1,
83 .scl = 28,
84 .sda = 29,
85 .speed = I2C_SPEED_NORMAL
86 }
87};
88
89#define I2C_NUMOF ARRAY_SIZE(i2c_config)
91
92#ifdef __cplusplus
93}
94#endif
95
#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.
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
Definition periph_cpu.h:274
Common clock configuration for the nRF52 based boards.
I2C configuration structure.
Definition periph_cpu.h:295
SPI device configuration.
Definition periph_cpu.h:333
UART device configuration.
Definition periph_cpu.h:214