// Path: se/sics/mspsim/core/EmulationLogger.java
// public enum WarningType {
//     EMULATION_ERROR, EXECUTION,
//     MISALIGNED_READ, MISALIGNED_WRITE,
//     ADDRESS_OUT_OF_BOUNDS_READ, ADDRESS_OUT_OF_BOUNDS_WRITE,
//     ILLEGAL_IO_WRITE, VOID_IO_READ, VOID_IO_WRITE
// };


import se.sics.mspsim.core.EmulationLogger.WarningType;
      div = 1;
    }
    if (clockSource == MSP430Constants.CLK_ACLK) {
      if (DEBUG) {
        log(" Baud rate is (bps): " + cpu.aclkFrq / div + " div = " + div);
      }
      baudRate = cpu.aclkFrq / div;
    } else {
      if (DEBUG) {     
        log(" Baud rate is (bps): " + cpu.smclkFrq / div + " div = " + div);
      }
      baudRate = cpu.smclkFrq / div;
    }
    if (baudRate == 0) baudRate = 1;
    // Is this correct??? Is it the DCO or smclkFRQ we should have here???
    tickPerByte = (8 * cpu.smclkFrq) / baudRate;
    if (DEBUG) {
      log(" Ticks per byte: " + tickPerByte);
    }
  }

  // We should add "Interrupt serviced..." to indicate that its latest
  // Interrupt was serviced...
  public void interruptServiced(int vector) {
    /* NOTE: this is handled by SFR : clear IFG bit if interrupt is serviced */
//      System.out.println(getName() + " SFR irq " + vector + " " + txShiftReg + " " + getIFG());
  }

  private void handleTransmit(long cycles) {
    if (cpu.getMode() >= MSP430Core.MODE_LPM3) {
// Path: se/sics/mspsim/core/EmulationLogger.java
// public enum WarningType {
//     EMULATION_ERROR, EXECUTION,
//     MISALIGNED_READ, MISALIGNED_WRITE,
//     ADDRESS_OUT_OF_BOUNDS_READ, ADDRESS_OUT_OF_BOUNDS_WRITE,
//     ILLEGAL_IO_WRITE, VOID_IO_READ, VOID_IO_WRITE
// };


// Path: se/sics/mspsim/core/USCI.java
import se.sics.mspsim.core.EmulationLogger.WarningType;

      div = 1;
    }
    if (clockSource == MSP430Constants.CLK_ACLK) {
      if (DEBUG) {
        log(" Baud rate is (bps): " + cpu.aclkFrq / div + " div = " + div);
      }
      baudRate = cpu.aclkFrq / div;
    } else {
      if (DEBUG) {     
        log(" Baud rate is (bps): " + cpu.smclkFrq / div + " div = " + div);
      }
      baudRate = cpu.smclkFrq / div;
    }
    if (baudRate == 0) baudRate = 1;
    // Is this correct??? Is it the DCO or smclkFRQ we should have here???
    tickPerByte = (8 * cpu.smclkFrq) / baudRate;
    if (DEBUG) {
      log(" Ticks per byte: " + tickPerByte);
    }
  }

  // We should add "Interrupt serviced..." to indicate that its latest
  // Interrupt was serviced...
  public void interruptServiced(int vector) {
    /* NOTE: this is handled by SFR : clear IFG bit if interrupt is serviced */
//      System.out.println(getName() + " SFR irq " + vector + " " + txShiftReg + " " + getIFG());
  }

  private void handleTransmit(long cycles) {
    if (cpu.getMode() >= MSP430Core.MODE_LPM3) {
      logw(WarningType.EXECUTION, "Warning: USART transmission during LPM!!! " + nextTXByte);