This is the cl-gpio Reference Manual, version 1.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 08 17:01:52 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
cl-gpio
A library for the Linux GPIO 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-gpio.git)
zlib
1.1.0
documentation-utils
(system).
cffi
(system).
package.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-gpio/cl-gpio.asd
cl-gpio/package.lisp
cl-gpio/low-level.lisp
cl-gpio/wrapper.lisp
cl-gpio/documentation.lisp
cl-gpio/low-level.lisp
package.lisp
(file).
cl-gpio
(system).
*gpio-root*
(special variable).
active-low
(function).
(setf active-low)
(function).
available-pins
(function).
base
(function).
chip-file
(function).
chip-pins
(function).
chips
(function).
direction
(function).
(setf direction)
(function).
edge
(function).
(setf edge)
(function).
export-pin
(function).
exported-pins
(function).
gpio-file
(function).
label
(function).
ngpio
(function).
pin-file
(function).
unexport-pin
(function).
value
(function).
(setf value)
(function).
%write-to-file
(function).
cclose
(function).
copen
(function).
cread
(function).
cwrite
(function).
define-pin-accessor
(macro).
directory-name
(function).
getc
(function).
read-byte-from-file
(function).
read-from-file
(function).
write-to-file
(compiler macro).
write-to-file
(function).
cl-gpio/wrapper.lisp
low-level.lisp
(file).
cl-gpio
(system).
active-low
(function).
(setf active-low)
(function).
all-pins
(function).
await-value
(function).
call-with-pin-handler
(function).
chip
(function).
direction
(function).
(setf direction)
(function).
edge
(function).
(setf edge)
(function).
ensure-pin
(function).
export
(function).
name
(function).
pin
(structure).
pins
(function).
print-object
(method).
unexport
(function).
value
(compiler macro).
(setf value)
(compiler macro).
value
(function).
(setf value)
(function).
with-pin-handler
(macro).
%make-pin
(function).
*pin-cache*
(special variable).
copy-pin
(function).
make-pin
(function).
pin-active-low
(reader).
(setf pin-active-low)
(writer).
pin-chip
(reader).
pin-direction
(reader).
(setf pin-direction)
(writer).
pin-edge
(reader).
(setf pin-edge)
(writer).
pin-name
(reader).
pin-p
(function).
pin-value
(function).
(setf pin-value)
(function).
cl-gpio/documentation.lisp
wrapper.lisp
(file).
cl-gpio
(system).
Packages are listed by definition order.
cl-gpio
org.shirakumo.gpio
gpio
common-lisp
.
active-low
(function).
(setf active-low)
(function).
all-pins
(function).
await-value
(function).
call-with-pin-handler
(function).
chip
(function).
direction
(function).
(setf direction)
(function).
edge
(function).
(setf edge)
(function).
ensure-pin
(function).
export
(function).
name
(function).
pin
(structure).
pins
(function).
unexport
(function).
value
(compiler macro).
(setf value)
(compiler macro).
value
(function).
(setf value)
(function).
with-pin-handler
(macro).
%make-pin
(function).
*pin-cache*
(special variable).
copy-pin
(function).
make-pin
(function).
pin-active-low
(reader).
(setf pin-active-low)
(writer).
pin-chip
(reader).
pin-direction
(reader).
(setf pin-direction)
(writer).
pin-edge
(reader).
(setf pin-edge)
(writer).
pin-name
(reader).
pin-p
(function).
pin-value
(function).
(setf pin-value)
(function).
cl-gpio-lli
org.shirakumo.gpio.lli
common-lisp
.
*gpio-root*
(special variable).
active-low
(function).
(setf active-low)
(function).
available-pins
(function).
base
(function).
chip-file
(function).
chip-pins
(function).
chips
(function).
direction
(function).
(setf direction)
(function).
edge
(function).
(setf edge)
(function).
export-pin
(function).
exported-pins
(function).
gpio-file
(function).
label
(function).
ngpio
(function).
pin-file
(function).
unexport-pin
(function).
value
(function).
(setf value)
(function).
%write-to-file
(function).
cclose
(function).
copen
(function).
cread
(function).
cwrite
(function).
define-pin-accessor
(macro).
directory-name
(function).
getc
(function).
read-byte-from-file
(function).
read-from-file
(function).
write-to-file
(compiler macro).
write-to-file
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
The root directory of the GPIO system devices. Should be /sys/class/gpio/
Shorthand to call a handler function on PIN value change during the evaluation of BODY.
See CALL-WITH-PIN-HANDLER
Accesses the pin’s I/O active-low.
If the pin does not yet exist or is not exported, it will be. The system GPIO’s value is not adjusted if the cached value is already the same as the value attempted to be set with this.
See ENSURE-PIN
See CL-GPIO-LLI:ACTIVE-LOW
See PIN-ACTIVE-LOW
Accessor to whether the GPIO pin has an active low.
The value should be either NIL or T.
Returns a list of PIN instances for all pins on the system.
See CL-GPIO-LLI:AVAILABLE-PINS
See ENSURE-PIN
Return a list of all available GPIO pins on the system.
Note that the pins are not necessarily accessible; they may need to be exported first.
Wait until the pin has a value that we can read.
If TIMEOUT is specified and reached before a value becomes accessible, NIL is returned. Otherwise, true is returned.
This function is available on the following implementations:
* SBCL
See ENSURE-PIN
Return the GPIO chip’s base pin number.
Make the HANDLER function be called if the PIN changes value during the evaluation of FUNCTION.
The HANDLER is called with the corresponding PIN instance
and the new value as arguments.
This function is available on the following implementations:
* SBCL
See ENSURE-PIN
See EDGE
See ACTIVE-LOW
Returns the pin’s chip device name.
See PIN-CHIP
Returns a file for the specified GPIO chip.
See GPIO-FILE
Return a list of GPIO pin numbers on the chip.
Returns a list of known GPIO chips.
Accesses the pin’s I/O direction.
If the pin does not yet exist or is not exported, it will be. The system GPIO’s value is not adjusted if the cached value is already the same as the value attempted to be set with this.
See ENSURE-PIN
See CL-GPIO-LLI:DIRECTION
See PIN-DIRECTION
Accessor to the GPIO pin’s direction.
The value should be either :IN or :OUT.
Accesses the pin’s I/O edge.
If the pin does not yet exist or is not exported, it will be. The system GPIO’s value is not adjusted if the cached value is already the same as the value attempted to be set with this.
See ENSURE-PIN
See CL-GPIO-LLI:EDGE
See PIN-EDGE
Accessor to the GPIO pin’s interrupt edge.
The value should be one of :NONE :RISING :FALLING :BOTH
Ensure to get a PIN instance in return.
Accepts either a pin’s name/id number or a pin instance. If REFRESH is true, a fresh PIN instance is returned that has its values taken from the system’s GPIO values.
See *PIN-CACHE*
See MAKE-PIN
See PIN
Export the specified pins and return a list of according PIN instances.
See ENSURE-PIN
See CL-GPIO-LLI:EXPORT-PIN
Export the specified pins so that they may be accessed from userspace.
Returns a list of GPIO pins that are accessible.
Returns an absolute path to the requested gpio file.
See *GPIO-ROOT*
Return the GPIO chip’s label.
Returns the pin’s name or ID.
See PIN-NAME
Return the number of GPIO pins on the chip.
Returns a file for the specified GPIO pin.
See GPIO-FILE
Returns a list of available/exported PIN instances.
See CL-GPIO-LLI:EXPORTED-PINS
See ENSURE-PIN
Unexport the specified pins and invalidate their cache.
See *PIN-CACHE*
See CL-GPIO-LLI:UNEXPORT-PIN
Unexport the specified pins so that they can no longer be accessed from userspace.
Accesses the pin’s I/O value.
If the pin does not yet exist or is not exported, it will be.
The pin’s I/O direction is automatically adjusted if necessary
depending on whether the value is read or set by setf.
The value returned by this is never cached.
See ENSURE-PIN
See CL-GPIO-LLI:VALUE
Accessor to the GPIO pin’s value.
When reading, the pin’s direction should be :IN When setting, the pin’s direction should be :OUT
The value should be either NIL or T.
Representative type to encapsulate a GPIO pin.
This will cache current pin properties. Note that it will
not be updated automatically should changes to the pin
occur from elsewhere in the system. Only updates done
through this high-level interface will be tracked.
See MAKE-PIN
See ENSURE-PIN
See NAME
See CHIP
See DIRECTION
See EDGE
See ACTIVE-LOW
See VALUE
Hash table to store cached PIN instances.
See PIN
See ENSURE-PIN
Wrapper to define an accessor function for a GPIO pin property.
Direct constructor to make a PIN instance.
See PIN
See MAKE-PIN
Returns the name of the topmost directory, if any.
Construct a new PIN instance.
If the pin has not been exported yet, it will be. If the pin does not exist, an error is signalled. The GPIO pin’s current properties are read out and stored into the respective slots of the pin instance.
See CL-GPIO-LLI:LABEL
See CL-GPIO-LLI:DIRECTION
See CL-GPIO-LLI:EDGE
See CL-GPIO-LLI:ACTIVE-LOW
Direct accessor to the pin’s active-low.
Value must be a boolean.
See PIN
See ACTIVE-LOW
Direct reader for the pin’s chip (or its label).
Value must be a string.
See PIN
See CHIP
chip
.
Direct accessor to the pin’s I/O direction.
Value must be one of :IN :OUT
See PIN
See DIRECTION
Direct accessor to the pin’s edge.
Value must be one of :NONE :RISING :FALLING :BOTH
See PIN
See EDGE
edge
.
Direct reader for the pin’s ID or name.
Value must be an integer.
See PIN
See NAME
name
.
Read the file into a string, trimmed from whitespace.
Write the sequence to the specified file.
Jump to: | %
(
A B C D E F G L M N P R U V W |
---|
Jump to: | %
(
A B C D E F G L M N P R U V W |
---|
Jump to: | *
A C D E N S |
---|
Jump to: | *
A C D E N S |
---|
Jump to: | C D F L P S W |
---|
Jump to: | C D F L P S W |
---|