mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-21 19:29:18 +00:00
removed offset in rtimer_arch
This commit is contained in:
parent
a1f11ff8e7
commit
a4985fd1f7
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* 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(...)
|
#define PRINTF(...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static rtimer_clock_t offset;
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
interrupt(TIMERB1_VECTOR) timerb1 (void) {
|
interrupt(TIMERB1_VECTOR) timerb1 (void) {
|
||||||
ENERGEST_ON(ENERGEST_TYPE_IRQ);
|
ENERGEST_ON(ENERGEST_TYPE_IRQ);
|
||||||
@ -68,8 +66,6 @@ rtimer_arch_init(void)
|
|||||||
{
|
{
|
||||||
dint();
|
dint();
|
||||||
|
|
||||||
offset = 0;
|
|
||||||
|
|
||||||
/* Select SMCLK (2.4576MHz), clear TAR; This makes the rtimer count
|
/* Select SMCLK (2.4576MHz), clear TAR; This makes the rtimer count
|
||||||
the number of processor cycles executed by the CPU. */
|
the number of processor cycles executed by the CPU. */
|
||||||
//TBCTL = TBSSEL1 | TBCLR;
|
//TBCTL = TBSSEL1 | TBCLR;
|
||||||
@ -90,18 +86,5 @@ void
|
|||||||
rtimer_arch_schedule(rtimer_clock_t t)
|
rtimer_arch_schedule(rtimer_clock_t t)
|
||||||
{
|
{
|
||||||
PRINTF("rtimer_arch_schedule time %u\n", 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;
|
|
||||||
}
|
|
||||||
/*---------------------------------------------------------------------------*/
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* 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
|
#define RTIMER_ARCH_SECOND 4096
|
||||||
|
|
||||||
void rtimer_arch_set(rtimer_clock_t t);
|
|
||||||
|
|
||||||
#define rtimer_arch_now() (TBR)
|
#define rtimer_arch_now() (TBR)
|
||||||
|
|
||||||
#endif /* __RTIMER_ARCH_H__ */
|
#endif /* __RTIMER_ARCH_H__ */
|
||||||
|
Loading…
Reference in New Issue
Block a user