2015-11-13 16:27:34 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2015 Kaspar Schleiser <kaspar@schleiser.de>
|
|
|
|
* 2015 Hauke Petersen <hauke.petersen@fu-berlin.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 details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ingroup drivers_at86rf2xx
|
|
|
|
* @{
|
|
|
|
* @file
|
|
|
|
* @brief Default configuration for the AT86RF2xx driver
|
|
|
|
*
|
|
|
|
* @author Kaspar Schleiser <kaspar@schleiser.de>
|
|
|
|
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef AT86RF2XX_PARAMS_H
|
|
|
|
#define AT86RF2XX_PARAMS_H
|
|
|
|
|
2022-03-22 11:36:24 +01:00
|
|
|
#include "at86rf2xx.h"
|
2015-11-13 16:27:34 +01:00
|
|
|
#include "board.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
2017-08-29 18:00:46 +02:00
|
|
|
* @name Set default configuration parameters for the AT86RF2xx driver
|
2015-11-13 16:27:34 +01:00
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#ifndef AT86RF2XX_PARAM_SPI
|
2023-01-04 21:20:00 +01:00
|
|
|
/**
|
|
|
|
* @brief SPI bus the AT86RF2xx is connected to
|
|
|
|
*/
|
2016-11-08 18:39:59 +01:00
|
|
|
#define AT86RF2XX_PARAM_SPI (SPI_DEV(0))
|
2015-11-13 16:27:34 +01:00
|
|
|
#endif
|
2023-01-04 21:20:00 +01:00
|
|
|
|
2016-11-08 18:39:59 +01:00
|
|
|
#ifndef AT86RF2XX_PARAM_SPI_CLK
|
2023-01-04 21:20:00 +01:00
|
|
|
/**
|
|
|
|
* @brief Clock to drive the SPI bus when speaking with the AT86RF2xx
|
|
|
|
*/
|
2016-11-08 18:39:59 +01:00
|
|
|
#define AT86RF2XX_PARAM_SPI_CLK (SPI_CLK_5MHZ)
|
2015-11-13 16:27:34 +01:00
|
|
|
#endif
|
2023-01-04 21:20:00 +01:00
|
|
|
|
2015-11-13 16:27:34 +01:00
|
|
|
#ifndef AT86RF2XX_PARAM_CS
|
2023-01-04 21:20:00 +01:00
|
|
|
/**
|
|
|
|
* @brief GPIO pin the CS pin of the AT86RF2xx is connected to
|
|
|
|
*/
|
2015-11-13 16:27:34 +01:00
|
|
|
#define AT86RF2XX_PARAM_CS (GPIO_PIN(0, 0))
|
|
|
|
#endif
|
2023-01-04 21:20:00 +01:00
|
|
|
|
2015-11-13 16:27:34 +01:00
|
|
|
#ifndef AT86RF2XX_PARAM_INT
|
2023-01-04 21:20:00 +01:00
|
|
|
/**
|
|
|
|
* @brief GPIO pin the INT pin of the AT86RF2xx is connected to
|
|
|
|
*/
|
2015-11-13 16:27:34 +01:00
|
|
|
#define AT86RF2XX_PARAM_INT (GPIO_PIN(0, 1))
|
|
|
|
#endif
|
2023-01-04 21:20:00 +01:00
|
|
|
|
2015-11-13 16:27:34 +01:00
|
|
|
#ifndef AT86RF2XX_PARAM_SLEEP
|
2023-01-04 21:20:00 +01:00
|
|
|
/**
|
|
|
|
* @brief GPIO pin the SLEEP pin of the AT86RF2xx is connected to
|
|
|
|
*/
|
2015-11-13 16:27:34 +01:00
|
|
|
#define AT86RF2XX_PARAM_SLEEP (GPIO_PIN(0, 2))
|
|
|
|
#endif
|
2023-01-04 21:20:00 +01:00
|
|
|
|
2015-11-13 16:27:34 +01:00
|
|
|
#ifndef AT86RF2XX_PARAM_RESET
|
2023-01-04 21:20:00 +01:00
|
|
|
/**
|
|
|
|
* @brief GPIO pin the RESET pin of the AT86RF2xx is connected to
|
|
|
|
*/
|
2015-11-13 16:27:34 +01:00
|
|
|
#define AT86RF2XX_PARAM_RESET (GPIO_PIN(0, 3))
|
|
|
|
#endif
|
|
|
|
|
2018-02-28 18:23:28 +01:00
|
|
|
#ifndef AT86RF2XX_PARAMS
|
2023-01-04 21:20:00 +01:00
|
|
|
/**
|
|
|
|
* @brief Parameters to initialize the AT86RF2xx driver with
|
|
|
|
*/
|
2018-02-28 18:23:28 +01:00
|
|
|
#define AT86RF2XX_PARAMS { .spi = AT86RF2XX_PARAM_SPI, \
|
|
|
|
.spi_clk = AT86RF2XX_PARAM_SPI_CLK, \
|
|
|
|
.cs_pin = AT86RF2XX_PARAM_CS, \
|
|
|
|
.int_pin = AT86RF2XX_PARAM_INT, \
|
|
|
|
.sleep_pin = AT86RF2XX_PARAM_SLEEP, \
|
|
|
|
.reset_pin = AT86RF2XX_PARAM_RESET }
|
|
|
|
#endif
|
2015-11-13 16:27:34 +01:00
|
|
|
/**@}*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief AT86RF231 configuration
|
|
|
|
*/
|
2022-11-24 16:50:58 +01:00
|
|
|
#if AT86RF2XX_IS_PERIPH
|
2019-10-21 01:07:44 +02:00
|
|
|
static const uint8_t at86rf2xx_params[] =
|
|
|
|
{
|
|
|
|
0 /* dummy value */
|
|
|
|
};
|
|
|
|
#else
|
2015-11-13 16:27:34 +01:00
|
|
|
static const at86rf2xx_params_t at86rf2xx_params[] =
|
|
|
|
{
|
2018-02-28 18:23:28 +01:00
|
|
|
AT86RF2XX_PARAMS
|
2015-11-13 16:27:34 +01:00
|
|
|
};
|
2019-10-21 01:07:44 +02:00
|
|
|
#endif
|
2015-11-13 16:27:34 +01:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* AT86RF2XX_PARAMS_H */
|
|
|
|
/** @} */
|