1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/drivers/soft_spi/include/soft_spi_params.h
2017-11-13 10:11:06 +01:00

61 lines
1.3 KiB
C

/*
* Copyright (C) 2017 Hamburg University of Applied Sciences
*
* 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 driver_soft_spi
* @{
*
* @file
* @brief Software SPI configuration
*
* @author Markus Blechschmidt <Markus.Blechschmidt@haw-hamburg.de>
*/
#ifndef SOFT_SPI_PARAMS_H
#define SOFT_SPI_PARAMS_H
#include "soft_spi.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifndef SOFT_SPI_PARAM_MISO
#define SOFT_SPI_PARAM_MISO (GPIO_UNDEF)
#endif
#ifndef SOFT_SPI_PARAM_MOSI
#define SOFT_SPI_PARAM_MOSI (GPIO_PIN(0, 0))
#endif
#ifndef SOFT_SPI_PARAM_CLK
#define SOFT_SPI_PARAM_CLK (GPIO_PIN(0, 1))
#endif
#define SOFT_SPI_PARAMS_DEFAULT {\
.miso_pin = SOFT_SPI_PARAM_MISO,\
.mosi_pin = SOFT_SPI_PARAM_MOSI,\
.clk_pin = SOFT_SPI_PARAM_CLK,\
}
/**
* @brief Sotware SPI port descriptor array
*/
static soft_spi_conf_t soft_spi_config[] = {
#ifdef SOFT_SPI_PARAMS_CUSTOM
SOFT_SPI_PARAMS_CUSTOM,
#else
SOFT_SPI_PARAMS_DEFAULT,
#endif
};
#ifdef __cplusplus
}
#endif
#endif /* SOFT_SPI_PARAMS_H */
/** @} */