How to open/read/write a serial port with STk/Linux

From: Matthew R Welland <mattwell_at_us.ibm.com>
Date: Thu, 16 Aug 2001 16:48:33 -0400

I tried:

(define $inp (open-input-file "/dev/ttyS1"))
(define $oup (open-output-file "/dev/ttyS1"))
(write-char (integer->char 3) $oup)
(display (char->integer (read $inp)))

I didn't get errors but I didn't see any action on the serial port (I was
watching with a breakout box). Using Minicom I was able to see characters
going out and coming in. Am I on the right track or is there something
special about opening serial ports?

Any help and pointers appreciated.

Thanks.

Matt
--
ASIC Design Verification Methodology. Ph: (802) 769-7069 Email:
mattwell_at_us.ibm.com
Received on Thu Aug 16 2001 - 22:52:06 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST