1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-22 04:53:50 +01:00
RIOT/boards/iotlab-m3/include/periph_conf.h

73 lines
1.5 KiB
C

/*
* SPDX-FileCopyrightText: 2014-2016 Freie Universität Berlin
* SPDX-License-Identifier: LGPL-2.1-only
*/
#pragma once
/**
* @ingroup boards_iotlab-m3
* @{
*
* @file
* @brief Peripheral MCU configuration for the iotlab-m3 board
*
* @author Thomas Eichinger <thomas.eichinger@fu-berlin.de>
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
*/
#include "periph_cpu.h"
#include "periph_conf_common.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name SPI configuration
* @{
*/
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),
.cs_pin = SPI_CS_UNDEF,
.rccmask = RCC_APB2ENR_SPI1EN,
.apbbus = APB2,
#ifdef MODULE_PERIPH_DMA
.tx_dma = DMA_STREAM_UNDEF,
.tx_dma_chan = 1,
.rx_dma = DMA_STREAM_UNDEF,
.rx_dma_chan = 1,
#endif
},
#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),
.cs_pin = SPI_CS_UNDEF,
.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
};
#define SPI_NUMOF ARRAY_SIZE(spi_config)
/** @} */
#ifdef __cplusplus
}
#endif
/** @} */