summaryrefslogtreecommitdiff
path: root/megalogger
diff options
context:
space:
mode:
authorStanley Huang <stanleyhuangyc@gmail.com>2014-10-29 23:35:05 +1100
committerStanley Huang <stanleyhuangyc@gmail.com>2014-10-29 23:35:05 +1100
commit3d62ec51d2952518985cf28af40e6346f1d0cf3f (patch)
treeb1f0a4460100cc934af57e5725236ec0fc65703e /megalogger
parent23b4f328664805b053ab3ab451b8392a03a02f94 (diff)
download2021-arduino-obd-3d62ec51d2952518985cf28af40e6346f1d0cf3f.tar.gz
2021-arduino-obd-3d62ec51d2952518985cf28af40e6346f1d0cf3f.tar.bz2
2021-arduino-obd-3d62ec51d2952518985cf28af40e6346f1d0cf3f.zip
fix compilation issue with Arduino DUE
Diffstat (limited to 'megalogger')
-rw-r--r--megalogger/Narcoleptic.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/megalogger/Narcoleptic.cpp b/megalogger/Narcoleptic.cpp
index 5da3924..61fb13c 100644
--- a/megalogger/Narcoleptic.cpp
+++ b/megalogger/Narcoleptic.cpp
@@ -16,6 +16,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "Narcoleptic.h"
+
+#ifndef __SAM3X8E__
+
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/common.h>
@@ -23,7 +27,6 @@
#include <avr/wdt.h>
#include <avr/sleep.h>
-#include "Narcoleptic.h"
SIGNAL(WDT_vect) {
wdt_disable();
@@ -54,4 +57,12 @@ void NarcolepticClass::delay(int milliseconds) {
if (milliseconds >= 16) { sleep(WDTO_15MS); milliseconds -= 15; }
}
+#else
+
+void NarcolepticClass::delay(int milliseconds) {
+ delay(milliseconds);
+}
+
+#endif
+
NarcolepticClass Narcoleptic;