removed offset in rtimer_arch

This commit is contained in:
joxe 2007-11-19 22:38:57 +00:00
parent a1f11ff8e7
commit a4985fd1f7
2 changed files with 3 additions and 22 deletions

View file

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: rtimer-arch.c,v 1.5 2007/09/03 19:22:37 joxe Exp $
* $Id: rtimer-arch.c,v 1.6 2007/11/19 22:38:57 joxe Exp $
*/
/**
@ -52,8 +52,6 @@
#define PRINTF(...)
#endif
static rtimer_clock_t offset;
/*---------------------------------------------------------------------------*/
interrupt(TIMERB1_VECTOR) timerb1 (void) {
ENERGEST_ON(ENERGEST_TYPE_IRQ);
@ -68,8 +66,6 @@ rtimer_arch_init(void)
{
dint();
offset = 0;
/* Select SMCLK (2.4576MHz), clear TAR; This makes the rtimer count
the number of processor cycles executed by the CPU. */
//TBCTL = TBSSEL1 | TBCLR;
@ -90,18 +86,5 @@ void
rtimer_arch_schedule(rtimer_clock_t t)
{
PRINTF("rtimer_arch_schedule time %u\n", t);
TBCCR1 = t + offset;
TBCCR1 = t;
}
/*---------------------------------------------------------------------------*/
/*rtimer_clock_t
rtimer_arch_now(void)
{
return TBR + offset;
}*/
/*---------------------------------------------------------------------------*/
void
rtimer_arch_set(rtimer_clock_t t)
{
offset = t - TBR;
}
/*---------------------------------------------------------------------------*/

View file

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: rtimer-arch.h,v 1.3 2007/05/22 21:00:09 adamdunkels Exp $
* $Id: rtimer-arch.h,v 1.4 2007/11/19 22:38:57 joxe Exp $
*/
/**
@ -46,8 +46,6 @@
#define RTIMER_ARCH_SECOND 4096
void rtimer_arch_set(rtimer_clock_t t);
#define rtimer_arch_now() (TBR)
#endif /* __RTIMER_ARCH_H__ */