mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
drivers/cc110x: use pseudo-modules for band selection
This commit is contained in:
parent
f93d1276b4
commit
67f737b5e0
@ -8,3 +8,8 @@ FEATURES_REQUIRED += periph_spi
|
||||
ifneq (,$(filter gnrc_ipv6,$(USEMODULE)))
|
||||
USEMODULE += gnrc_sixlowpan
|
||||
endif
|
||||
|
||||
# default to 433 MHz operation
|
||||
ifeq (,$(filter cc110x_%mhz,$(USEMODULE)))
|
||||
USEMODULE += cc110x_433mhz
|
||||
endif
|
||||
|
@ -59,7 +59,13 @@ extern "C" {
|
||||
* Choose the one matching the base frequency your transceiver uses, otherwise
|
||||
* the TX power setting will be incorrect.
|
||||
*/
|
||||
#if IS_USED(MODULE_CC110X_433MHZ)
|
||||
#define CC110X_PARAM_PATABLE (&cc110x_patable_433mhz)
|
||||
#elif IS_USED(MODULE_CC110X_868MHZ)
|
||||
#define CC110X_PARAM_PATABLE (&cc110x_patable_868mhz)
|
||||
#elif IS_USED(MODULE_CC110X_915MHZ)
|
||||
#define CC110X_PARAM_PATABLE (&cc110x_patable_915mhz)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef CC110X_PARAM_CONFIG
|
||||
@ -68,8 +74,12 @@ extern "C" {
|
||||
*
|
||||
* If 868 MHz is used as base frequency, you can set this to `NULL`
|
||||
*/
|
||||
#if IS_USED(MODULE_CC110X_433MHZ)
|
||||
#define CC110X_PARAM_CONFIG (&cc110x_config_433mhz_250kbps_300khz)
|
||||
#else
|
||||
#define CC110X_PARAM_CONFIG NULL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef CC110X_PARAM_CHANNELS
|
||||
/**
|
||||
@ -77,8 +87,12 @@ extern "C" {
|
||||
*
|
||||
* This must match to configuration you have chosen
|
||||
*/
|
||||
#if IS_USED(MODULE_CC110X_433MHZ)
|
||||
#define CC110X_PARAM_CHANNELS (&cc110x_chanmap_433mhz_300khz)
|
||||
#else
|
||||
#define CC110X_PARAM_CHANNELS (&cc110x_chanmap_868mhz_lora)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef CC110X_PARAMS
|
||||
/**
|
||||
|
@ -219,6 +219,11 @@ PSEUDOMODULES += cc1100
|
||||
PSEUDOMODULES += cc1100e
|
||||
PSEUDOMODULES += cc1101
|
||||
|
||||
# use pseudo-module for band selection
|
||||
PSEUDOMODULES += cc110x_433mhz
|
||||
PSEUDOMODULES += cc110x_868mhz
|
||||
PSEUDOMODULES += cc110x_915mhz
|
||||
|
||||
# include variants of ds3231 drivers as pseudo modules
|
||||
PSEUDOMODULES += ds3231_int
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user