-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workaround for boards not supported by Enable Interrupts
Signed-off-by: Sara Damiano <[email protected]>
- Loading branch information
Showing
18 changed files
with
42 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* @file ModSensorInterrupts.h | ||
* @copyright Stroud Water Research Center | ||
* Part of the EnviroDIY ModularSensors library for Arduino. | ||
* This library is published under the BSD-3 license. | ||
* @author Sara Geleskie Damiano <[email protected]> | ||
* | ||
* @brief A work-around for the AVR interrupt library not supporting SAMD | ||
* boards. That libary isn't necessary for them. | ||
*/ | ||
|
||
|
||
// Header Guards | ||
#ifndef SRC_MODSENSORINTERRUPTS_H_ | ||
#define SRC_MODSENSORINTERRUPTS_H_ | ||
|
||
#if defined(__AVR__) || defined(ARDUINO_ARCH_AVR) || defined __SAM3U4E__ || \ | ||
defined __SAM3X8E__ || defined __SAM3X8H__ || defined ARDUINO_SAMD_ZERO || \ | ||
defined __SAMD21G18A__ || defined __SAMD21J18A__ | ||
// #define LIBCALL_ENABLEINTERRUPT // To prevent compiler/linker crashes | ||
#include <EnableInterrupt.h> // To handle external and pin change interrupts | ||
#else | ||
#define enableInterrupt(pin, userFunc, mode) \ | ||
attachInterrupt(pin, userFunc, mode) | ||
#define disableInterrupt(pin) detachInterrupt(pin) | ||
#endif | ||
|
||
|
||
#endif // SRC_MODSENSORINTERRUPTS_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
* This library is published under the BSD-3 license. | ||
* @author Sara Geleskie Damiano <[email protected]> | ||
* | ||
* @brief A simple include file for the Arduino command line interface (CLI).s | ||
* @brief A simple include file for the Arduino command line interface (CLI). | ||
*/ | ||
|
||
// Header Guards | ||
|
@@ -21,6 +21,9 @@ | |
*/ | ||
#define MODULAR_SENSORS_VERSION "0.35.0" | ||
|
||
// To support interrupts | ||
#include "ModSensorInterrupts.h" | ||
|
||
// To get all of the base classes for ModularSensors, include LoggerBase. | ||
// NOTE: Individual sensor definitions must be included separately. | ||
#include "LoggerBase.h" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters