mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-24 22:13:52 +01:00
boards/common/nrf52xxxdk: Split off SPI config
Moved SPI config from boards/common/nrf52xxxdk/include/periph_config.h to boards/common/nrf52/include/cfg_spi_default.h. This allows all nRF52 based boards to use this SPI config if applicable and also allows nRF52*-DK boards to use custom SPI configs, if needed.
This commit is contained in:
parent
d925540528
commit
3a92b79eea
50
boards/common/nrf52/include/cfg_spi_default.h
Normal file
50
boards/common/nrf52/include/cfg_spi_default.h
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (C) 2016-2018 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_common_nrf52
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief Default SPI config for nRF52 based boards
|
||||
*
|
||||
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CFG_SPI_DEFAULT_H
|
||||
#define CFG_SPI_DEFAULT_H
|
||||
|
||||
#include "periph_cpu.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name SPI configuration
|
||||
* @{
|
||||
*/
|
||||
static const spi_conf_t spi_config[] = {
|
||||
{
|
||||
.dev = NRF_SPI0,
|
||||
.sclk = GPIO_PIN(0, 15),
|
||||
.mosi = GPIO_PIN(0, 13),
|
||||
.miso = GPIO_PIN(0, 14),
|
||||
}
|
||||
};
|
||||
|
||||
#define SPI_NUMOF (sizeof(spi_config) / sizeof(spi_config[0]))
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CFG_SPI_DEFAULT_H */
|
||||
/** @} */
|
||||
@ -30,22 +30,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name SPI configuration
|
||||
* @{
|
||||
*/
|
||||
static const spi_conf_t spi_config[] = {
|
||||
{
|
||||
.dev = NRF_SPI0,
|
||||
.sclk = GPIO_PIN(0, 15),
|
||||
.mosi = GPIO_PIN(0, 13),
|
||||
.miso = GPIO_PIN(0, 14),
|
||||
}
|
||||
};
|
||||
|
||||
#define SPI_NUMOF (sizeof(spi_config) / sizeof(spi_config[0]))
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name I2C configuration
|
||||
* @{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user