honeylisp/link/init.fnl

12 lines
295 B
Plaintext
Raw Normal View History

(local link
{:switch
(fn [self name]
(set self.machine (require (.. "link." name)))
2020-11-02 00:39:31 +00:00
(set self.name name))
:types [:serial :tape :mame :udpdebug]})
2020-11-02 00:39:31 +00:00
(local serial (require :link.serial))
2020-11-10 03:58:57 +00:00
(link:switch (if (and (pcall #(serial:connect)) (serial:connected?)) :serial :mame))
link