Stack-friendly cc243x clock ISR enabled by default

This new approach (CLOCK_CONF_ACCURATE=0) was not as inaccurate
as originally thought. In fact, it has pretty much the same
accuracy as the old, stack-hungry version.

* Renamed the define from CLOCK_CONF_ACCURATE (1: old) to
  CLOCK_CONF_STACK_FRIENDLY (1: new) to stop implying
  that one is more accurate than the other.
* Using CLOCK_CONF_STACK_FRIENDLY by default.
This commit is contained in:
George Oikonomou 2012-04-02 16:49:07 +01:00
parent 924fe934c1
commit ce17fa131c
3 changed files with 16 additions and 21 deletions

View file

@ -54,10 +54,7 @@ static __data int len;
#define PUTCHAR(...) do {} while(0)
#endif
#if !CLOCK_CONF_ACCURATE
extern volatile __data clock_time_t count;
/* accurate clock is stack hungry */
#if CLOCK_CONF_STACK_FRIENDLY
extern volatile __bit sleep_flag;
#endif
@ -294,11 +291,10 @@ main(void)
/* Reset watchdog and handle polls and events */
watchdog_periodic();
/**/
#if !CLOCK_CONF_ACCURATE
#if CLOCK_CONF_STACK_FRIENDLY
if(sleep_flag) {
if(etimer_pending() &&
(etimer_next_expiration_time() - count - 1) > MAX_TICKS) { /*core/sys/etimer.c*/
(etimer_next_expiration_time() - clock_time() - 1) > MAX_TICKS) {
etimer_request_poll();
}
sleep_flag = 0;