2019-04-10 16:33:29 +02:00
|
|
|
/*
|
|
|
|
* 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[] = {
|
|
|
|
{
|
2020-05-11 21:07:35 +02:00
|
|
|
.dev = NRF_SPIM0,
|
2019-04-10 16:33:29 +02:00
|
|
|
.sclk = GPIO_PIN(0, 15),
|
|
|
|
.mosi = GPIO_PIN(0, 13),
|
|
|
|
.miso = GPIO_PIN(0, 14),
|
2020-05-11 21:07:35 +02:00
|
|
|
#ifdef ERRATA_SPI_SINGLE_BYTE_WORKAROUND
|
|
|
|
.ppi = 0,
|
|
|
|
#endif
|
2019-04-10 16:33:29 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2019-07-18 15:14:29 +02:00
|
|
|
#define SPI_NUMOF ARRAY_SIZE(spi_config)
|
2019-04-10 16:33:29 +02:00
|
|
|
/** @} */
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* CFG_SPI_DEFAULT_H */
|
|
|
|
/** @} */
|