cc2530: Added a method to maximise stack depth

This was oringinally contributed/reported/discussed/patched by
Philippe Retornaz (EPFL) but it's implemented
in a more configurable fashion here.
This commit is contained in:
George Oikonomou 2012-09-05 16:00:23 +01:00
parent a0d2988846
commit c6ec22c4c8
8 changed files with 61 additions and 5 deletions

View file

@ -36,7 +36,7 @@
#include "dev/button-sensor.h"
#include "dev/watchdog.h"
/*---------------------------------------------------------------------------*/
static __data struct timer debouncetimer;
static CC_AT_DATA struct timer debouncetimer;
/*---------------------------------------------------------------------------*/
/* Button 1 - SmartRF and cc2531 USB Dongle */
/*---------------------------------------------------------------------------*/
@ -133,6 +133,11 @@ int configure_b2(int type, int value)
/*---------------------------------------------------------------------------*/
/* ISRs */
/*---------------------------------------------------------------------------*/
/* avoid referencing bits, we don't call code which use them */
#pragma save
#if CC_CONF_OPTIMIZE_STACK_SIZE
#pragma exclude bits
#endif
#if MODEL_CC2531
void
port_1_isr(void) __interrupt(P1INT_VECTOR)
@ -187,6 +192,7 @@ port_0_isr(void) __interrupt(P0INT_VECTOR)
EA = 1;
}
#endif
#pragma restore
/*---------------------------------------------------------------------------*/
SENSORS_SENSOR(button_1_sensor, BUTTON_SENSOR, value_b1, configure_b1, status_b1);
#if MODEL_CC2531