Loading...
Searching...
No Matches
periph_conf.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2020 Freie Universität Berlin
3 * SPDX-FileCopyrightText: 2023 HAW Hamburg
4 * SPDX-License-Identifier: LGPL-2.1-only
5 */
6
7#pragma once
8
21
22#include "board.h"
23#include "periph_cpu.h"
24#include "cfg_clock_32_0.h"
25#include "cfg_rtt_default.h"
26#include "cfg_timer_default.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
36static const uart_conf_t uart_config[] = {
37 {
38 .dev = NRF_UARTE0,
39 .rx_pin = GPIO_PIN(0, 24),
40 .tx_pin = GPIO_PIN(0, 25),
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
58static const spi_conf_t spi_config[] = {
59 {
60 .dev = NRF_SPIM0,
61 .sclk = GPIO_PIN(0, 14),
62 .mosi = GPIO_PIN(0, 13),
63 .miso = GPIO_PIN(0, 15),
64 },
65 {
66 .dev = NRF_SPIM1,
67 .sclk = GPIO_PIN(0, 19),
68 .mosi = GPIO_PIN(0, 17),
69 .miso = GPIO_PIN(0, 22),
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 = 11,
84 .sda = 12,
85 .speed = I2C_SPEED_NORMAL
86 }
87};
88#define I2C_NUMOF ARRAY_SIZE(i2c_config)
90
98static const pdm_conf_t pdm_config = {
99 .din_pin = PDM_DIN_PIN,
100 .clk_pin = PDM_CLK_PIN,
101};
102
103
104#ifdef __cplusplus
105}
106#endif
107
#define PDM_DIN_PIN
GPIO pin for the data line.
Definition board.h:124
#define PDM_CLK_PIN
GPIO pin for the clock.
Definition board.h:131
Board specific configuration for the Adafruit Feather nRF52840 Sense.
#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
static const pdm_conf_t pdm_config
PDM configuration.
Common clock configuration for the nRF52 based boards.
#define NRF_UARTE0
UART 0.
Definition periph_cpu.h:54
I2C configuration structure.
Definition periph_cpu.h:295
Structure for PDM configuration data.
Definition periph_cpu.h:94
SPI device configuration.
Definition periph_cpu.h:333
UART device configuration.
Definition periph_cpu.h:214