added with-raw-serial to the export symbols list; added wait-until-fd-ready in with-tty-stream example

Nikolay V. Razbegaev [2009-10-17 14:09]
added with-raw-serial to the export symbols list; added wait-until-fd-ready in with-tty-stream example
Filename
pkgdcl.lisp
streams.lisp
diff --git a/pkgdcl.lisp b/pkgdcl.lisp
index 466c4b8..2991db1 100644
--- a/pkgdcl.lisp
+++ b/pkgdcl.lisp
@@ -145,5 +145,6 @@
    #:parity
    #:really-raw
    #:open-tty-stream
-   #:with-tty-stream))			; </ defpackage >
+   #:with-tty-stream
+   #:with-raw-serial))			; </ defpackage >
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/streams.lisp b/streams.lisp
index c76d597..4c9b4e9 100644
--- a/streams.lisp
+++ b/streams.lisp
@@ -35,8 +35,8 @@
     (let* ((out \"hello\")
            (ln (length out))
            (in  (make-string ln)))
-      (stream-write-sequence tty out 0 ln)
-      (sleep .1)
+      (stream-write-sequence tty out 0 ln)
+      (iomux:wait-until-fd-ready (fd-of tty) :input 1 t)
       (stream-read-sequence tty in 0 ln)
       in))
   "
ViewGit