diff options
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; |