Package drivers.ser
Class OutputBuffer
java.lang.Object
drivers.ser.OutputBuffer
This is a buffer that is filled in by SMSQE and then output to the serial port.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
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.
-
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
Send one byte to the serial port.- Parameters:
serPort
- where to send datacpu
-b
- byte to be sentD7
- 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 datanbrOfBytesToSend
- how many bytes are to be sentcpu
- CPU with memory containing bytes to sendA1
- whence in memory to take bytesD7
- flag : if bit 32 set: do translate- Returns:
- number of bytes sent - if this is 0, nothing was sent
-