From 784ca301f852568bcfa3dc1513c0681c97fea642 Mon Sep 17 00:00:00 2001 From: Niclas Finne Date: Mon, 30 Jan 2012 22:19:18 +0100 Subject: [PATCH] Updated for latest coffee-manager --- .../sics/cooja/mspmote/interfaces/CoojaM25P80.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/interfaces/CoojaM25P80.java b/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/interfaces/CoojaM25P80.java index dd8d4a5a1..11edda76d 100644 --- a/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/interfaces/CoojaM25P80.java +++ b/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/interfaces/CoojaM25P80.java @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: CoojaM25P80.java,v 1.2 2009/08/11 17:09:16 fros4943 Exp $ */ package se.sics.cooja.mspmote.interfaces; @@ -34,15 +33,12 @@ package se.sics.cooja.mspmote.interfaces; import java.io.IOException; import java.util.Arrays; -import org.apache.log4j.Logger; - import se.sics.coffee.CoffeeConfiguration; import se.sics.coffee.CoffeeImage; import se.sics.mspsim.chip.M25P80; -import se.sics.mspsim.core.*; +import se.sics.mspsim.core.MSP430Core; public class CoojaM25P80 extends M25P80 implements CoffeeImage { - private static Logger logger = Logger.getLogger(CoojaM25P80.class); public static int SIZE = 1024*1024; private byte[] data = new byte[SIZE]; @@ -81,7 +77,7 @@ public class CoojaM25P80 extends M25P80 implements CoffeeImage { * @see se.sics.coffee.CoffeeImage#erase(int, int) */ public void erase(int size, int offset) throws IOException { - Arrays.fill(data, CoffeeConfiguration.startOffset + offset, size, (byte)0); + Arrays.fill(data, COFFEE_CONF.startOffset + offset, size, (byte)0); } /** @@ -97,7 +93,7 @@ public class CoojaM25P80 extends M25P80 implements CoffeeImage { * @see se.sics.coffee.CoffeeImage#read(byte[], int, int) */ public void read(byte[] bytes, int size, int offset) throws IOException { - System.arraycopy(data, CoffeeConfiguration.startOffset + offset, bytes, 0, size); + System.arraycopy(data, COFFEE_CONF.startOffset + offset, bytes, 0, size); } /** @@ -105,7 +101,7 @@ public class CoojaM25P80 extends M25P80 implements CoffeeImage { * @see se.sics.coffee.CoffeeImage#write(byte[], int, int) */ public void write(byte[] bytes, int size, int offset) throws IOException { - System.arraycopy(bytes, 0, data, CoffeeConfiguration.startOffset + offset, size); + System.arraycopy(bytes, 0, data, COFFEE_CONF.startOffset + offset, size); } }