Merge pull request #16865 from benpicco/drivers/cc110x-submodules
drivers/cc110x: use pseudo-modules for band selection
This commit is contained in:
commit
a606d8a8ea
@ -1,3 +1,4 @@
|
||||
ifneq (,$(filter netdev_default,$(USEMODULE)))
|
||||
USEMODULE += cc1100
|
||||
USEMODULE += cc110x_868mhz
|
||||
endif
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
ifneq (,$(filter netdev_default,$(USEMODULE)))
|
||||
USEMODULE += cc1100
|
||||
USEMODULE += cc110x_868mhz
|
||||
endif
|
||||
|
||||
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
ifneq (,$(filter netdev_default,$(USEMODULE)))
|
||||
USEMODULE += cc1101
|
||||
USEMODULE += cc110x_868mhz
|
||||
endif
|
||||
|
||||
# add support for LEDs and buttons as default saul devices
|
||||
|
||||
@ -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…
x
Reference in New Issue
Block a user