mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-28 16:01:18 +01:00
drivers/periph_common: guard spi_init() by spi module
This commit is contained in:
parent
5c6c439920
commit
3ebcdfd400
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Freie Universität Berlin
|
||||
* 2017 Kaspar Schleiser <kaspar@schleiser.de>
|
||||
*
|
||||
* 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
|
||||
@ -14,16 +15,19 @@
|
||||
* @brief Common static peripheral driver initialization implementation
|
||||
*
|
||||
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
||||
* @author Kaspar Schleiser <kaspar@schleiser.de>
|
||||
*
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef MODULE_PERIPH_SPI
|
||||
#include "periph/spi.h"
|
||||
#endif
|
||||
|
||||
void periph_init(void)
|
||||
{
|
||||
/* initialize configured SPI devices */
|
||||
#ifdef SPI_NUMOF
|
||||
#ifdef MODULE_PERIPH_SPI
|
||||
for (unsigned i = 0; i < SPI_NUMOF; i++) {
|
||||
spi_init(SPI_DEV(i));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user