.br
.br
-If the library is not initialised all but the \fBgpioCfg*\fP, \fBgpioVersion\fP,
-and \fBgpioHardwareRevision\fP functions will return PI_NOT_INITIALISED.
+\fBgpioInitialise\fP must be called before all other library functions
+with the following exceptions:
.br
.br
-If the library is initialised the \fBgpioCfg*\fP functions will
-return PI_INITIALISED.
+
+.EX
+\fBgpioCfg*\fP
+.br
+\fBgpioVersion\fP
+.br
+\fBgpioHardwareRevision\fP
+.br
+
+.EE
+
+.br
+
+.br
+If the library is not initialised all but the \fBgpioCfg*\fP,
+\fBgpioVersion\fP, and \fBgpioHardwareRevision\fP functions will
+return error PI_NOT_INITIALISED.
+
+.br
+
+.br
+If the library is initialised the \fBgpioCfg*\fP functions will return
+error PI_INITIALISED.
.br
.br
.br
-Call before using the other library functions.
+Returns the pigpio version number if OK, otherwise PI_INIT_FAILED.
.br
.br
-Returns the pigpio version number if OK, otherwise PI_INIT_FAILED.
+gpioInitialise must be called before using the other library functions
+with the following exceptions:
+
+.br
.br
+.EX
+\fBgpioCfg*\fP
+.br
+\fBgpioVersion\fP
+.br
+\fBgpioHardwareRevision\fP
.br
-The only exception is the optional \fBgpioCfg*\fP functions, see later.
+
+.EE
.br
.br
+.br
+This function is only effective if called before \fBgpioInitialise\fP.
+
+.br
+
.br
.EX
.br
+.br
+This function is only effective if called before \fBgpioInitialise\fP.
+
+.br
+
.br
.EX
.br
+.br
+This function is only effective if called before \fBgpioInitialise\fP.
+
+.br
+
.br
.EX
.br
+.br
+This function is only effective if called before \fBgpioInitialise\fP.
+
+.br
+
.br
.EX
.br
+.br
+This function is only effective if called before \fBgpioInitialise\fP.
+
+.br
+
.br
.EX
.br
+.br
+This function is only effective if called before \fBgpioInitialise\fP.
+
+.br
+
.br
.EX
.br
+.br
+This function is only effective if called before \fBgpioInitialise\fP.
+
+.br
+
.br
.EX
.br
+.br
+This function is only effective if called before \fBgpioInitialise\fP.
+
+.br
+
.br
.EX
.br
.br
-One of
+These functions are only effective if called before \fBgpioInitialise\fP.
.br
.br
\fBgpioCfgInterfaces\fP
.br
-\fBgpioCfgInternals\fP
-.br
\fBgpioCfgSocketPort\fP
.br
\fBgpioCfgMemAlloc\fP
#include <stdint.h>
#include <pthread.h>
-#define PIGPIO_VERSION 50
+#define PIGPIO_VERSION 51
/*TEXT
All the functions which return an int return < 0 on error.
-If the library is not initialised all but the [*gpioCfg**], [*gpioVersion*],
-and [*gpioHardwareRevision*] functions will return PI_NOT_INITIALISED.
+[*gpioInitialise*] must be called before all other library functions
+with the following exceptions:
-If the library is initialised the [*gpioCfg**] functions will
-return PI_INITIALISED.
+. .
+[*gpioCfg**]
+[*gpioVersion*]
+[*gpioHardwareRevision*]
+. .
+
+If the library is not initialised all but the [*gpioCfg**],
+[*gpioVersion*], and [*gpioHardwareRevision*] functions will
+return error PI_NOT_INITIALISED.
+
+If the library is initialised the [*gpioCfg**] functions will return
+error PI_INITIALISED.
TEXT*/
gpioCfgMemAlloc Configure DMA memory allocation mode
gpioCfgInternals Configure miscellaneous internals (DEPRECATED)
-
gpioCfgGetInternals Get internal configuration settings
gpioCfgSetInternals Set internal configuration settings
/*D
Initialises the library.
-Call before using the other library functions.
-
Returns the pigpio version number if OK, otherwise PI_INIT_FAILED.
-The only exception is the optional [*gpioCfg**] functions, see later.
+gpioInitialise must be called before using the other library functions
+with the following exceptions:
+
+. .
+[*gpioCfg**]
+[*gpioVersion*]
+[*gpioHardwareRevision*]
+. .
...
if (gpioInitialise() < 0)
/*D
Configures pigpio to buffer cfgMillis milliseconds of GPIO samples.
+This function is only effective if called before [*gpioInitialise*].
+
. .
cfgMillis: 100-10000
. .
Configures pigpio to use a particular sample rate timed by a specified
peripheral.
+This function is only effective if called before [*gpioInitialise*].
+
. .
cfgMicros: 1, 2, 4, 5, 8, 10
cfgPeripheral: 0 (PWM), 1 (PCM)
/*D
Configures pigpio to use the specified DMA channel.
+This function is only effective if called before [*gpioInitialise*].
+
. .
DMAchannel: 0-14
. .
/*D
Configures pigpio to use the specified DMA channels.
+This function is only effective if called before [*gpioInitialise*].
+
. .
primaryChannel: 0-14
secondaryChannel: 0-14
Configures pigpio to only allow updates (writes or mode changes) for the
GPIO specified by the mask.
+This function is only effective if called before [*gpioInitialise*].
+
. .
updateMask: bit (1<<n) is set for each GPIO n which may be updated
. .
/*D
Configures pigpio to use the specified socket port.
+This function is only effective if called before [*gpioInitialise*].
+
. .
port: 1024-32000
. .
/*D
Configures pigpio support of the fifo and socket interfaces.
+This function is only effective if called before [*gpioInitialise*].
+
. .
ifFlags: 0-7
. .
/*D
Selects the method of DMA memory allocation.
+This function is only effective if called before [*gpioInitialise*].
+
. .
memAllocMode: 0-2
. .
gpioCfg*::
-One of
+These functions are only effective if called before [*gpioInitialise*].
[*gpioCfgBufferSize*]
[*gpioCfgClock*]
[*gpioCfgDMAchannels*]
[*gpioCfgPermissions*]
[*gpioCfgInterfaces*]
-[*gpioCfgInternals*]
[*gpioCfgSocketPort*]
[*gpioCfgMemAlloc*]