[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.12 ^$ZRPI

The ^$ZRPI structured system variable provides easy access to general-purpose input/output (GPIO) pins on Raspberry Pi single-board computers.

To initialize the GPIO subsystem, SET ^$ZRPI("INITIALIZE")=1.

Individual pins are accessed through ^$ZRPI("GPIO",<pin>,...), where <pin> represents the desired pin number. Descendant subscripts of ^$ZRPI("GPIO",<pin>) are as follows:

MODE +R +U -D

Represents the operating mode of the selected pin. One of INPUT, OUTPUT, PWM_OUTPUT, or GPIO_CLOCK.

DIGITAL +R +U -D

Reads or writes the selected pin digitally. The value is limited to 1 or 0.

ANALOG +R +U -D

Reads or writes the selected pin in an analog fashion. The value represents analog voltage.


This document was generated on September 20, 2023 using texi2html 5.0.