diff options
author | Stanley Huang <stanleyhuangyc@gmail.com> | 2014-10-29 23:35:05 +1100 |
---|---|---|
committer | Stanley Huang <stanleyhuangyc@gmail.com> | 2014-10-29 23:35:05 +1100 |
commit | 3d62ec51d2952518985cf28af40e6346f1d0cf3f (patch) | |
tree | b1f0a4460100cc934af57e5725236ec0fc65703e /megalogger | |
parent | 23b4f328664805b053ab3ab451b8392a03a02f94 (diff) | |
download | 2021-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.cpp | 13 |
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; |