Package drivers.ser

Class OutputBuffer

java.lang.Object
drivers.ser.OutputBuffer

public class OutputBuffer extends Object
This is a buffer that is filled in by SMSQE and then output to the serial port.
  • Constructor Summary

    Constructors
    Constructor
    Description
    OutputBuffer(int psize)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    checkRoom(com.fazecast.jSerialComm.SerialPort serPort)
    Check that queue is empty, if not (try to) empty it.
    int
    sendBytes(com.fazecast.jSerialComm.SerialPort serPort, int nbrOfBytesToSend, MC68000Cpu cpu, int A1, int D7)
    Send multiple bytes to the serial port (bytes lay at (A1))
    int
    sendOneByte(com.fazecast.jSerialComm.SerialPort serPort, MC68000Cpu cpu, byte b, int D7)
    Send one byte to the serial port.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OutputBuffer

      public OutputBuffer(int psize)
  • Method Details

    • checkRoom

      public boolean checkRoom(com.fazecast.jSerialComm.SerialPort serPort)
      Check that queue is empty, if not (try to) empty it.
      Parameters:
      serPort - where to send data.
      Returns:
      true if queue is empty and can accept new data, false if not
    • sendOneByte

      public int sendOneByte(com.fazecast.jSerialComm.SerialPort serPort, MC68000Cpu cpu, byte b, int D7)
      Send one byte to the serial port.
      Parameters:
      serPort - where to send data
      cpu -
      b - byte to be sent
      D7 - flag : if bit 32 set: do translate
      Returns:
      0 or SMSQE error code
    • sendBytes

      public int sendBytes(com.fazecast.jSerialComm.SerialPort serPort, int nbrOfBytesToSend, MC68000Cpu cpu, int A1, int D7)
      Send multiple bytes to the serial port (bytes lay at (A1))
      Parameters:
      serPort - where to send data
      nbrOfBytesToSend - how many bytes are to be sent
      cpu - CPU with memory containing bytes to send
      A1 - whence in memory to take bytes
      D7 - flag : if bit 32 set: do translate
      Returns:
      number of bytes sent - if this is 0, nothing was sent