This is the cl-spidev Reference Manual, version 1.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:24:25 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
cl-spidev
A library for the Linux SPIDEV kernel module as used on hobby kits such as the Raspberry Pi
Yukari Hafner <shinmera@tymoon.eu>
Yukari Hafner <shinmera@tymoon.eu>
(GIT https://github.com/Shinmera/cl-spidev.git)
zlib
1.1.0
documentation-utils
(system).
trivial-garbage
(system).
cffi
(system).
package.lisp
(file).
ioctl.lisp
(file).
constants.lisp
(file).
low-level.lisp
(file).
wrapper.lisp
(file).
documentation.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-spidev/cl-spidev.asd
cl-spidev/package.lisp
cl-spidev/ioctl.lisp
cl-spidev/constants.lisp
cl-spidev/low-level.lisp
cl-spidev/wrapper.lisp
cl-spidev/documentation.lisp
cl-spidev/ioctl.lisp
package.lisp
(file).
cl-spidev
(system).
%ioctl
(function).
%var-accessor-*errno*
(function).
(setf %var-accessor-*errno*)
(function).
*errno*
(symbol macro).
ioctl
(function).
(setf ioctl)
(function).
stream-fd
(function).
strerror
(function).
cl-spidev/constants.lisp
ioctl.lisp
(file).
cl-spidev
(system).
spi-3wire
(constant).
spi-cpol
(constant).
spi-cs-high
(constant).
spi-ioc-message-1
(constant).
spi-ioc-rd-bits-per-word
(constant).
spi-ioc-rd-lsb-first
(constant).
spi-ioc-rd-max-speed-hz
(constant).
spi-ioc-rd-mode
(constant).
spi-ioc-rd-mode32
(constant).
spi-ioc-wr-bits-per-word
(constant).
spi-ioc-wr-lsb-first
(constant).
spi-ioc-wr-max-speed-hz
(constant).
spi-ioc-wr-mode
(constant).
spi-ioc-wr-mode32
(constant).
spi-loop
(constant).
spi-lsb-first
(constant).
spi-mode-0
(constant).
spi-mode-1
(constant).
spi-mode-2
(constant).
spi-mode-3
(constant).
spi-no-cs
(constant).
spi-ready
(constant).
spi-rx-dual
(constant).
spi-rx-quad
(constant).
spi-tx-dual
(constant).
spi-tx-quad
(constant).
spi-cpha
(constant).
xfer
(class).
xfer-bits/word
(function).
(setf xfer-bits/word)
(function).
xfer-cs-change
(function).
(setf xfer-cs-change)
(function).
xfer-delay-usecs
(function).
(setf xfer-delay-usecs)
(function).
xfer-len
(function).
(setf xfer-len)
(function).
xfer-pad
(function).
(setf xfer-pad)
(function).
xfer-rx-buf
(function).
(setf xfer-rx-buf)
(function).
xfer-rx-nbits
(function).
(setf xfer-rx-nbits)
(function).
xfer-speed-hz
(function).
(setf xfer-speed-hz)
(function).
xfer-tx-buf
(function).
(setf xfer-tx-buf)
(function).
xfer-tx-nbits
(function).
(setf xfer-tx-nbits)
(function).
cl-spidev/low-level.lisp
constants.lisp
(file).
cl-spidev
(system).
*spidev-root*
(special variable).
bits/word
(function).
(setf bits/word)
(function).
close-spi
(function).
devices
(function).
lsb-first
(function).
(setf lsb-first)
(function).
max-speed
(function).
(setf max-speed)
(function).
mode
(function).
(setf mode)
(function).
open-spi
(function).
read-bytes
(function).
transmit
(function).
with-open-spi
(macro).
write-bytes
(function).
file-name
(function).
spidev-file
(function).
cl-spidev/wrapper.lisp
low-level.lisp
(file).
cl-spidev
(system).
(setf bits/word)
(function).
close
(function).
handle
(structure).
(setf lsb-first)
(function).
(setf max-speed)
(function).
(setf mode)
(function).
open
(function).
read
(function).
read*
(function).
transmit
(function).
write
(function).
write*
(function).
copy-handle
(function).
handle-bits/word
(reader).
(setf handle-bits/word)
(writer).
handle-lsb-first
(reader).
(setf handle-lsb-first)
(writer).
handle-max-speed
(reader).
(setf handle-max-speed)
(writer).
handle-mode
(reader).
(setf handle-mode)
(writer).
handle-p
(function).
handle-stream
(reader).
make-handle
(function).
cl-spidev/documentation.lisp
wrapper.lisp
(file).
cl-spidev
(system).
Packages are listed by definition order.
cl-spidev
org.shirakumo.spidev
spidev
common-lisp
.
bits/word
(reader).
(setf bits/word)
(function).
close
(function).
handle
(reader).
handle
(structure).
lsb-first
(reader).
(setf lsb-first)
(function).
max-speed
(reader).
(setf max-speed)
(function).
mode
(reader).
(setf mode)
(function).
open
(function).
read
(function).
read*
(function).
transmit
(function).
write
(function).
write*
(function).
copy-handle
(function).
handle-bits/word
(reader).
(setf handle-bits/word)
(writer).
handle-lsb-first
(reader).
(setf handle-lsb-first)
(writer).
handle-max-speed
(reader).
(setf handle-max-speed)
(writer).
handle-mode
(reader).
(setf handle-mode)
(writer).
handle-p
(function).
handle-stream
(reader).
make-handle
(function).
cl-spidev-lli
org.shirakumo.spidev.lli
common-lisp
.
*spidev-root*
(special variable).
bits/word
(function).
(setf bits/word)
(function).
close-spi
(function).
devices
(function).
lsb-first
(function).
(setf lsb-first)
(function).
max-speed
(function).
(setf max-speed)
(function).
mode
(function).
(setf mode)
(function).
open-spi
(function).
read-bytes
(function).
spi-3wire
(constant).
spi-cpol
(constant).
spi-cs-high
(constant).
spi-ioc-message-1
(constant).
spi-ioc-rd-bits-per-word
(constant).
spi-ioc-rd-lsb-first
(constant).
spi-ioc-rd-max-speed-hz
(constant).
spi-ioc-rd-mode
(constant).
spi-ioc-rd-mode32
(constant).
spi-ioc-wr-bits-per-word
(constant).
spi-ioc-wr-lsb-first
(constant).
spi-ioc-wr-max-speed-hz
(constant).
spi-ioc-wr-mode
(constant).
spi-ioc-wr-mode32
(constant).
spi-loop
(constant).
spi-lsb-first
(constant).
spi-mode-0
(constant).
spi-mode-1
(constant).
spi-mode-2
(constant).
spi-mode-3
(constant).
spi-no-cs
(constant).
spi-ready
(constant).
spi-rx-dual
(constant).
spi-rx-quad
(constant).
spi-tx-dual
(constant).
spi-tx-quad
(constant).
transmit
(function).
with-open-spi
(macro).
write-bytes
(function).
%ioctl
(function).
%var-accessor-*errno*
(function).
(setf %var-accessor-*errno*)
(function).
*errno*
(symbol macro).
file-name
(function).
ioctl
(function).
(setf ioctl)
(function).
spi-cpha
(constant).
spidev-file
(function).
stream-fd
(function).
strerror
(function).
xfer
(class).
xfer-bits/word
(function).
(setf xfer-bits/word)
(function).
xfer-cs-change
(function).
(setf xfer-cs-change)
(function).
xfer-delay-usecs
(function).
(setf xfer-delay-usecs)
(function).
xfer-len
(function).
(setf xfer-len)
(function).
xfer-pad
(function).
(setf xfer-pad)
(function).
xfer-rx-buf
(function).
(setf xfer-rx-buf)
(function).
xfer-rx-nbits
(function).
(setf xfer-rx-nbits)
(function).
xfer-speed-hz
(function).
(setf xfer-speed-hz)
(function).
xfer-tx-buf
(function).
(setf xfer-tx-buf)
(function).
xfer-tx-nbits
(function).
(setf xfer-tx-nbits)
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Constant holding the value defined in the kernel constant SPI_3WIRE.
Constant holding the value defined in the kernel constant SPI_CPOL.
Constant holding the value defined in the kernel constant SPI_CS_HIGH.
Constant holding the value defined in the kernel constant SPI_IOC_MESSAGE(1).
Constant holding the value defined in the kernel constant SPI_IOC_RD_BITS_PER_WORD.
Constant holding the value defined in the kernel constant SPI_IOC_RD_LSB_FIRST.
Constant holding the value defined in the kernel constant SPI_IOC_RD_MAX_SPEED_HZ.
Constant holding the value defined in the kernel constant SPI_IOC_RD_MODE.
Constant holding the value defined in the kernel constant SPI_IOC_RD_MODE32.
Constant holding the value defined in the kernel constant SPI_IOC_WR_BITS_PER_WORD.
Constant holding the value defined in the kernel constant SPI_IOC_WR_LSB_FIRST.
Constant holding the value defined in the kernel constant SPI_IOC_WR_MAX_SPEED_HZ.
Constant holding the value defined in the kernel constant SPI_IOC_WR_MODE.
Constant holding the value defined in the kernel constant SPI_IOC_WR_MODE32.
Constant holding the value defined in the kernel constant SPI_LOOP.
Constant holding the value defined in the kernel constant SPI_LSB_FIRST.
Constant holding the value defined in the kernel constant SPI_MODE_0.
Constant holding the value defined in the kernel constant SPI_MODE_1.
Constant holding the value defined in the kernel constant SPI_MODE_2.
Constant holding the value defined in the kernel constant SPI_MODE_3.
Constant holding the value defined in the kernel constant SPI_NO_CS.
Constant holding the value defined in the kernel constant SPI_READY.
Constant holding the value defined in the kernel constant SPI_RX_DUAL.
Constant holding the value defined in the kernel constant SPI_RX_QUAD.
Constant holding the value defined in the kernel constant SPI_TX_DUAL.
Constant holding the value defined in the kernel constant SPI_TX_QUAD.
The root path for SPIDEV devices. Should be /dev/
Convenience wrapper to lexically retain a handle to a SPIDEV device.
See OPEN-SPI
See CLOSE-SPI
Accessor to how many bits there are in a word on the device.
Should be an (UNSIGNED-BYTE 8) value.
See HANDLE
Accessor to how many bits there are per word on the SPIDEV device.
The value should be a positive integer, where 0 defaults to 8.
See IOCTL
See SPI-IOC-RD-BITS-PER-WORD
See SPI-IOC-WR-BITS-PER-WORD
Safely closes the SPIDEV device. It becomes unusable after this.
See HANDLE
Close a handle to a SPIDEV device.
See WITH-OPEN-SPI
Return a list of available SPIDEV devices on the system.
Returns the underlying stream handle of the handle object.
This is useful when you need to interact with the low-level
system directly for some reason.
See HANDLE
Accessor to whether the least significant byte comes first.
Should be a boolean.
See HANDLE
Accessor to whether the least significant byte comes first on the SPIDEV device.
The value should be T or NIL.
See IOCTL
See SPI-IOC-RD-LSB-FIRST
See SPI-IOC-WR-LSB-FIRST
Accessor to the maximum transfer speed of the SPIDEV device in Hertz.
Should be an (UNSIGNED-BYTE 32) value.
The device may reject your requested speed, in which case a
warning is signalled and the actual speed is returned.
See HANDLE
Accessor to the maximum speed frequency of the SPIDEV device in Hertz.
The value should be a positive integer. If it is too large and
the device refuses to adjust to it, a warning is signalled.
The actual rate in Hertz is returned.
See IOCTL
See SPI-IOC-RD-MAX-SPEED-HZ
See SPI-IOC-WR-MAX-SPEED-HZ
Accessor to the SPIDEV device’s transfer mode.
The value should be one of :MODE-0 :MODE-1 :MODE-2 :MODE-3
See HANDLE
Accessor to the mode in which the SPIDEV device operates.
The value should be one of :MODE-0 :MODE-1 :MODE-2 :MODE-3 or
a specific mode integer.
See IOCTL
See SPI-IOC-WR-MODE32
See SPI-IOC-RD-MODE32
See SPI-MODE-0
See SPI-MODE-1
See SPI-MODE-2
See SPI-MODE-3
Open a handle to a SPIDEV device.
This will produce a safe object that will always ensure the underlying file-system handle is closed when the object is no longer referenced. It will also cache the properties of the underlying device, so read access to them should be fast.
See HANDLE
Open a handle to a SPIDEV device.
See WITH-OPEN-SPI
Read a sequence of words from the SPIDEV device.
The bytes vector should be able to contain unsigned-bytes of
size up to the number of BITS/WORD of the handle.
See HANDLE
See READ*
Read n words from the SPIDEV device into a fresh array.
See READ
Reads a byte sequence from the SPIDEV device handle.
See LSB-FIRST
See BITS/WORD
Perform a SPI transmission of the given byte sequence.
The array must be an unsigned-byte 8 array.
The speed-hz, delay-usecs, and bits/word parameters are temp
overrides for the device configuration during the transmission.
They default to MAX-SPEED, 0, and BITS/WORD respectively.
Returned is a fresh vector of the same length as the bytes
vector, containing the contents of the read buffer of the
transmission.
See HANDLE
See MAX-SPEED
See BITS/WORD
Perform a SPI transmission of the given byte sequence.
The array must be an unsigned-byte 8 array that is sharable.
On most implementations that matter this will correspond to
any simple-vector with element-type unsigned-byte 8.
The speed-hz, delay-usecs, and bits/word parameters are temp overrides for the device configuration during the transmission.
Returned is a fresh vector of the same length as the bytes
vector, containing the contents of the read buffer of the
transmission.
See CFFI:MAKE-SHAREABLE-BYTE-VECTOR
Write a sequence of words to the SPIDEV device.
The bytes vector should contain unsigned-bytes of size up to
the number of BITS/WORD of the handle.
The bytes written are automatically flushed to the spi device
handle, so that when WRITE returns, the operation should have
completed. If you need to manually control flushing or need
to write in much smaller intervals, please refer to the low-
level interface.
See HANDLE
See WRITE*
Writes the bytes in the arguments list to the SPIDEV device.
See WRITE
Writes the byte sequence to the SPIDEV device handle.
See LSB-FIRST
See BITS/WORD
Struct to wrap a handle to a SPIDEV device and all of its associated information.
See OPEN
See CLOSE
See HANDLE
See MODE
See LSB-FIRST
See BITS/WORD
See MAX-SPEED
See READ
See READ*
See WRITE
See WRITE*
structure-object
.
common-lisp
.
stream
(make-broadcast-stream)
This slot is read-only.
keyword
:unknown
boolean
(unsigned-byte 8)
0
(unsigned-byte 32)
0
Constant holding the value defined in the kernel constant SPI_CPHA.
Returns the full file name of the path.
mode
.
Accessor to perform an IOCTL command, which can either get or set an int value.
Use SETF to set a value.
Signals an error if the command failed.
This is available on the following implementations:
* SBCL
* CCL
Return an absolute path to the requested SPIDEV device.
See *SPIDEV-ROOT*
Temporary override of the device’s wordsize.
See XFER
True to deselect device before starting the next transfer.
See XFER
If nonzero, how long to delay after the last bit transfer before optionally deselecting the device before the next transfer.
See XFER
Length of tx and rx buffers, in bytes.
See XFER
Unknown purpose, has to be set to zero.
See XFER
Holds pointer to userspace buffer for receive data, or null.
See XFER
Unknown purpose, has to be set to zero.
See XFER
Temporary override of the device’s bitrate.
See XFER
Holds pointer to userspace buffer with transmit data, or null.
See XFER
Unknown purpose, has to be set to zero.
See XFER
Struct holding data for a transmission over the SPI.
See XFER-TX-BUF
See XFER-RX-BUF
See XFER-LEN
See XFER-SPEED-HZ
See XFER-DELAY-USECS
See XFER-BITS/WORD
See XFER-CS-CHANGE
See XFER-TX-NBITS
See XFER-RX-NBITS
See XFER-PAD
foreign-struct-type
.
translatable-foreign-type
.
Jump to: | %
(
B C D F H I L M O R S T W X |
---|
Jump to: | %
(
B C D F H I L M O R S T W X |
---|
Jump to: | *
B C L M S |
---|
Jump to: | *
B C L M S |
---|
Jump to: | C D F H I L P S W X |
---|
Jump to: | C D F H I L P S W X |
---|