Liking cljdoc? Tell your friends :D

serial.core


Bytablecljprotocol

to-bytesclj

(to-bytes this)

Converts the type to bytes

Converts the type to bytes
source

closecljdeprecated

Deprecated; use close! instead

Deprecated; use `close!` instead
sourceraw docstring

close!clj

(close! port)

Closes an open port.

Closes an open port.
sourceraw docstring

DATABITS_5clj

source

DATABITS_6clj

source

DATABITS_7clj

source

DATABITS_8clj

source

FLOWCONTROL_NONEclj

source

FLOWCONTROL_RTSCTS_INclj

source

FLOWCONTROL_RTSCTS_OUTclj

source

FLOWCONTROL_XONXOFF_INclj

source

FLOWCONTROL_XONXOFF_OUTclj

source

listencljdeprecated

Deprecated; use listen! instead

Deprecated; use `listen!` instead
sourceraw docstring

listen!clj

(listen! port handler)
(listen! port handler skip-buffered?)

Register a function to be called for every byte received on the specified port.

Only one listener is allowed at a time.

Register a function to be called for every byte received on the specified port.

Only one listener is allowed at a time.
sourceraw docstring

openclj

(open path
      &
      {:keys [baud-rate databits stopbits parity]
       :or {baud-rate 115200
            databits DATABITS_8
            stopbits STOPBITS_1
            parity PARITY_NONE}})

Returns an opened serial port. Allows you to specify the

  • :baud-rate (defaults to 115200)
  • :stopbits (defaults to STOPBITS_1)
  • :databits (defaults to DATABITS_8)
  • :parity (defaults to PARITY_NONE).

Additionally, setting the value of :

(open "/dev/ttyUSB0") (open "/dev/ttyUSB0" :baud-rate 9200)

Returns an opened serial port. Allows you to specify the

* :baud-rate (defaults to 115200)
* :stopbits (defaults to STOPBITS_1)
* :databits (defaults to DATABITS_8)
* :parity (defaults to PARITY_NONE).

Additionally, setting the value of :

(open "/dev/ttyUSB0")
(open "/dev/ttyUSB0" :baud-rate 9200)
sourceraw docstring

PARITY_EVENclj

source

PARITY_MARKclj

source

PARITY_NONEclj

source

PARITY_ODDclj

source

PARITY_SPACEclj

source

port-identifierclj

(port-identifier path)
source

port-identifiersclj

(port-identifiers)

Returns a seq representing all port identifiers visible to the system

Returns a seq representing all port identifiers visible to the system
sourceraw docstring

port-idscljdeprecated

Deprecated; use port-identifiers

Deprecated; use `port-identifiers`
sourceraw docstring

remove-listenercljdeprecated

Deprecated; use unlisten! instead

Deprecated; use `unlisten!` instead
sourceraw docstring

skip-input!clj

(skip-input! port)
(skip-input! port to-drop)

Skips a specified amount of buffered input data.

Skips a specified amount of buffered input data.
sourceraw docstring

STOPBITS_1clj

source

STOPBITS_1_5clj

source

STOPBITS_2clj

source

unlisten!clj

(unlisten! port)

De-register the listening fn for the specified port

De-register the listening fn for the specified port
sourceraw docstring

writeclj

(write port & data)

Writes the given data to the port and returns it. All number literals are treated as bytes. By extending the protocol Bytable, any arbitray values can be sent to the output stream. For example: (extend-protocol Bytable String (to-bytes [this] (.getBytes this "ASCII")))

Writes the given data to the port and returns it. All number literals are treated as bytes.
By extending the protocol Bytable, any arbitray values can be sent to the output stream.
For example:
   (extend-protocol Bytable
    String
    (to-bytes [this] (.getBytes this "ASCII")))
sourceraw docstring

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

× close