cl spidev
1.1.0A library for the Linux SPIDEV kernel module as used on hobby kits such as the Raspberry Pi
Table of Contents
System Information
Definition Index
-
CL-SPIDEV
- ORG.SHIRAKUMO.SPIDEV
- SPIDEV
No documentation provided.-
EXTERNAL STRUCTURE HANDLE
-
EXTERNAL FUNCTION BITS/WORD
- INSTANCE
Accessor to how many bits there are in a word on the device. Should be an (UNSIGNED-BYTE 8) value. See HANDLE
-
EXTERNAL FUNCTION (SETF BITS/WORD)
- VALUE
- HANDLE
No documentation provided. -
EXTERNAL FUNCTION CLOSE
- HANDLE
Safely closes the SPIDEV device. It becomes unusable after this. See HANDLE
-
EXTERNAL FUNCTION DEVICES
Return a list of available SPIDEV devices on the system.
-
EXTERNAL FUNCTION HANDLE
- INSTANCE
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
-
EXTERNAL FUNCTION LSB-FIRST
- INSTANCE
Accessor to whether the least significant byte comes first. Should be a boolean. See HANDLE
-
EXTERNAL FUNCTION (SETF LSB-FIRST)
- VALUE
- HANDLE
No documentation provided. -
EXTERNAL FUNCTION MAX-SPEED
- INSTANCE
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
-
EXTERNAL FUNCTION (SETF MAX-SPEED)
- VALUE
- HANDLE
No documentation provided. -
EXTERNAL FUNCTION MODE
- INSTANCE
Accessor to the SPIDEV device's transfer mode. The value should be one of :MODE-0 :MODE-1 :MODE-2 :MODE-3 See HANDLE
-
EXTERNAL FUNCTION (SETF MODE)
- VALUE
- HANDLE
No documentation provided. -
EXTERNAL FUNCTION OPEN
- ID
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
-
EXTERNAL FUNCTION READ
- BYTES
- HANDLE
- &KEY
- START
- END
-
EXTERNAL FUNCTION READ*
- N
- HANDLE
Read n words from the SPIDEV device into a fresh array. See READ
-
EXTERNAL FUNCTION TRANSMIT
- HANDLE
- BYTES
- &KEY
- SPEED
- DELAY
- 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
-
EXTERNAL FUNCTION WRITE
- BYTES
- HANDLE
- &KEY
- START
- END
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*
-
EXTERNAL FUNCTION WRITE*
- HANDLE
- &REST
- BYTES
Writes the bytes in the arguments list to the SPIDEV device. See WRITE
-
CL-SPIDEV-LLI
- ORG.SHIRAKUMO.SPIDEV.LLI
No documentation provided.-
EXTERNAL CONSTANT SPI-3WIRE
Constant holding the value defined in the kernel constant SPI_3WIRE.
-
EXTERNAL CONSTANT SPI-CPOL
Constant holding the value defined in the kernel constant SPI_CPOL.
-
EXTERNAL CONSTANT SPI-CS-HIGH
Constant holding the value defined in the kernel constant SPI_CS_HIGH.
-
EXTERNAL CONSTANT SPI-IOC-MESSAGE-1
Constant holding the value defined in the kernel constant SPI_IOC_MESSAGE(1).
-
EXTERNAL CONSTANT SPI-IOC-RD-BITS-PER-WORD
Constant holding the value defined in the kernel constant SPI_IOC_RD_BITS_PER_WORD.
-
EXTERNAL CONSTANT SPI-IOC-RD-LSB-FIRST
Constant holding the value defined in the kernel constant SPI_IOC_RD_LSB_FIRST.
-
EXTERNAL CONSTANT SPI-IOC-RD-MAX-SPEED-HZ
Constant holding the value defined in the kernel constant SPI_IOC_RD_MAX_SPEED_HZ.
-
EXTERNAL CONSTANT SPI-IOC-RD-MODE
Constant holding the value defined in the kernel constant SPI_IOC_RD_MODE.
-
EXTERNAL CONSTANT SPI-IOC-RD-MODE32
Constant holding the value defined in the kernel constant SPI_IOC_RD_MODE32.
-
EXTERNAL CONSTANT SPI-IOC-WR-BITS-PER-WORD
Constant holding the value defined in the kernel constant SPI_IOC_WR_BITS_PER_WORD.
-
EXTERNAL CONSTANT SPI-IOC-WR-LSB-FIRST
Constant holding the value defined in the kernel constant SPI_IOC_WR_LSB_FIRST.
-
EXTERNAL CONSTANT SPI-IOC-WR-MAX-SPEED-HZ
Constant holding the value defined in the kernel constant SPI_IOC_WR_MAX_SPEED_HZ.
-
EXTERNAL CONSTANT SPI-IOC-WR-MODE
Constant holding the value defined in the kernel constant SPI_IOC_WR_MODE.
-
EXTERNAL CONSTANT SPI-IOC-WR-MODE32
Constant holding the value defined in the kernel constant SPI_IOC_WR_MODE32.
-
EXTERNAL CONSTANT SPI-LOOP
Constant holding the value defined in the kernel constant SPI_LOOP.
-
EXTERNAL CONSTANT SPI-LSB-FIRST
Constant holding the value defined in the kernel constant SPI_LSB_FIRST.
-
EXTERNAL CONSTANT SPI-MODE-0
Constant holding the value defined in the kernel constant SPI_MODE_0.
-
EXTERNAL CONSTANT SPI-MODE-1
Constant holding the value defined in the kernel constant SPI_MODE_1.
-
EXTERNAL CONSTANT SPI-MODE-2
Constant holding the value defined in the kernel constant SPI_MODE_2.
-
EXTERNAL CONSTANT SPI-MODE-3
Constant holding the value defined in the kernel constant SPI_MODE_3.
-
EXTERNAL CONSTANT SPI-NO-CS
Constant holding the value defined in the kernel constant SPI_NO_CS.
-
EXTERNAL CONSTANT SPI-READY
Constant holding the value defined in the kernel constant SPI_READY.
-
EXTERNAL CONSTANT SPI-RX-DUAL
Constant holding the value defined in the kernel constant SPI_RX_DUAL.
-
EXTERNAL CONSTANT SPI-RX-QUAD
Constant holding the value defined in the kernel constant SPI_RX_QUAD.
-
EXTERNAL CONSTANT SPI-TX-DUAL
Constant holding the value defined in the kernel constant SPI_TX_DUAL.
-
EXTERNAL CONSTANT SPI-TX-QUAD
Constant holding the value defined in the kernel constant SPI_TX_QUAD.
-
EXTERNAL SPECIAL-VARIABLE *SPIDEV-ROOT*
The root path for SPIDEV devices. Should be /dev/
-
EXTERNAL FUNCTION BITS/WORD
- 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
-
EXTERNAL FUNCTION (SETF BITS/WORD)
- BITS
- HANDLE
No documentation provided. -
EXTERNAL FUNCTION CLOSE-SPI
- HANDLE
Close a handle to a SPIDEV device. See WITH-OPEN-SPI
-
EXTERNAL FUNCTION DEVICES
Return a list of available SPIDEV devices on the system.
-
EXTERNAL FUNCTION LSB-FIRST
- 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
-
EXTERNAL FUNCTION (SETF LSB-FIRST)
- VALUE
- HANDLE
No documentation provided. -
EXTERNAL FUNCTION MAX-SPEED
- 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
-
EXTERNAL FUNCTION (SETF MAX-SPEED)
- VALUE
- HANDLE
No documentation provided. -
EXTERNAL FUNCTION MODE
- 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
-
EXTERNAL FUNCTION (SETF MODE)
- MODE
- HANDLE
No documentation provided. -
EXTERNAL FUNCTION OPEN-SPI
- ID
- &KEY
- DIRECTION
Open a handle to a SPIDEV device. See WITH-OPEN-SPI
-
EXTERNAL FUNCTION READ-BYTES
- BYTES
- HANDLE
- &KEY
- START
- END
-
EXTERNAL FUNCTION TRANSMIT
- HANDLE
- BYTES
- SPEED-HZ
- DELAY-USECS
- 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
-
EXTERNAL FUNCTION WRITE-BYTES
- BYTES
- HANDLE
- &KEY
- START
- END
-
EXTERNAL MACRO WITH-OPEN-SPI
- HANDLE
- ID
- &KEY
- DIRECTION
- &BODY
- BODY