mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-21 19:29:18 +00:00
Use LPM4_EXIT to return from sleep on msp430.
This commit is contained in:
parent
e4e3a11b8b
commit
20bac141ca
@ -26,7 +26,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* @(#)$Id: button.c,v 1.1 2006/06/17 22:41:21 adamdunkels Exp $
|
* @(#)$Id: button.c,v 1.2 2006/08/17 15:41:13 bg- Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
@ -34,8 +34,6 @@
|
|||||||
|
|
||||||
#include "contiki.h"
|
#include "contiki.h"
|
||||||
|
|
||||||
#include "dev/lpm.h"
|
|
||||||
|
|
||||||
#include "dev/button.h"
|
#include "dev/button.h"
|
||||||
|
|
||||||
#define BUTTON_PORT 2
|
#define BUTTON_PORT 2
|
||||||
@ -75,6 +73,6 @@ __button_interrupt(void)
|
|||||||
if(selecting_proc != NULL) {
|
if(selecting_proc != NULL) {
|
||||||
process_post(selecting_proc, PROCESS_EVENT_MSG, &button_msg);
|
process_post(selecting_proc, PROCESS_EVENT_MSG, &button_msg);
|
||||||
}
|
}
|
||||||
LPM_AWAKE();
|
LPM4_EXIT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* @(#)$Id: cc2420_uart0.c,v 1.1 2006/06/17 22:41:21 adamdunkels Exp $
|
* @(#)$Id: cc2420_uart0.c,v 1.2 2006/08/17 15:41:13 bg- Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
@ -35,7 +35,6 @@
|
|||||||
#include "contiki.h"
|
#include "contiki.h"
|
||||||
#include "contiki-net.h"
|
#include "contiki-net.h"
|
||||||
|
|
||||||
#include "dev/lpm.h"
|
|
||||||
#include "dev/spi.h"
|
#include "dev/spi.h"
|
||||||
#include "dev/cc2420.h"
|
#include "dev/cc2420.h"
|
||||||
|
|
||||||
@ -43,7 +42,7 @@ interrupt(PORT1_VECTOR)
|
|||||||
__fifop_interrupt(void)
|
__fifop_interrupt(void)
|
||||||
{
|
{
|
||||||
if(__cc2420_intr())
|
if(__cc2420_intr())
|
||||||
LPM_AWAKE();
|
LPM4_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* @(#)$Id: clock.c,v 1.2 2006/08/17 15:25:46 bg- Exp $
|
* @(#)$Id: clock.c,v 1.3 2006/08/17 15:41:13 bg- Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -37,8 +37,6 @@
|
|||||||
|
|
||||||
#include "contiki-conf.h"
|
#include "contiki-conf.h"
|
||||||
|
|
||||||
#include "dev/lpm.h"
|
|
||||||
|
|
||||||
#include "sys/clock.h"
|
#include "sys/clock.h"
|
||||||
#include "sys/etimer.h"
|
#include "sys/etimer.h"
|
||||||
|
|
||||||
@ -58,7 +56,7 @@ interrupt(TIMERA1_VECTOR) timera1 (void) {
|
|||||||
if(etimer_pending()
|
if(etimer_pending()
|
||||||
&& (etimer_next_expiration_time() - count) >= MAX_TICKS) {
|
&& (etimer_next_expiration_time() - count) >= MAX_TICKS) {
|
||||||
etimer_request_poll();
|
etimer_request_poll();
|
||||||
LPM_AWAKE();
|
LPM4_EXIT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* @(#)$Id: slip_uart1.c,v 1.1 2006/06/17 22:41:21 adamdunkels Exp $
|
* @(#)$Id: slip_uart1.c,v 1.2 2006/08/17 15:41:13 bg- Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -38,7 +38,6 @@
|
|||||||
|
|
||||||
#include "contiki.h"
|
#include "contiki.h"
|
||||||
|
|
||||||
#include "dev/lpm.h"
|
|
||||||
#include "dev/slip.h"
|
#include "dev/slip.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -160,6 +159,6 @@ __uart1_intr()
|
|||||||
dummy = RXBUF1; /* Clear error flags by forcing a dummy read. */
|
dummy = RXBUF1; /* Clear error flags by forcing a dummy read. */
|
||||||
} else {
|
} else {
|
||||||
if(slip_input_byte(RXBUF1))
|
if(slip_input_byte(RXBUF1))
|
||||||
LPM_AWAKE();
|
LPM4_EXIT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user