1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 22:13:52 +01:00

Merge pull request #9124 from maribu/msbiot

boards/msbiot: Configured cc110x as default netdev
This commit is contained in:
Alexandre Abadie 2018-05-22 09:15:33 +02:00 committed by GitHub
commit 912ef3220b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 92 additions and 53 deletions

View File

@ -1 +1,5 @@
include $(RIOTBOARD)/common/msba2/Makefile.dep
ifneq (,$(filter netdev_default gnrc_netdev_default,$(USEMODULE)))
USEMODULE += cc110x
endif

View File

@ -1,7 +1,3 @@
ifneq (,$(filter netdev_default gnrc_netdev_default,$(USEMODULE)))
USEMODULE += cc110x
endif
USEMODULE += boards_common_msba2
include $(RIOTBOARD)/common/msba2/Makefile.include

View File

@ -1,44 +0,0 @@
/*
* Copyright (C) 2015 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 details.
*/
/**
* @ingroup board_msba2
* @{
*
* @file
* @brief cc110x board specific configuration
*
* @author Kaspar Schleiser <kaspar@schleiser.de>
*/
#ifndef CC110X_PARAMS_H
#define CC110X_PARAMS_H
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name CC110X configuration
*/
const cc110x_params_t cc110x_params[] = {
{
.spi = 0,
.cs = 53,
.gdo0 = 27,
.gdo1 = 55,
.gdo2 = 28
},
};
/** @} */
#ifdef __cplusplus
}
#endif
#endif /* CC110X_PARAMS_H */
/** @} */

View File

@ -0,0 +1,4 @@
# add driver for CC1101 sub-gigahertz transceiver as default netdev
ifneq (,$(filter netdev_default gnrc_netdev_default,$(USEMODULE)))
USEMODULE += cc110x
endif

View File

@ -32,11 +32,11 @@ extern "C" {
* @name Configure connected CC1101 (radio) device
* @{
*/
#define CC110X_SPI SPI_DEV(0)
#define CC110X_CS GPIO_PIN(PORT_B, 12)
#define CC110X_GDO0 GPIO_PIN(PORT_C, 4)
#define CC110X_GDO1 GPIO_PIN(PORT_A, 6)
#define CC110X_GDO2 GPIO_PIN(PORT_C, 5)
#define CC110X_PARAM_SPI SPI_DEV(0)
#define CC110X_PARAM_CS GPIO_PIN(PORT_B, 12)
#define CC110X_PARAM_GDO0 GPIO_PIN(PORT_C, 4)
#define CC110X_PARAM_GDO1 GPIO_PIN(PORT_A, 6)
#define CC110X_PARAM_GDO2 GPIO_PIN(PORT_C, 5)
/** @} */
/**

View File

@ -0,0 +1,79 @@
/*
* Copyright (C) 2017 Marian Buschsieweke <marian.buschsieweke@ovgu.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_cc110x
* @{
*
* @file
* @brief cc110x board specific configuration
*
* @author Marian Buschsieweke <marian.buschsieweke@ovgu.de>
*/
#ifndef CC110X_PARAMS_H
#define CC110X_PARAMS_H
#include "board.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name Default parameters for the cc110x driver
*
* These values are based on the msba2 board
* @{
*/
#ifndef CC110X_PARAM_SPI
#define CC110X_PARAM_SPI SPI_DEV(0)
#endif
#ifndef CC110X_PARAM_CS
#define CC110X_PARAM_CS GPIO_PIN(1, 21)
#endif
#ifndef CC110X_PARAM_GDO0
#define CC110X_PARAM_GDO0 GPIO_PIN(0, 27)
#endif
#ifndef CC110X_PARAM_GDO1
#define CC110X_PARAM_GDO1 GPIO_PIN(1, 23)
#endif
#ifndef CC110X_PARAM_GDO2
#define CC110X_PARAM_GDO2 GPIO_PIN(0, 28)
#endif
#ifndef CC110X_PARAMS
#define CC110X_PARAMS { \
.spi = CC110X_PARAM_SPI, \
.cs = CC110X_PARAM_CS, \
.gdo0 = CC110X_PARAM_GDO0, \
.gdo1 = CC110X_PARAM_GDO1, \
.gdo2 = CC110X_PARAM_GDO2, \
}
#endif
/** @} */
/**
* @name CC110X configuration
* @brief Specifies the SPI bus and GPIOs connected to the CC110X transceiver
*/
const cc110x_params_t cc110x_params[] = {
CC110X_PARAMS
};
#ifdef __cplusplus
}
#endif
#endif /* CC110X_PARAMS_H */
/** @} */