cl gpio
1.1.0A library for the Linux GPIO kernel module as used on hobby kits such as the Raspberry Pi
Table of Contents
System Information
Definition Index
-
CL-GPIO-LLI
- ORG.SHIRAKUMO.GPIO.LLI
No documentation provided.-
EXTERNAL SPECIAL-VARIABLE *GPIO-ROOT*
The root directory of the GPIO system devices. Should be /sys/class/gpio/
-
EXTERNAL FUNCTION ACTIVE-LOW
- PIN
Accessor to whether the GPIO pin has an active low. The value should be either NIL or T.
-
EXTERNAL FUNCTION (SETF ACTIVE-LOW)
- VALUE
- PIN
No documentation provided. -
EXTERNAL FUNCTION AVAILABLE-PINS
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.
-
EXTERNAL FUNCTION BASE
- CHIP
Return the GPIO chip's base pin number.
-
EXTERNAL FUNCTION CHIP-FILE
- CHIP
- SUB
Returns a file for the specified GPIO chip. See GPIO-FILE
-
EXTERNAL FUNCTION CHIP-PINS
- CHIP
Return a list of GPIO pin numbers on the chip.
-
EXTERNAL FUNCTION CHIPS
Returns a list of known GPIO chips.
-
EXTERNAL FUNCTION DIRECTION
- PIN
Accessor to the GPIO pin's direction. The value should be either :IN or :OUT.
-
EXTERNAL FUNCTION (SETF DIRECTION)
- VALUE
- PIN
No documentation provided. -
EXTERNAL FUNCTION EDGE
- PIN
Accessor to the GPIO pin's interrupt edge. The value should be one of :NONE :RISING :FALLING :BOTH
-
EXTERNAL FUNCTION (SETF EDGE)
- VALUE
- PIN
No documentation provided. -
EXTERNAL FUNCTION EXPORT-PIN
- &REST
- PINS
Export the specified pins so that they may be accessed from userspace.
-
EXTERNAL FUNCTION EXPORTED-PINS
Returns a list of GPIO pins that are accessible.
-
EXTERNAL FUNCTION GPIO-FILE
- SUB
Returns an absolute path to the requested gpio file. See *GPIO-ROOT*
-
EXTERNAL FUNCTION LABEL
- CHIP
Return the GPIO chip's label.
-
EXTERNAL FUNCTION NGPIO
- CHIP
Return the number of GPIO pins on the chip.
-
EXTERNAL FUNCTION PIN-FILE
- PIN
- SUB
Returns a file for the specified GPIO pin. See GPIO-FILE
-
EXTERNAL FUNCTION UNEXPORT-PIN
- &REST
- PINS
Unexport the specified pins so that they can no longer be accessed from userspace.
-
EXTERNAL FUNCTION VALUE
- PIN
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.
-
EXTERNAL FUNCTION (SETF VALUE)
- VALUE
- PIN
No documentation provided.
-
CL-GPIO
- ORG.SHIRAKUMO.GPIO
- GPIO
No documentation provided.-
EXTERNAL STRUCTURE PIN
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
-
EXTERNAL FUNCTION ACTIVE-LOW
- PIN
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
-
EXTERNAL FUNCTION (SETF ACTIVE-LOW)
- ACTIVE-LOW
- PIN
No documentation provided. -
EXTERNAL FUNCTION ALL-PINS
Returns a list of PIN instances for all pins on the system. See CL-GPIO-LLI:AVAILABLE-PINS See ENSURE-PIN
-
EXTERNAL FUNCTION AWAIT-VALUE
- PIN
- &OPTIONAL
- TIMEOUT
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
-
EXTERNAL FUNCTION CALL-WITH-PIN-HANDLER
- FUNCTION
- HANDLER
- PIN
- &OPTIONAL
- EDGE
- ACTIVE-LOW
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
-
EXTERNAL FUNCTION CHIP
- PIN
Returns the pin's chip device name. See PIN-CHIP
-
EXTERNAL FUNCTION DIRECTION
- PIN
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
-
EXTERNAL FUNCTION (SETF DIRECTION)
- DIRECTION
- PIN
No documentation provided. -
EXTERNAL FUNCTION EDGE
- PIN
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
-
EXTERNAL FUNCTION (SETF EDGE)
- EDGE
- PIN
No documentation provided. -
EXTERNAL FUNCTION ENSURE-PIN
- PIN
- &OPTIONAL
- REFRESH
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
-
EXTERNAL FUNCTION EXPORT
- &REST
- PINS
Export the specified pins and return a list of according PIN instances. See ENSURE-PIN See CL-GPIO-LLI:EXPORT-PIN
-
EXTERNAL FUNCTION NAME
- PIN
Returns the pin's name or ID. See PIN-NAME
-
EXTERNAL FUNCTION PINS
Returns a list of available/exported PIN instances. See CL-GPIO-LLI:EXPORTED-PINS See ENSURE-PIN
-
EXTERNAL FUNCTION UNEXPORT
- &REST
- PINS
Unexport the specified pins and invalidate their cache. See *PIN-CACHE* See CL-GPIO-LLI:UNEXPORT-PIN
-
EXTERNAL FUNCTION VALUE
- PIN
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
-
EXTERNAL FUNCTION (SETF VALUE)
- VALUE
- PIN
No documentation provided. -
EXTERNAL MACRO WITH-PIN-HANDLER
- HANDLER
- PIN
- &OPTIONAL
- EDGE
- ACTIVE-LOW
- &BODY
- BODY
Shorthand to call a handler function on PIN value change during the evaluation of BODY. See CALL-WITH-PIN-HANDLER