Skip to main content
Home Forums 68kMLA Serial Port Programming — #7
Post #7 by onlyonemac
Source Forum68kMLA
CategoryDevelopment
Post DateThu, 15 Nov 2012 - 17:05
Original URLhttps://68kmla.org/bb/threads/serial-port-programming.26534/
Post
Could I have a special driver which just mirrors the data sent to it (not like a printer driver, which does a lot else as well)? I would also need example code to use the driver.

I'm really not into assembly, registers, or baud rate calculations.

Essentially what I want is:

Code:
/*Open serial port.*/
OpenPort(handle *port, int portID);

/*Set baud rate and parity.*/
SetParity(handle port, int parityconstant);
SetBaud(handle port, int baudrate);

/*Send some data.*/
Send(byte data, handle port);

/*Receive some data.*/
data = Receive(handle port);
Note: All commands are imaginary only!!!

mp.ls