/
packages.lisp
34 lines (30 loc) · 1.06 KB
/
packages.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#-(or clisp sbcl)
(eval-when (:compile-toplevel :load-toplevel)
(error "Only SBCL and clisp are supported"))
(defpackage serial-lowlevel
(:use #:cl)
(:export #:open-serial
#:configure-serial
#:serial-error))
(defpackage serial
(:use #:cl #:trivial-gray-streams #:serial-lowlevel)
(:export #:serial-device-input
#:serial-device-output
#:serial-device-io
#:serial-device-baudrate
#:serial-device-framesize
#:serial-device-stopbits
#:serial-device-parity
#:serial-device-canon-p
#:with-serial-device
#:serial-error
#:reset-old-value))
(in-package :serial-lowlevel)
(define-condition serial-error () ()
(:documentation "Parent of all conditions associated with serial streams"))
(define-condition serial-invalid-parameter (serial-error)
((parameter :reader invalid-parameter
:initarg :parameter))
(:report (lambda (c s)
(format s "Invalid parameter was specified: ~A"
(invalid-parameter c)))))