Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
periph_conf.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2019 Inria
3
* 2019 Freie Universität Berlin
4
* 2019 Kaspar Schleiser <kaspar@schleiser.de>
5
*
6
* This file is subject to the terms and conditions of the GNU Lesser
7
* General Public License v2.1. See the file LICENSE in the top level
8
* directory for more details.
9
*/
10
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
31
extern
"C"
{
32
#endif
33
38
static
const
spi_conf_t
spi_config[] = {
39
{
40
.
dev
= NRF_SPIM0,
41
.sclk =
GPIO_PIN
(0, 2),
42
.mosi =
GPIO_PIN
(0, 3),
43
.miso =
GPIO_PIN
(0, 4),
44
.ppi = 0,
45
}
46
};
47
48
#define SPI_NUMOF ARRAY_SIZE(spi_config)
49
55
static
const
i2c_conf_t
i2c_config[] = {
56
{
57
.
dev
= NRF_TWIM1,
58
.scl =
GPIO_PIN
(0, 7),
59
.sda =
GPIO_PIN
(0, 6),
60
.speed =
I2C_SPEED_FAST
61
}
62
};
63
64
#define I2C_NUMOF ARRAY_SIZE(i2c_config)
65
70
#define NRF5X_ENABLE_DCDC
71
72
#ifdef __cplusplus
73
}
74
#endif
75
76
#endif
/* PERIPH_CONF_H */
77
cfg_clock_32_1.h
Common clock configuration for the nRF52 based boards.
GPIO_PIN
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition:
periph_cpu.h:35
i2c_conf_t
I2C configuration options.
Definition:
periph_cpu.h:128
I2C_SPEED_FAST
@ I2C_SPEED_FAST
fast mode: ~400 kbit/s
Definition:
i2c.h:178
spi_conf_t::dev
SPI_Type * dev
SPI device to use.
Definition:
periph_cpu.h:465
spi_conf_t
SPI configuration structure type.
Definition:
periph_cpu.h:273
i2c_conf_t::dev
I2C_TypeDef * dev
USART device used.
Definition:
periph_cpu.h:247
Generated on Tue Nov 24 2020 19:46:50 by
1.8.17