Skip to content

Commit

Permalink
Fix #101: adapt better to Adafruit BSPs
Browse files Browse the repository at this point in the history
  • Loading branch information
terrillmoore committed May 20, 2019
1 parent 7eed9b3 commit b2cde39
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
6 changes: 5 additions & 1 deletion examples/raw-feather/raw-feather.ino
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ Author:
#define RX_RSSI_INTERVAL 100 // milliseconds

// Pin mapping for Adafruit Feather M0 LoRa, etc.
#if defined(ARDUINO_SAMD_FEATHER_M0)
//
// Adafruit BSPs are not consistent -- m0 express defs ARDUINO_SAMD_FEATHER_M0,
// m0 defs ADAFRUIT_FEATHER_M0
//
#if defined(ARDUINO_SAMD_FEATHER_M0) || defined(ADAFRUIT_FEATHER_M0)
const lmic_pinmap lmic_pins = {
.nss = 8,
.rxtx = LMIC_UNUSED_PIN,
Expand Down
6 changes: 5 additions & 1 deletion examples/ttn-otaa-feather-us915/ttn-otaa-feather-us915.ino
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ static osjob_t sendjob;
const unsigned TX_INTERVAL = 60;

// Pin mapping
#if defined(ARDUINO_SAMD_FEATHER_M0)
//
// Adafruit BSPs are not consistent -- m0 express defs ARDUINO_SAMD_FEATHER_M0,
// m0 defs ADAFRUIT_FEATHER_M0
//
#if defined(ARDUINO_SAMD_FEATHER_M0) || defined(ADAFRUIT_FEATHER_M0)
// Pin mapping for Adafruit Feather M0 LoRa, etc.
const lmic_pinmap lmic_pins = {
.nss = 8,
Expand Down
6 changes: 5 additions & 1 deletion src/hal/getpinmap_thisboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ namespace Arduino_LMIC {

const HalPinmap_t *GetPinmap_ThisBoard(void)
{
#if defined(ARDUINO_SAMD_FEATHER_M0)
/*
|| Adafruit BSPs are not consistent -- m0 express defs ARDUINO_SAMD_FEATHER_M0,
|| m0 defs ADAFRUIT_FEATHER_M0
*/
#if defined(ARDUINO_SAMD_FEATHER_M0) || defined(ADAFRUIT_FEATHER_M0)
# if defined(ARDUINO_MCCI_CATENA_4420)
// this uses a radiowing and an odd configuration
return GetPinmap_Catena4420();
Expand Down
2 changes: 1 addition & 1 deletion src/lmic/lmic.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ extern "C"{
#define ARDUINO_LMIC_VERSION_CALC(major, minor, patch, local) \
(((major) << 24u) | ((minor) << 16u) | ((patch) << 8u) | (local))

#define ARDUINO_LMIC_VERSION ARDUINO_LMIC_VERSION_CALC(2, 3, 2, 50) /* v2.3.2.50 */
#define ARDUINO_LMIC_VERSION ARDUINO_LMIC_VERSION_CALC(2, 3, 2, 51) /* v2.3.2.51 */

#define ARDUINO_LMIC_VERSION_GET_MAJOR(v) \
(((v) >> 24u) & 0xFFu)
Expand Down

0 comments on commit b2cde39

Please sign in to comment.