[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: parallel and serial port input/output
Quoting "Dan Anderson":
> What is the best way to communicate directly with the serial or parallel
> ports? [...]
> If possible I
> would like to communicate directly with com1 and lpt1. What would you
> recommend?
One possibility is to use `open-input-file'/`open-output-file' on the
special filesnames "COM1" and "LPT1". For example:
(define i (open-input-file "lpt1"))
(define o (open-output-file "lpt1" 'append))
> I looked through documentation and found this for creating custom
> ports. Is this used for serial and parallel io?
>
> (make-input-port read-char-proc char-ready?-proc close-proc
> [peek-char-proc])
No, that's not going to help much, unless you resort to a C-implemented
extension to create your own reader and writer functions.
Matthew