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

@ -33,6 +33,11 @@ uart0_set_input(int (*input)(unsigned char c))
}
/*---------------------------------------------------------------------------*/
#if UART0_CONF_WITH_INPUT
/* avoid referencing bits since we're not using them */
#pragma save
#if CC_CONF_OPTIMIZE_STACK_SIZE
#pragma exclude bits
#endif
void
uart0_rx_isr(void) __interrupt (URX0_VECTOR)
{
@ -44,6 +49,7 @@ uart0_rx_isr(void) __interrupt (URX0_VECTOR)
}
ENERGEST_OFF(ENERGEST_TYPE_IRQ);
}
#pragma restore
#endif
#endif /* UART0_ENABLE */
#if UART1_ENABLE
@ -55,6 +61,11 @@ uart1_set_input(int (*input)(unsigned char c))
}
/*---------------------------------------------------------------------------*/
#if UART_ONE_CONF_WITH_INPUT
/* avoid referencing bits since we're not using them */
#pragma save
#if CC_CONF_OPTIMIZE_STACK_SIZE
#pragma exclude bits
#endif
void
uart1_rx_isr(void) __interrupt (URX1_VECTOR)
{
@ -65,6 +76,7 @@ uart1_rx_isr(void) __interrupt (URX1_VECTOR)
}
ENERGEST_OFF(ENERGEST_TYPE_IRQ);
}
#pragma restore
/*---------------------------------------------------------------------------*/
#endif /* UART_ONE_CONF_WITH_INPUT */
#endif /* UART1_ENABLE */