From 2d70ea18bb09b64e98f342307de703182ffa4ba2 Mon Sep 17 00:00:00 2001 From: Niclas Finne Date: Fri, 8 Mar 2013 17:39:05 +0100 Subject: [PATCH] Corrected the button configuration for the WiSMote platform --- se/sics/mspsim/chip/Button.java | 2 +- se/sics/mspsim/platform/wismote/WismoteNode.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/se/sics/mspsim/chip/Button.java b/se/sics/mspsim/chip/Button.java index 8a9f47f..e076ec3 100644 --- a/se/sics/mspsim/chip/Button.java +++ b/se/sics/mspsim/chip/Button.java @@ -76,6 +76,6 @@ public class Button extends Chip { @Override public String info() { - return id + ": " + (isPressed ? "pressed" : "released"); + return " Button is " + (isPressed ? "pressed" : "not pressed"); } } diff --git a/se/sics/mspsim/platform/wismote/WismoteNode.java b/se/sics/mspsim/platform/wismote/WismoteNode.java index d2b2853..c42251b 100644 --- a/se/sics/mspsim/platform/wismote/WismoteNode.java +++ b/se/sics/mspsim/platform/wismote/WismoteNode.java @@ -67,8 +67,8 @@ public class WismoteNode extends GenericNode implements PortListener, USARTListe /* P4.4 - Output: RESET_N to CC2520 */ public static final int CC2520_RESET = 1 << 4; - /* P2.7 - Button */ - public static final int BUTTON_PIN = 7; + /* P1.4 - Button */ + public static final int BUTTON_PIN = 4; /* P8.6 - Red (left) led */ private static final int LEDS_CONF_RED2 = 1 << 6; @@ -173,7 +173,7 @@ public class WismoteNode extends GenericNode implements PortListener, USARTListe throw new EmulationException("Could not setup wismote mote - missing USCI B0"); } leds = new Leds(cpu, LEDS); - button = new Button("Button", cpu, port2, BUTTON_PIN, true); + button = new Button("Button", cpu, port1, BUTTON_PIN, true); IOUnit usart = cpu.getIOUnit("USCI A1"); if (usart instanceof USARTSource) {