Liking cljdoc? Tell your friends :D

gpio.core


Closeableclj/sprotocol

close!clj/s

(close! self)

Closes this object

Closes this object
source

export!clj/s

(export! port)
source

format-raw-digitalclj/smultimethod

Formats the raw values received from digital reads of pin state, or digital events.

The type specified is a keyword.

Formats the raw values received from digital reads of pin state,
or digital events.
   
The type specified is a keyword.
sourceraw docstring

GpioChannelProviderclj/sprotocol

create-edge-channelclj/s

(create-edge-channel port)

Returns a core.async channel on which events will be put

Returns a core.async channel on which events will be put

release-edge-channel!clj/s

(release-edge-channel! port channel)

set-edge!clj/s

(set-edge! providor setting)
source

GpioPortclj/sprotocol

read-valueclj/s

(read-value port)

Return the value of the port

Return the value of the port

set-active-low!clj/s

(set-active-low! port active-low?)

Invert the logic of the value pin for both reading and writing so that a high == 0 and low == 1.

Invert the logic of the value pin for both reading and writing so that a high == 0 and low == 1. 

set-direction!clj/s

(set-direction! port direction)

Sets the direction of this port: in or out.

Sets the direction of this port: in or out.

toggle!clj/s

(toggle! port)

Flips the value of the port

Flips the value of the port

write-value!clj/s

(write-value! port value)

Writes the value to the port. The value may be specified as :high, :low (and symbol or string variations), , �, or 1, 0

Writes the value to the port.  The value may be specified as `:high`, `:low` (and symbol or string variations), , , or 1, 0
source

high-low-valueclj/s

(high-low-value value)
source

open-channel-portclj/s

(open-channel-port port & opts)

Opens a port which can be used for listening to value changes. In addition to the options map for open-port, the following are available:

  • :event-buffer-size - the size of the change events buffer. Defaults to 1
  • :timeout - sets a timeout for the OS polling wait time. Defaults to -1, which waits indefinitely
  • :edge - sets the edge value- :rising, :falling, or :both
Opens a port which can be used for listening to value changes.  In addition to the
options map for [[open-port]], the following are available:
* `:event-buffer-size` - the size of the change events buffer.  Defaults to 1
* `:timeout` - sets a timeout for the OS polling wait time.  Defaults to -1, which waits indefinitely
* `:edge` - sets the edge value- `:rising`, `:falling`, or `:both`
sourceraw docstring

open-portclj/s

(open-port port & opts)

Opens a port from which values may be read or written. Args:

  • port - the gpio pin number
  • opts: optional keyword args
    • :direction - sets the initial direction
    • :active-low? - sets the port as "active low", value true or false
    • :initial-value - sets the intitial value of the pin.
    • :digital-result-format - describes the format for digital values on read This can be one of #{:keyword :symbol :integer :boolean :char}
    • :from-raw-fn - a converter function, which takes the char value ( or �) read and converts it into a meaningful value. Overrides the default formatter
Opens a port from which values may be read or written.
Args:
* `port` - the gpio pin number
* opts: optional keyword args
    * `:direction` - sets the initial direction
    * `:active-low?` - sets the port as "active low", value true or false
    * `:initial-value` - sets the intitial value of the pin.
    * `:digital-result-format` - describes the format for digital values on read
        This can be one of `#{:keyword :symbol :integer :boolean :char}`
    * `:from-raw-fn` - a converter function, which takes the `char`
        value ( or ) read and converts it into a meaningful value.
        Overrides the default formatter
sourceraw docstring

unexport!clj/s

(unexport! port)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close