Loading...
Searching...
No Matches
periph_conf.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2014 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
18
19#include "periph_cpu.h"
20#include "periph_conf_common.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30static const spi_conf_t spi_config[] = {
31 {
32 .dev = SPI2,
33 .mosi_pin = GPIO_PIN(PORT_B, 15),
34 .miso_pin = GPIO_PIN(PORT_B, 14),
35 .sclk_pin = GPIO_PIN(PORT_B, 13),
36 .cs_pin = SPI_CS_UNDEF,
37 .rccmask = RCC_APB1ENR_SPI2EN,
38 .apbbus = APB1
39 }
40};
41
42#define SPI_NUMOF ARRAY_SIZE(spi_config)
44
45#ifdef __cplusplus
46}
47#endif
48
@ PORT_B
port B
Definition periph_cpu.h:44
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:42
#define SPI_CS_UNDEF
Define value for unused CS line.
Definition periph_cpu.h:362
@ APB1
Advanced Peripheral Bus 1.
Definition periph_cpu.h:78
SPI device configuration.
Definition periph_cpu.h:333