nakkaya / ferret

Ferret is a free software lisp implementation for real time embedded control systems.

Home Page:https://ferret-lang.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gpio/pin-mode does not work inside loops

chr15m opened this issue · comments

Using this:

(def start-low (list 3 6 12 23 16 17))

Both of these forms fail with the same error:

(map (fn [p] (gpio/pin-mode p :output)) start-low)
(doseq [p start-low]
  (do
    (gpio/pin-mode p :output)
    (gpio/digital-write p :low)))

Here is the error:

error: 'p__13889' was not declared in this scope
                   ::pinMode(number::to<number_t>(p__13889), OUTPUT);;
                                                  ^

Note that the gpio/digital-write inside the loop does not throw an error.

4bf3af9 fixes this issue.