2014-06-11 14:59:24 +02:00
|
|
|
/*
|
2016-11-08 18:28:32 +01:00
|
|
|
* Copyright (C) 2014-2016 Freie Universität Berlin
|
2014-06-11 14:59:24 +02:00
|
|
|
*
|
2016-11-08 18:28:32 +01:00
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
2014-06-11 14:59:24 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2015-08-19 20:59:06 +02:00
|
|
|
* @ingroup boards_iotlab-m3
|
2014-06-11 14:59:24 +02:00
|
|
|
* @{
|
|
|
|
*
|
2014-10-21 16:52:30 +02:00
|
|
|
* @file
|
2015-08-19 20:59:06 +02:00
|
|
|
* @brief Peripheral MCU configuration for the iotlab-m3 board
|
2014-06-11 14:59:24 +02:00
|
|
|
*
|
|
|
|
* @author Thomas Eichinger <thomas.eichinger@fu-berlin.de>
|
2014-09-29 18:09:18 +02:00
|
|
|
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
2014-06-11 14:59:24 +02:00
|
|
|
*/
|
2014-09-29 18:09:18 +02:00
|
|
|
|
2017-01-18 13:00:05 +01:00
|
|
|
#ifndef PERIPH_CONF_H
|
|
|
|
#define PERIPH_CONF_H
|
2014-06-11 14:59:24 +02:00
|
|
|
|
2016-03-01 13:59:13 +01:00
|
|
|
#include "periph_cpu.h"
|
2016-03-18 18:33:53 +01:00
|
|
|
#include "periph_conf_common.h"
|
2016-03-01 13:59:13 +01:00
|
|
|
|
2014-10-13 15:25:50 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2014-06-11 14:59:24 +02:00
|
|
|
/**
|
2017-01-26 18:14:32 +01:00
|
|
|
* @name SPI configuration
|
2014-09-29 18:09:18 +02:00
|
|
|
* @{
|
2014-06-11 14:59:24 +02:00
|
|
|
*/
|
2016-11-08 18:28:32 +01:00
|
|
|
static const spi_conf_t spi_config[] = {
|
|
|
|
{
|
|
|
|
.dev = SPI1,
|
|
|
|
.mosi_pin = GPIO_PIN(PORT_A, 7),
|
|
|
|
.miso_pin = GPIO_PIN(PORT_A, 6),
|
|
|
|
.sclk_pin = GPIO_PIN(PORT_A, 5),
|
2022-01-04 12:31:20 +01:00
|
|
|
.cs_pin = SPI_CS_UNDEF,
|
2016-11-08 18:28:32 +01:00
|
|
|
.rccmask = RCC_APB2ENR_SPI1EN,
|
2019-01-07 12:53:20 +01:00
|
|
|
.apbbus = APB2,
|
|
|
|
#ifdef MODULE_PERIPH_DMA
|
2019-01-15 17:46:16 +01:00
|
|
|
.tx_dma = DMA_STREAM_UNDEF,
|
2019-01-07 12:53:20 +01:00
|
|
|
.tx_dma_chan = 1,
|
2019-01-15 17:46:16 +01:00
|
|
|
.rx_dma = DMA_STREAM_UNDEF,
|
2019-01-07 12:53:20 +01:00
|
|
|
.rx_dma_chan = 1,
|
|
|
|
#endif
|
2021-12-04 00:32:36 +01:00
|
|
|
},
|
|
|
|
#ifdef MODULE_MTD
|
|
|
|
{
|
|
|
|
.dev = SPI2,
|
|
|
|
.mosi_pin = GPIO_PIN(PORT_B, 15),
|
|
|
|
.miso_pin = GPIO_PIN(PORT_B, 14),
|
|
|
|
.sclk_pin = GPIO_PIN(PORT_B, 13),
|
2022-01-04 12:31:20 +01:00
|
|
|
.cs_pin = SPI_CS_UNDEF,
|
2021-12-04 00:32:36 +01:00
|
|
|
.rccmask = RCC_APB1ENR_SPI2EN,
|
|
|
|
.apbbus = APB1,
|
|
|
|
#ifdef MODULE_PERIPH_DMA
|
|
|
|
.tx_dma = DMA_STREAM_UNDEF,
|
|
|
|
.tx_dma_chan = 1,
|
|
|
|
.rx_dma = DMA_STREAM_UNDEF,
|
|
|
|
.rx_dma_chan = 1,
|
|
|
|
#endif
|
|
|
|
},
|
|
|
|
#endif
|
2016-11-08 18:28:32 +01:00
|
|
|
};
|
|
|
|
|
2019-07-18 15:14:29 +02:00
|
|
|
#define SPI_NUMOF ARRAY_SIZE(spi_config)
|
2014-09-29 18:09:18 +02:00
|
|
|
/** @} */
|
2014-06-11 14:59:24 +02:00
|
|
|
|
2014-10-13 15:25:50 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2017-01-18 13:00:05 +01:00
|
|
|
#endif /* PERIPH_CONF_H */
|
2014-06-11 14:59:24 +02:00
|
|
|
/** @} */
|