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 Freie Universität Berlin
3
*
4
* This file is subject to the terms and conditions of the GNU Lesser General
5
* Public License v2.1. See the file LICENSE in the top level directory for more
6
* 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
= SPI2,
37
.mosi_pin =
GPIO_PIN
(
PORT_B
, 15),
38
.miso_pin =
GPIO_PIN
(
PORT_B
, 14),
39
.sclk_pin =
GPIO_PIN
(
PORT_B
, 13),
40
.cs_pin =
GPIO_UNDEF
,
41
.rccmask = RCC_APB1ENR_SPI2EN,
42
.apbbus =
APB1
43
}
44
};
45
46
#define SPI_NUMOF ARRAY_SIZE(spi_config)
47
49
#ifdef __cplusplus
50
}
51
#endif
52
53
#endif
/* PERIPH_CONF_H */
54
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
PORT_B
@ PORT_B
port B
Definition:
periph_cpu.h:37
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
APB1
@ APB1
APB1 bus.
Definition:
periph_cpu.h:176
Generated on Tue Nov 24 2020 19:46:50 by
1.8.17