Package se.sics.mspsim.core

Examples of se.sics.mspsim.core.IOUnit


    public void setupNode() {
        setupNodePorts();

        if (!config.getPropertyAsBoolean("nogui", true)) {
            // Add some windows for listening to serial output
            IOUnit usart = cpu.getIOUnit("USCI A1");
            if (usart instanceof USARTSource) {
              SerialMon serial = new SerialMon((USARTSource)usart, "USCI A1 Port Output");
              registry.registerComponent("serialgui", serial);
            }
        }
View Full Code Here


        }

        leds = new Leds(cpu, LEDS);
        button = new Button("Button", cpu, port2, BUTTON_PIN, true);

        IOUnit usart = cpu.getIOUnit("USCI A0");
        if (usart instanceof USARTSource) {
            registry.registerComponent("serialio", usart);
        }

        if (getFlash() == null) {
View Full Code Here

        if (!config.getPropertyAsBoolean("nogui", true)) {
            setupGUI();

            // Add some windows for listening to serial output
            IOUnit usart = cpu.getIOUnit("USCI A0");
            if (usart instanceof USARTSource) {
                SerialMon serial = new SerialMon((USARTSource)usart, "USCI A0 Port Output");
                registry.registerComponent("serialgui", serial);
            }
        }
View Full Code Here

  private static final Color RED = new Color(255, 0, 0);

  public SkyLED(Mote mote) {
    mspMote = (SkyMote) mote;

    IOUnit unit = mspMote.getCPU().getIOUnit("Port 5");
    if (unit instanceof IOPort) {
      ((IOPort) unit).setPortListener(new PortListener() {
        public void portWrite(IOPort source, int data) {
          blueOn = (data & SkyNode.BLUE_LED) == 0;
          greenOn = (data & SkyNode.GREEN_LED) == 0;
View Full Code Here

   */
  public TR1001Radio(Mote mote) {
    this.mote = (MspMote) mote;

    /* Start listening to CPU's USART */
    IOUnit usart = this.mote.getCPU().getIOUnit("USART 0");
    if (usart != null && usart instanceof USART) {
      radioUSART = (USART) usart;
      radioUSART.addUSARTListener(this);
    } else {
      throw new RuntimeException("Bad TR1001 IO: " + usart);
View Full Code Here

  private static final Color DARK_YELLOW = new Color(184,134,11);

  public Exp5438LED(Mote mote) {
    mspMote = (Exp5438Mote) mote;

    IOUnit unit = mspMote.getCPU().getIOUnit("P1");
    if (unit instanceof IOPort) {
      ((IOPort) unit).addPortListener(new PortListener() {
        public void portWrite(IOPort source, int data) {
          redOn = (data & Exp5438Node.LEDS_CONF_RED) != 0;
          yellowOn = (data & Exp5438Node.LEDS_CONF_YELLOW) != 0;
View Full Code Here

  private static final Color DARK_GREEN = new Color(0,100,0);

  public TyndallLED(Mote mote) {
    mspMote = (TyndallMote) mote;

    IOUnit unit = mspMote.getCPU().getIOUnit("P7");
    if (unit instanceof IOPort) {
      ((IOPort) unit).addPortListener(new PortListener() {
        public void portWrite(IOPort source, int data) {
          redOn = (data & TyndallNode.LEDS_CONF_RED) == 0;
          setChanged();
View Full Code Here

  private static final Color RED = new Color(255, 0, 0);

  public SkyLED(Mote mote) {
    mspMote = (SkyMote) mote;

    IOUnit unit = mspMote.getCPU().getIOUnit("Port 5");
    if (unit instanceof IOPort) {
      ((IOPort) unit).addPortListener(new PortListener() {
        public void portWrite(IOPort source, int data) {
          blueOn = (data & SkyNode.BLUE_LED) == 0;
          greenOn = (data & SkyNode.GREEN_LED) == 0;
View Full Code Here

TOP

Related Classes of se.sics.mspsim.core.IOUnit

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.