honeylisp/link/init.fnl

12 lines
285 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))
2020-11-20 04:35:39 +00:00
:types [:serial :tape :mame]})
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