diff --git a/README.md b/README.md index 06e523fa..fad37f69 100644 --- a/README.md +++ b/README.md @@ -1251,6 +1251,7 @@ function uflt12f(rawUflt12) - Adopt semantic versions completely [#726](https://github.com/mcci-catena/arduino-lmic/issues/726). - Implement JoinAccept CFList processing for US/AU [#739](https://github.com/mcci-catena/arduino-lmic/issues/739). - Correct JoinAccept CFList processing for AS923 [#740](https://github.com/mcci-catena/arduino-lmic/issues/740). + - Don't compile board config objects when we know for sure they'll not be used; compilers can't always tell [#736](https://github.com/mcci-catena/arduino-lmic/issues/736). - v3.3.0 is primarily a maintenance and roll-up release. diff --git a/src/hal/getpinmap_catena4420.cpp b/src/hal/getpinmap_catena4420.cpp index ae833b00..21431405 100644 --- a/src/hal/getpinmap_catena4420.cpp +++ b/src/hal/getpinmap_catena4420.cpp @@ -13,6 +13,10 @@ Copyright & License: */ +#if defined(ARDUINO_MCCI_CATENA_4420) || \ + /* legacy names */ \ + defined(ARDUINO_CATENA_4420) + #include #include @@ -71,4 +75,6 @@ const HalPinmap_t *GetPinmap_Catena4420(void) return &myPinmap; } -} // namespace Arduino_LMIC; \ No newline at end of file +} // namespace Arduino_LMIC + +#endif diff --git a/src/hal/getpinmap_feather32u4lora.cpp b/src/hal/getpinmap_feather32u4lora.cpp index c852eab8..715dfa5c 100644 --- a/src/hal/getpinmap_feather32u4lora.cpp +++ b/src/hal/getpinmap_feather32u4lora.cpp @@ -13,6 +13,8 @@ Copyright & License: */ +#if defined(ARDUINO_AVR_FEATHER32U4) + #include #include @@ -77,3 +79,5 @@ const HalPinmap_t *GetPinmap_Feather32U4LoRa(void) } }; // namespace Arduino_LMIC + +#endif // ARDUINO_AVR_FEATHER32U4 diff --git a/src/hal/getpinmap_featherm0lora.cpp b/src/hal/getpinmap_featherm0lora.cpp index 7d221dcd..19751d39 100644 --- a/src/hal/getpinmap_featherm0lora.cpp +++ b/src/hal/getpinmap_featherm0lora.cpp @@ -13,6 +13,11 @@ Copyright & License: */ +// The Adafruit FeatherM0 and FeatherM0 Express BSPs are not consistent +// as to how they declare themselves. Both are SAMDs. Detect either one. +#if defined(ARDUINO_ARCH_SAMD) +# if defined(ADAFRUIT_FEATHER_M0) || defined(ARDUINO_SAMD_FEATHER_M0) + #include #include @@ -72,3 +77,6 @@ const HalPinmap_t *GetPinmap_FeatherM0LoRa(void) } }; // namespace Arduino_LMIC + +# endif // defined(ADAFRUIT_FEATHER_M0) || defined(ARDUINO_SAMD_FEATHER_M0) +#endif // defined(ARDUINO_ARCH_SAMD) diff --git a/src/hal/getpinmap_heltec_lora32.cpp b/src/hal/getpinmap_heltec_lora32.cpp index 897907a5..43e0b37d 100644 --- a/src/hal/getpinmap_heltec_lora32.cpp +++ b/src/hal/getpinmap_heltec_lora32.cpp @@ -13,6 +13,8 @@ Copyright & License: */ +#if defined(ARDUINO_HELTEC_WIFI_LORA_32) || defined(ARDUINO_HELTEC_WIFI_LORA_32_V2) || defined(ARDUINO_HELTEC_WIRELESS_STICK) + #include #include @@ -78,3 +80,5 @@ const HalPinmap_t *GetPinmap_heltec_lora32(void) } }; // namespace Arduino_LMIC + +#endif // defined(ARDUINO_HELTEC_WIFI_LORA_32) || defined(ARDUINO_HELTEC_WIFI_LORA_32_V2) || defined(ARDUINO_HELTEC_WIRELESS_STICK) diff --git a/src/hal/getpinmap_ttgo_lora32_v1.cpp b/src/hal/getpinmap_ttgo_lora32_v1.cpp index 71db3ebf..9beb370c 100644 --- a/src/hal/getpinmap_ttgo_lora32_v1.cpp +++ b/src/hal/getpinmap_ttgo_lora32_v1.cpp @@ -13,6 +13,8 @@ Copyright & License: */ +#if defined(ARDUINO_TTGO_LoRa32_V1) + #include #include @@ -76,3 +78,5 @@ const HalPinmap_t * GetPinmap_ttgo_lora32_v1 (void) } }; // namespace Arduino_LMIC + +#endif // ARDUINO_TTGO_LoRa32_V1