-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge PR #9212 "drivers/rail: add efr32 radio driver"
- Loading branch information
1 parent
c784c01
commit 0f4ca22
Showing
24 changed files
with
3,191 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
ifneq (,$(filter saul_default,$(USEMODULE))) | ||
USEMODULE += saul_gpio | ||
endif | ||
|
||
ifneq (,$(filter netdev_default,$(USEMODULE))) | ||
USEMODULE += rail | ||
endif | ||
|
||
ifneq (,$(filter rail,$(USEMODULE))) | ||
USEMODULE += gecko_sdk_emlib | ||
USEMODULE += gecko_sdk_emlib_extra | ||
endif | ||
|
||
ifneq (,$(filter gecko_sdk_librail,$(USEMODULE))) | ||
CFLAGS_FPU = -mfloat-abi=softfp -mfpu=fpv4-sp-d16 | ||
# Blacklisted for llvm because `CFLAGS_FPU` is used before its final value set here | ||
TOOLCHAINS_BLACKLIST += llvm | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* Copyright (C) 2018 Hochschule RheinMain | ||
* | ||
* 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_ikea-tradfri | ||
* @{ | ||
* | ||
* @file | ||
* @brief Board specific definitions for the radio transceiver of the | ||
* Ikea Tradfi module | ||
* | ||
* @author Kai Beckmann <kai.beckmann@hs-rm.de> | ||
**/ | ||
|
||
#ifndef RAIL_RADIO_H | ||
#define RAIL_RADIO_H | ||
|
||
#include "cpu.h" | ||
|
||
#include "periph_conf.h" | ||
#include "periph/gpio.h" | ||
#include "periph/spi.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @brief Select radio frequency | ||
* | ||
* ikea tradfri supports only 2.4 GHz | ||
*/ | ||
#define RAIL_RADIO_BAND (2400) | ||
|
||
/** | ||
* @brief Setting for the radio PA voltage in mV | ||
* | ||
* voltage of the radio PA in mV | ||
* | ||
* The setting depends on the module. | ||
* | ||
* the tradfi modules embedded in lamps are | ||
* connected to th external dc-dc, therefore 3.3V | ||
*/ | ||
#define RAIL_RADIO_PA_VOLTAGE (3300) | ||
|
||
/** | ||
* @brief Packet Trace Interface | ||
* | ||
* The Tradfri doesn't support PTI, | ||
* so don't enable it. | ||
*/ | ||
#ifndef RAIL_PTI_ENABLED | ||
#define RAIL_PTI_ENABLED (0) | ||
#endif | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* RAIL_RADIO_H */ | ||
/** @} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
/* | ||
* Copyright (C) 2018 Hochschule RheinMain | ||
* | ||
* 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_sltb001a | ||
* @{ | ||
* | ||
* @file | ||
* @brief Board specific definitions for the radio transceiver of the | ||
* SLTB001A starter kit | ||
* | ||
* @author Kai Beckmann <kai.beckmann@hs-rm.de> | ||
**/ | ||
|
||
#ifndef RAIL_RADIO_H | ||
#define RAIL_RADIO_H | ||
|
||
#include "cpu.h" | ||
|
||
#include "periph_conf.h" | ||
#include "periph/gpio.h" | ||
#include "periph/spi.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @brief Select radio frequency | ||
* | ||
* the SLTB001A supports only 2.4 GHz | ||
*/ | ||
#define RAIL_RADIO_BAND (2400) | ||
|
||
/** | ||
* @brief Setting for the radio PA voltage in mV | ||
* | ||
* voltage of the radio PA in mV | ||
* | ||
* The setting depends on the module. | ||
* | ||
* TODO what voltage has the SLTB001A? | ||
*/ | ||
#define RAIL_RADIO_PA_VOLTAGE (1800) | ||
|
||
/** | ||
* @brief Packet Trace Interface | ||
* | ||
* To enable the PTI set vaule to 1. | ||
* In RAIL_PTI_CONFIG the correct pins | ||
* have to be configured | ||
* | ||
* Enable only for the SLTB001a if external debugger is | ||
* used. | ||
*/ | ||
#ifndef RAIL_PTI_ENABLED | ||
#define RAIL_PTI_ENABLED (0) | ||
#endif | ||
|
||
/* c&p from gecko-sdk BSP for EFR32MG1_BRD4154A */ | ||
/* should work for sltb001a as well */ | ||
#if !defined(RAIL_PTI_CONFIG) | ||
#define RAIL_PTI_CONFIG \ | ||
{ \ | ||
RAIL_PTI_MODE_UART, /* Only supported output mode for the WSTK*/ \ | ||
1600000, /* Choose 1.6 MHz for best the WSTK */ \ | ||
6, /* WSTK uses location 6 for DOUT PB12 */ \ | ||
gpioPortB, /* FRC_DOUT#6 is PB12 */ \ | ||
12, /* FRC_DOUT#6 is PB12 */ \ | ||
6, /* UNUSED IN UART MODE */ \ | ||
gpioPortB, /* UNUSED IN UART MODE */ \ | ||
11, /* UNUSED IN UART MODE */ \ | ||
6, /* WSTK uses location 6 for DFRAME */ \ | ||
gpioPortB, /* RC_DOUT#6 is PB13 */ \ | ||
13, /* RC_DOUT#6 is PB13 */ \ | ||
} | ||
#endif | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* RAIL_RADIO_H */ | ||
/** @} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
/* | ||
* Copyright (C) 2017-2018 Hochschule RheinMain | ||
* | ||
* 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_slwstk6000b | ||
* @ingroup boards | ||
* @brief Support for the Silicon Labs SLWRB4150a module | ||
* @{ | ||
* | ||
* @file | ||
* @brief Board specific definitions for the radio transceicer of the | ||
* SLWRB4150a module | ||
* | ||
* @author Kai Beckmann <kai.beckmann@hs-rm.de> | ||
**/ | ||
|
||
#ifndef RAIL_RADIO_H | ||
#define RAIL_RADIO_H | ||
|
||
#include "cpu.h" | ||
|
||
#include "periph_conf.h" | ||
#include "periph/gpio.h" | ||
#include "periph/spi.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @brief Select radio frequency | ||
* | ||
* SLWRB4150a supports 2400, 868, 915 | ||
* | ||
*/ | ||
#ifndef RAIL_RADIO_BAND | ||
#define RAIL_RADIO_BAND (868) | ||
#endif | ||
|
||
/** | ||
* @brief Setting for the radio PA voltage in mV | ||
* | ||
* voltage of the radio PA in mV | ||
* | ||
* The setting depends on the module. | ||
* | ||
* The silabs dev modules are connected to | ||
* the internal dc/dc -> 1.8V | ||
*/ | ||
#define RAIL_RADIO_PA_VOLTAGE (1800) | ||
|
||
/** | ||
* @brief Packet Trace Interface | ||
* | ||
* To enable the PTI set vaule to 1. | ||
* In RAIL_PTI_CONFIG the correct pins | ||
* have to be configured | ||
*/ | ||
#ifndef RAIL_PTI_ENABLED | ||
#define RAIL_PTI_ENABLED (0) | ||
#endif | ||
|
||
/** | ||
* c&p from gecko-sdk BSP for EFR32MG1_BRD4154A | ||
*/ | ||
#if !defined(RAIL_PTI_CONFIG) | ||
#define RAIL_PTI_CONFIG \ | ||
{ \ | ||
RAIL_PTI_MODE_UART, /* Only supported output mode for the WSTK*/ \ | ||
1600000, /* Choose 1.6 MHz for best the WSTK */ \ | ||
6, /* WSTK uses location 6 for DOUT PB12 */ \ | ||
gpioPortB, /* FRC_DOUT#6 is PB12 */ \ | ||
12, /* FRC_DOUT#6 is PB12 */ \ | ||
6, /* UNUSED IN UART MODE */ \ | ||
gpioPortB, /* UNUSED IN UART MODE */ \ | ||
11, /* UNUSED IN UART MODE */ \ | ||
6, /* WSTK uses location 6 for DFRAME */ \ | ||
gpioPortB, /* RC_DOUT#6 is PB13 */ \ | ||
13, /* RC_DOUT#6 is PB13 */ \ | ||
} | ||
#endif | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* RAIL_RADIO_H */ | ||
/** @} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
/* | ||
* Copyright (C) 2017-2018 Hochschule RheinMain | ||
* | ||
* 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_slwstk6000b | ||
* @ingroup boards | ||
* @brief Support for the Silicon Labs SLWRB4162a module | ||
* @{ | ||
* | ||
* @file | ||
* @brief Board specific definitions for the radio transceicer of the | ||
* SLWRB4162a module | ||
* | ||
* @author Kai Beckmann <kai.beckmann@hs-rm.de> | ||
**/ | ||
|
||
#ifndef RAIL_RADIO_H | ||
#define RAIL_RADIO_H | ||
|
||
#include "cpu.h" | ||
|
||
#include "periph_conf.h" | ||
#include "periph/gpio.h" | ||
#include "periph/spi.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @brief Select radio frequency | ||
* | ||
* SLWRB4162a supports only 2.4 GHz | ||
*/ | ||
#define RAIL_RADIO_BAND (2400) | ||
|
||
/** | ||
* @brief Setting for the radio PA voltage in mV | ||
* | ||
* voltage of the radio PA in mV | ||
* | ||
* The setting depends on the module. | ||
* | ||
* The silabs dev modules are connected to | ||
* the internal dc/dc -> 1.8V | ||
*/ | ||
#define RAIL_RADIO_PA_VOLTAGE (1800) | ||
|
||
/** | ||
* @brief Packet Trace Interface | ||
* | ||
* To enable the PTI set vaule to 1. | ||
* In RAIL_PTI_CONFIG the correct pins | ||
* have to be configured | ||
*/ | ||
#ifndef RAIL_PTI_ENABLED | ||
#define RAIL_PTI_ENABLED (0) | ||
#endif | ||
|
||
/** | ||
* c&p from gecko-sdk BSP for EFR32MG1_BRD4154A | ||
*/ | ||
#if !defined(RAIL_PTI_CONFIG) | ||
#define RAIL_PTI_CONFIG \ | ||
{ \ | ||
RAIL_PTI_MODE_UART, /* Only supported output mode for the WSTK*/ \ | ||
1600000, /* Choose 1.6 MHz for best the WSTK */ \ | ||
6, /* WSTK uses location 6 for DOUT PB12 */ \ | ||
gpioPortB, /* FRC_DOUT#6 is PB12 */ \ | ||
12, /* FRC_DOUT#6 is PB12 */ \ | ||
6, /* UNUSED IN UART MODE */ \ | ||
gpioPortB, /* UNUSED IN UART MODE */ \ | ||
11, /* UNUSED IN UART MODE */ \ | ||
6, /* WSTK uses location 6 for DFRAME */ \ | ||
gpioPortB, /* RC_DOUT#6 is PB13 */ \ | ||
13, /* RC_DOUT#6 is PB13 */ \ | ||
} | ||
#endif | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* RAIL_RADIO_H */ | ||
/** @} */ |
Oops, something went wrong.