* Addition of Meshnetics Zigbig platform by Frederic Thepaut <frederic.thepaut@inooi.com>

* Changed default RavenUSB timeout to 3 seconds... seems to give most reliable transmissions
This commit is contained in:
c_oflynn 2008-11-29 15:55:02 +00:00
parent 6150d13254
commit 9fb2c9d836
11 changed files with 483 additions and 31 deletions

View file

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: rtimer-arch.c,v 1.3 2008/10/14 09:44:12 adamdunkels Exp $
* $Id: rtimer-arch.c,v 1.4 2008/11/29 15:55:02 c_oflynn Exp $
*/
/**
@ -48,17 +48,18 @@
#include "lib/energest.h"
#include "sys/rtimer.h"
#include "rtimer-arch.h"
#if defined(__AVR_ATmega1284P__)
#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
#endif
#if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega1284P__)
#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
#endif
/*---------------------------------------------------------------------------*/
#ifdef TCNT3
@ -72,10 +73,10 @@ ISR (TIMER3_COMPA_vect) {
rtimer_run_next();
ENERGEST_OFF(ENERGEST_TYPE_IRQ);
}
#else
#error "No Timer3 in rtimer-arch.c"
}
#else
#error "No Timer3 in rtimer-arch.c"
#endif
/*---------------------------------------------------------------------------*/
@ -103,9 +104,9 @@ rtimer_arch_init(void)
TCNT3 = 0;
/* Maximum prescaler */
TCCR3B |= 5;
#else
TCCR3B |= 5;
#else
#error "No Timer3 in rtimer-arch.c"
#endif
@ -127,9 +128,9 @@ rtimer_arch_schedule(rtimer_clock_t t)
OCR3A = t;
ETIFR |= (1 << ICF3) | (1 << OCF3A) | (1 << OCF3B) | (1 << TOV3) |
(1 << OCF3C);
ETIMSK |= (1 << OCIE3A);
#else
ETIMSK |= (1 << OCIE3A);
#else
#error "No Timer3 in rtimer-arch.c"
#endif