Liking cljdoc? Tell your friends :D

serial-port


closeclj

(close port)

Closes an open port.

Closes an open port.
raw docstring

list-portsclj

(list-ports)

Print out the available ports with an index number for future reference with (port-at <i>).

Print out the available ports with an index number for future reference
with (port-at <i>).
raw docstring

listenclj

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

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

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

on-byteclj

(on-byte port handler)
(on-byte port handler skip-buffered?)

Calls handler for each byte received

Calls handler for each byte received
raw docstring

on-n-bytesclj

(on-n-bytes port n handler)
(on-n-bytes port n handler skip-buffered?)

Partitions the incoming byte stream into seqs of size n and calls handler passing each partition.

Partitions the incoming byte stream into seqs of size n and calls handler passing each partition.
raw docstring

openclj

(open path)
(open path baud-rate)

Returns an opened serial port. Allows you to specify the baud-rate (defaults to 115200). (open "/dev/ttyUSB0") (open "/dev/ttyUSB0" 9200)

Returns an opened serial port. Allows you to specify the baud-rate (defaults to 115200).
(open "/dev/ttyUSB0")
(open "/dev/ttyUSB0" 9200)
raw docstring

port-atclj

(port-at idx)

Returns the name of the serial port at idx.

Returns the name of the serial port at idx.
raw docstring

port-idsclj

(port-ids)

Returns a seq representing all port identifiers visible to the system

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

PORT-OPEN-TIMEOUTclj


remove-listenerclj

(remove-listener port)

De-register the listening fn for the specified port

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

writeclj

(write port bytes)

Write a byte array to a port

Write a byte array to a port
raw docstring

write-intclj

(write-int port int)

Write an Integer as a byte to the port.

Write an Integer as a byte to the port.
raw docstring

write-int-seqclj

(write-int-seq port ints)

Write a seq of Integers as bytes to the port.

Write a seq of Integers as bytes to the port.
raw docstring

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

× close