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)
This commit is contained in:
George Oikonomou 2012-09-07 14:38:49 +01:00
parent cb168da729
commit 067fabe0f9

View File

@ -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();