mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
54 lines
1.2 KiB
C
54 lines
1.2 KiB
C
/*
|
|
* Copyright (C) 2014 Freie Universität Berlin
|
|
*
|
|
* 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.
|
|
*/
|
|
|
|
/**
|
|
* @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>
|
|
*/
|
|
|
|
#ifndef PERIPH_CONF_H_
|
|
#define PERIPH_CONF_H_
|
|
|
|
#include "periph_cpu.h"
|
|
#include "periph_conf_common.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* @brief SPI configuration
|
|
* @{
|
|
*/
|
|
#define SPI_NUMOF (1U)
|
|
#define SPI_0_EN 1
|
|
|
|
/* SPI 0 device configuration */
|
|
#define SPI_0_DEV SPI1
|
|
#define SPI_0_CLKEN() (RCC->APB2ENR |= RCC_APB2ENR_SPI1EN)
|
|
#define SPI_0_CLKDIS() (RCC->APB2ENR &= ~(RCC_APB2ENR_SPI1EN))
|
|
#define SPI_0_BUS_DIV 1 /* 1 -> SPI runs with full CPU clock, 0 -> half CPU clock */
|
|
/* SPI 0 pin configuration */
|
|
#define SPI_0_CLK_PIN GPIO_PIN(PORT_A,5)
|
|
#define SPI_0_MOSI_PIN GPIO_PIN(PORT_A,7)
|
|
#define SPI_0_MISO_PIN GPIO_PIN(PORT_A,6)
|
|
/** @} */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* PERIPH_CONF_H_ */
|
|
/** @} */
|