#ifndef _H_msp430hardware_h
#define _H_msp430hardware_h
+#if defined(__MSPGCC__)
+/* mspgcc */
+#include <msp430.h>
+#include <legacymsp430.h>
+#else /* __MSPGCC__ */
+/* old mspgcc3, forked mspgcc4 */
#include <io.h>
#include <signal.h>
+#endif /* __MSPGCC__ */
#include "msp430regtypes.h"
}
implementation {
command error_t Init.init() {
+#ifdef __MSP430_HAS_WDT__
+ WDTCTL = WDTPW + WDTHOLD;
+#endif
call MoteClockInit.init();
call MoteInit.init();
call LedsInit.init();
/* reset all of the ports to be input and using i/o functionality */
atomic
{
-#ifdef __MSP430_HAS_WDT__
- /* Stop the watchdog, if running. Should be somewhere in chips/msp430... */
- WDTCTL = WDTPW + WDTHOLD;
-#endif
-
/* Port 1: 7-0:- */
P1SEL = 0; /* 0 0 0 0 0 0 0 0 */
P1OUT = 0; /* 0 0 0 0 0 0 0 0 */
}
implementation {
command error_t Init.init() {
+#ifdef __MSP430_HAS_WDT__
+ WDTCTL = WDTPW + WDTHOLD;
+#endif
call MoteClockInit.init();
call MoteInit.init();
call LedsInit.init();
#ifndef _H_msp430hardware_h
#define _H_msp430hardware_h
+#if defined(__MSPGCC__)
+/* mspgcc */
+#include <msp430.h>
+#include <legacymsp430.h>
+#else /* __MSPGCC__ */
+/* old mspgcc3, forked mspgcc4 */
#include <io.h>
#include <signal.h>
+#endif /* __MSPGCC__ */
#include "msp430regtypes.h"
#include "Msp430DcoSpec.h"
}
implementation {
command error_t Init.init() {
+#ifdef __MSP430_HAS_WDT__
+ WDTCTL = WDTPW + WDTHOLD;
+#endif
call MoteClockInit.init();
call MoteInit.init();
call LedsInit.init();
}
implementation {
command error_t Init.init() {
+#ifdef __MSP430_HAS_WDT__
+ WDTCTL = WDTPW + WDTHOLD;
+#endif
call MoteClockInit.init();
call MoteInit.init();
call LedsInit.init();
}
implementation {
command error_t Init.init() {
+#ifdef __MSP430_HAS_WDT__
+ WDTCTL = WDTPW + WDTHOLD;
+#endif
call Msp430ClockInit.init();
TOSH_SET_PIN_DIRECTIONS();
call LedsInit.init();
}
implementation {
+ MSP430REG_NORACE(TAIV);
+ MSP430REG_NORACE(TBIV);
+
command error_t Init.init()
{
volatile uint16_t i;
/* reset all of the ports to be input and using i/o functionality */
atomic
{
-#ifdef __MSP430_HAS_WDT__
- /* Stop the watchdog, if running. Should be somewhere in chips/msp430... */
- WDTCTL = WDTPW + WDTHOLD;
-#endif
-
/* Port 1: 7:BQSTAT2, 6:BQSTAT1, 5:-, 4:-, 3:CP_CTS, 2:CP_RTS,
* 1:BSL_TX, 0:-
*/
/* reset all of the ports to be input and using i/o functionality */
atomic
{
-#ifdef __MSP430_HAS_WDT__
- /* Stop the watchdog, if running. Should be somewhere in chips/msp430... */
- WDTCTL = WDTPW + WDTHOLD;
-#endif
-
/* Port 1: 7:BQSTAT2, 6:BQSTAT1, 5:RAIN, 4:-, 3:CP_CTS, 2:CP_RTS,
* 1:BSL_TX, 0:WSPEED
*/