From 067fabe0f9c85fa97e79a476e2f856169b4996c4 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Fri, 7 Sep 2012 14:38:49 +0100 Subject: [PATCH] Sensinode main variable optimsations: r is now uint8_t, allocated to registers len is uint16_t for more efficent arithmetic (Changes replicated from the 253x port, originally contributed by Philippe Retornaz - EPFL) --- platform/sensinode/contiki-sensinode-main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/sensinode/contiki-sensinode-main.c b/platform/sensinode/contiki-sensinode-main.c index 97f0fb359..387264e01 100644 --- a/platform/sensinode/contiki-sensinode-main.c +++ b/platform/sensinode/contiki-sensinode-main.c @@ -33,7 +33,7 @@ PROCESS_NAME(batmon_process); #endif #if NETSTACK_CONF_SHORTCUTS -static __data int len; +static __data uint16_t len; #endif #ifdef STARTUP_CONF_VERBOSE @@ -59,7 +59,6 @@ extern volatile uint8_t sleep_flag; #endif extern rimeaddr_t rimeaddr_node_addr; -static __data int r; #if ENERGEST_CONF_ON static unsigned long irq_energest = 0; #define ENERGEST_IRQ_SAVE(a) do { \ @@ -287,6 +286,7 @@ main(void) watchdog_start(); while(1) { + uint8_t r; do { /* Reset watchdog and handle polls and events */ watchdog_periodic();