Skip to content

Commit

Permalink
Fix #68: define CFG_region as a numeric constant
Browse files Browse the repository at this point in the history
  • Loading branch information
terrillmoore committed Jun 4, 2018
1 parent 524c783 commit 50db29c
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions src/lmic/lmic_config_preconditions.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,27 @@ Revision history:
0)

// the selected region.
#define CFG_region ((defined(CFG_eu868) * LMIC_REGION_eu868) + \
(defined(CFG_us915) * LMIC_REGION_us915) + \
(defined(CFG_cn783) * LMIC_REGION_cn783) + \
(defined(CFG_eu433) * LMIC_REGION_eu433) + \
(defined(CFG_au921) * LMIC_REGION_au921) + \
(defined(CFG_cn490) * LMIC_REGION_cn490) + \
(defined(CFG_as923) * LMIC_REGION_as923) + \
(defined(CFG_kr921) * LMIC_REGION_kr921) + \
(defined(CFG_in866) * LMIC_REGION_in866) + \
0)
#if defined(CFG_eu868)
# define CFG_region LMIC_REGION_eu868
#elif defined(CFG_us915)
# define CFG_region LMIC_REGION_us915
#elif defined(CFG_cn783)
# define CFG_region LMIC_REGION_cn783
#elif defined(CFG_eu433)
# define CFG_region LMIC_REGION_eu433
#elif defined(CFG_au921)
# define CFG_region LMIC_REGION_au921
#elif defined(CFG_cn490)
# define CFG_region LMIC_REGION_cn490
#elif defined(CFG_as923)
# define CFG_region LMIC_REGION_as923
#elif defined(CFG_kr921)
# define CFG_region LMIC_REGION_kr921
#elif defined(CFG_in866)
# define CFG_region LMIC_REGION_in866
#else
# define CFG_region 0
#endif

// finally the mask of` US-like and EU-like regions
#define CFG_LMIC_EU_like_MASK ( \
Expand Down

0 comments on commit 50db29c

Please sign in to comment.