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) 2014-2016 Freie Universität Berlin
3
*
4
* This file is subject to the terms and conditions of the GNU Lesser
5
* General Public License v2.1. See the file LICENSE in the top level
6
* directory for more details.
7
*/
8
20
#ifndef PERIPH_CONF_H
21
#define PERIPH_CONF_H
22
23
#include "periph_cpu.h"
24
#include "periph_conf_common.h"
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
34
static
const
spi_conf_t
spi_config[] = {
35
{
36
.
dev
= SPI1,
37
.mosi_pin =
GPIO_PIN
(
PORT_A
, 7),
38
.miso_pin =
GPIO_PIN
(
PORT_A
, 6),
39
.sclk_pin =
GPIO_PIN
(
PORT_A
, 5),
40
.cs_pin =
GPIO_UNDEF
,
41
.rccmask = RCC_APB2ENR_SPI1EN,
42
.apbbus =
APB2
,
43
#ifdef MODULE_PERIPH_DMA
44
.tx_dma = DMA_STREAM_UNDEF,
45
.tx_dma_chan = 1,
46
.rx_dma = DMA_STREAM_UNDEF,
47
.rx_dma_chan = 1,
48
#endif
49
}
50
};
51
52
#define SPI_NUMOF ARRAY_SIZE(spi_config)
53
55
#ifdef __cplusplus
56
}
57
#endif
58
59
#endif
/* PERIPH_CONF_H */
60
PORT_A
@ PORT_A
port A
Definition:
periph_cpu.h:36
GPIO_UNDEF
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
Definition:
periph_cpu_common.h:52
GPIO_PIN
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition:
periph_cpu.h:35
APB2
@ APB2
APB2 bus.
Definition:
periph_cpu.h:177
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
Generated on Tue Nov 24 2020 19:46:50 by
1.8.17