Loading...
Searching...
No Matches
periph_conf.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016-2017 Freie Universität Berlin
3 * 2017 HAW Hamburg
4 *
5 * This file is subject to the terms and conditions of the GNU Lesser
6 * General Public License v2.1. See the file LICENSE in the top level
7 * directory for more details.
8 */
9
22#ifndef PERIPH_CONF_H
23#define PERIPH_CONF_H
24
25#include "periph_cpu.h"
26#include "cfg_clock_32_1.h"
27#include "cfg_rtt_default.h"
28#include "cfg_timer_default.h"
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
39#define CLOCK_CORECLOCK (64000000U) /* fixed for all nRF52832 */
46static const uart_conf_t uart_config[] = {
47 {
48 .dev = NRF_UARTE0,
49 .rx_pin = GPIO_PIN(0, 30),
50 .tx_pin = GPIO_PIN(0, 31),
51#ifdef MODULE_PERIPH_UART_HW_FC
52 .rts_pin = GPIO_UNDEF,
53 .cts_pin = GPIO_UNDEF,
54#endif
55 .irqn = UARTE0_UART0_IRQn,
56 },
57};
58
59#define UART_NUMOF ARRAY_SIZE(uart_config)
60#define UART_0_ISR (isr_uart0)
67static const spi_conf_t spi_config[] = {
68 {
69 .dev = NRF_SPIM0,
70 .sclk = 4,
71 .mosi = 3,
72 .miso = 13,
73 .ppi = 0
74 }
75};
76
77#define SPI_NUMOF ARRAY_SIZE(spi_config)
84static const i2c_conf_t i2c_config[] = {
85 {
86 .dev = NRF_TWIM1,
87 .scl = 28,
88 .sda = 29,
89 .speed = I2C_SPEED_NORMAL
90 }
91};
92
93#define I2C_NUMOF ARRAY_SIZE(i2c_config)
96#ifdef __cplusplus
97}
98#endif
99
100#endif /* PERIPH_CONF_H */
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:46
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
Definition periph_cpu.h:278
Common clock configuration for the nRF52 based boards.
I2C configuration structure.
Definition periph_cpu.h:299
TWI_t * dev
Pointer to hardware module registers.
Definition periph_cpu.h:300
SPI device configuration.
Definition periph_cpu.h:337
SPI_t * dev
pointer to the used SPI device
Definition periph_cpu.h:338
UART device configuration.
Definition periph_cpu.h:218
USART_t * dev
pointer to the used UART device
Definition periph_cpu.h:219