Skip to content

Commit

Permalink
Merge pull request #746 from mcci-catena/issue736
Browse files Browse the repository at this point in the history
Fix #736: don't compile config objects that are for other platforms
  • Loading branch information
terrillmoore authored Jun 1, 2021
2 parents b680117 + c21e4e3 commit 3784c5a
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
8 changes: 7 additions & 1 deletion src/hal/getpinmap_catena4420.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ Copyright & License:
*/

#if defined(ARDUINO_MCCI_CATENA_4420) || \
/* legacy names */ \
defined(ARDUINO_CATENA_4420)

#include <arduino_lmic_hal_boards.h>
#include <Arduino.h>

Expand Down Expand Up @@ -71,4 +75,6 @@ const HalPinmap_t *GetPinmap_Catena4420(void)
return &myPinmap;
}

} // namespace Arduino_LMIC;
} // namespace Arduino_LMIC

#endif
4 changes: 4 additions & 0 deletions src/hal/getpinmap_feather32u4lora.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Copyright & License:
*/

#if defined(ARDUINO_AVR_FEATHER32U4)

#include <arduino_lmic_hal_boards.h>
#include <Arduino.h>

Expand Down Expand Up @@ -77,3 +79,5 @@ const HalPinmap_t *GetPinmap_Feather32U4LoRa(void)
}

}; // namespace Arduino_LMIC

#endif // ARDUINO_AVR_FEATHER32U4
8 changes: 8 additions & 0 deletions src/hal/getpinmap_featherm0lora.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <arduino_lmic_hal_boards.h>
#include <Arduino.h>

Expand Down Expand Up @@ -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)
4 changes: 4 additions & 0 deletions src/hal/getpinmap_heltec_lora32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <arduino_lmic_hal_boards.h>
#include <Arduino.h>

Expand Down Expand Up @@ -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)
4 changes: 4 additions & 0 deletions src/hal/getpinmap_ttgo_lora32_v1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Copyright & License:
*/

#if defined(ARDUINO_TTGO_LoRa32_V1)

#include <arduino_lmic_hal_boards.h>
#include <Arduino.h>

Expand Down Expand Up @@ -76,3 +78,5 @@ const HalPinmap_t * GetPinmap_ttgo_lora32_v1 (void)
}

}; // namespace Arduino_LMIC

#endif // ARDUINO_TTGO_LoRa32_V1

0 comments on commit 3784c5a

Please sign in to comment.