From 0f59ba3187d19fae613af5f2d81fd20418d1990a Mon Sep 17 00:00:00 2001 From: dak664 Date: Tue, 16 Feb 2010 21:48:38 +0000 Subject: [PATCH] Add rtimers, allow Jackdaw to use RF230BB driver --- cpu/avr/Makefile.avr | 5 ++--- cpu/avr/rtimer-arch.c | 26 +++++++++++++++++--------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/cpu/avr/Makefile.avr b/cpu/avr/Makefile.avr index ec75afba9..fe9238900 100644 --- a/cpu/avr/Makefile.avr +++ b/cpu/avr/Makefile.avr @@ -1,4 +1,4 @@ -# $Id: Makefile.avr,v 1.19 2010/02/07 23:05:20 adamdunkels Exp $ +# $Id: Makefile.avr,v 1.20 2010/02/16 21:48:38 dak664 Exp $ ### Check if we are running under Windows @@ -23,13 +23,12 @@ CONTIKI_CPU=$(CONTIKI)/cpu/avr ### These directories will be searched for the specified source files ### TARGETLIBS are platform-specific routines in the contiki library path CONTIKI_CPU_DIRS = . dev -AVR = clock.c mtarch.c eeprom.c flash.c rs232.c leds-arch.c watchdog.c +AVR = clock.c mtarch.c eeprom.c flash.c rs232.c leds-arch.c watchdog.c rtimer-arch.c ELFLOADER = elfloader.c elfloader-avr.c symtab-avr.c TARGETLIBS = random.c leds.c ifdef USB ### Add the directories for the USB stick and remove the default rs232 driver -override RF230BB = 0 CONTIKI_CPU_DIRS += dev/usb dev/usb/serial dev/usb/rndis dev/usb/storage CONTIKI_TARGET_SOURCEFILES += $(USB) AVR = clock.c mtarch.c eeprom.c flash.c leds-arch.c watchdog.c diff --git a/cpu/avr/rtimer-arch.c b/cpu/avr/rtimer-arch.c index 1bf738b9c..ba2aba4fa 100644 --- a/cpu/avr/rtimer-arch.c +++ b/cpu/avr/rtimer-arch.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: rtimer-arch.c,v 1.5 2009/09/07 12:02:58 joxe Exp $ + * $Id: rtimer-arch.c,v 1.6 2010/02/16 21:48:38 dak664 Exp $ */ /** @@ -50,15 +50,23 @@ #include "rtimer-arch.h" #if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega1284P__) -#error FTH081029 test timer 3 - #define ETIMSK TIMSK3 - #define ETIFR TIFR3 - #define TICIE3 ICIE3 +//#error FTH081029 test timer 3 +#define ETIMSK TIMSK3 +#define ETIFR TIFR3 +#define TICIE3 ICIE3 - //Has no 'C', so we just set it to B. The code doesn't really use C so this - //is safe to do but lets it compile - #define OCIE3C OCIE3B - #define OCF3C OCF3B +//Has no 'C', so we just set it to B. The code doesn't really use C so this +//is safe to do but lets it compile +#warning No OCIE3C in architecture, hopefully it will not be needed +#define OCIE3C OCIE3B +#define OCF3C OCF3B +#endif + +#if defined(__AVR_AT90USB1287__) +#warning AT90USB1287 rtimers not tested +#define ETIMSK TIMSK3 +#define ETIFR TIFR3 +#define TICIE3 ICIE3 #endif /*---------------------------------------------------------------------------*/