Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 659 Bytes

README.md

File metadata and controls

32 lines (23 loc) · 659 Bytes

CeriaL

Mmmmh...Crunchy!

Usage

WARNING! I'm still experimenting...Don't get used to the flavour just yet.

;; serial port to write to
(setq *sout* (make-serial "pseudo0"))

;; the other end
(setq *sin* (make-serial "pseudo1"))

;; write some 
(write-byte-seq *sout* (flexi-streams:string-to-octets "Hello World!"))

;; read some
(flexi-streams:octets-to-string (cerial:read-byte-seq *sin* 12))

"Hello World!"

Or more 'idiomatically':

(with-serial (sout "pseudo1"
		    :baudrate 115200
		    :parity :PARITY-ODD)
  (write-serial-byte sout 42))

For a full description of the API see the wiki pages of the future!