mirror of https://github.com/joan2937/pigpio
Docs plus reverse PR #164 flag meaning
This commit is contained in:
parent
6c86386253
commit
d5f32d3301
|
@ -2,7 +2,7 @@
|
|||
." Process this file with
|
||||
." groff -man -Tascii pig2vcd.1
|
||||
."
|
||||
.TH pig2vcd 1 2012-2017 Linux "pigpio archive"
|
||||
.TH pig2vcd 1 2012-2018 Linux "pigpio archive"
|
||||
.SH NAME
|
||||
pig2vd - A utility to convert pigpio notifications to VCD.
|
||||
|
||||
|
@ -243,4 +243,4 @@ The state lines contain the new state followed by the gpio identifier.
|
|||
pigpiod(1), pigs(1), pigpio(3), pigpiod_if(3), pigpiod_if2(3)
|
||||
.SH AUTHOR
|
||||
|
||||
joan@abyz.co.uk
|
||||
joan@abyz.me.uk
|
||||
|
|
75
pigpio.3
75
pigpio.3
|
@ -2,7 +2,7 @@
|
|||
." Process this file with
|
||||
." groff -man -Tascii pigpio.3
|
||||
."
|
||||
.TH pigpio 3 2012-2017 Linux "pigpio archive"
|
||||
.TH pigpio 3 2012-2018 Linux "pigpio archive"
|
||||
.SH NAME
|
||||
pigpio - A C library to manipulate the Pi's GPIO.
|
||||
|
||||
|
@ -330,6 +330,11 @@ gpioSetMode(22,PI_ALT0); // Set GPIO22 to alternative mode 0.
|
|||
|
||||
.EE
|
||||
|
||||
.br
|
||||
|
||||
.br
|
||||
See \fBhttp://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2835/BCM2835-ARM-Peripherals.pdf\fP page 102 for an overview of the modes.
|
||||
|
||||
.IP "\fBint gpioGetMode(unsigned gpio)\fP"
|
||||
.IP "" 4
|
||||
Gets the GPIO mode.
|
||||
|
@ -1299,6 +1304,36 @@ interrupt timeout expires.
|
|||
|
||||
.br
|
||||
|
||||
.br
|
||||
|
||||
.EX
|
||||
Parameter Value Meaning
|
||||
.br
|
||||
|
||||
.br
|
||||
GPIO 0-53 The GPIO which has changed state
|
||||
.br
|
||||
|
||||
.br
|
||||
level 0-2 0 = change to low (a falling edge)
|
||||
.br
|
||||
1 = change to high (a rising edge)
|
||||
.br
|
||||
2 = no level change (interrupt timeout)
|
||||
.br
|
||||
|
||||
.br
|
||||
tick 32 bit The number of microseconds since boot
|
||||
.br
|
||||
WARNING: this wraps around from
|
||||
.br
|
||||
4294967295 to 0 roughly every 72 minutes
|
||||
.br
|
||||
|
||||
.EE
|
||||
|
||||
.br
|
||||
|
||||
.br
|
||||
The underlying Linux sysfs GPIO interface is used to provide
|
||||
the interrupt services.
|
||||
|
@ -1378,6 +1413,40 @@ current tick, and the userdata pointer.
|
|||
|
||||
.br
|
||||
|
||||
.br
|
||||
|
||||
.EX
|
||||
Parameter Value Meaning
|
||||
.br
|
||||
|
||||
.br
|
||||
GPIO 0-53 The GPIO which has changed state
|
||||
.br
|
||||
|
||||
.br
|
||||
level 0-2 0 = change to low (a falling edge)
|
||||
.br
|
||||
1 = change to high (a rising edge)
|
||||
.br
|
||||
2 = no level change (interrupt timeout)
|
||||
.br
|
||||
|
||||
.br
|
||||
tick 32 bit The number of microseconds since boot
|
||||
.br
|
||||
WARNING: this wraps around from
|
||||
.br
|
||||
4294967295 to 0 roughly every 72 minutes
|
||||
.br
|
||||
|
||||
.br
|
||||
userdata pointer Pointer to an arbitrary object
|
||||
.br
|
||||
|
||||
.EE
|
||||
|
||||
.br
|
||||
|
||||
.br
|
||||
Only one of \fBgpioSetISRFunc\fP or \fBgpioSetISRFuncEx\fP can be
|
||||
registered per GPIO.
|
||||
|
@ -5050,7 +5119,7 @@ This function stores a null terminated script for later execution.
|
|||
.br
|
||||
|
||||
.br
|
||||
See \fBhttp://abyz.co.uk/rpi/pigpio/pigs.html#Scripts\fP for details.
|
||||
See \fBhttp://abyz.me.uk/rpi/pigpio/pigs.html#Scripts\fP for details.
|
||||
|
||||
.br
|
||||
|
||||
|
@ -10222,4 +10291,4 @@ A 16-bit word value.
|
|||
pigpiod(1), pig2vcd(1), pigs(1), pigpiod_if(3), pigpiod_if2(3)
|
||||
.SH AUTHOR
|
||||
|
||||
joan@abyz.co.uk
|
||||
joan@abyz.me.uk
|
||||
|
|
12
pigpio.c
12
pigpio.c
|
@ -25,7 +25,7 @@ OTHER DEALINGS IN THE SOFTWARE.
|
|||
For more information, please refer to <http://unlicense.org/>
|
||||
*/
|
||||
|
||||
/* pigpio version 64 */
|
||||
/* pigpio version 65 */
|
||||
|
||||
/* include ------------------------------------------------------- */
|
||||
|
||||
|
@ -204,8 +204,8 @@ bit 0 READ_LAST_NOT_SET_ERROR
|
|||
|
||||
#define DO_DBG(level, format, arg...) \
|
||||
{ \
|
||||
if (gpioCfg.dbgLevel >= level && \
|
||||
(gpioCfg.internals & PI_CFG_SIGHANDLER)) \
|
||||
if ((gpioCfg.dbgLevel >= level) && \
|
||||
(!(gpioCfg.internals & PI_CFG_SIGHANDLER))) \
|
||||
fprintf(stderr, "%s %s: " format "\n" , \
|
||||
myTimeStamp(), __FUNCTION__ , ## arg); \
|
||||
}
|
||||
|
@ -1346,7 +1346,7 @@ static volatile gpioCfg_t gpioCfg =
|
|||
PI_DEFAULT_MEM_ALLOC_MODE,
|
||||
0, /* dbgLevel */
|
||||
0, /* alertFreq */
|
||||
PI_CFG_SIGHANDLER, /* internals */
|
||||
0, /* internals */
|
||||
};
|
||||
|
||||
/* no initialisation required */
|
||||
|
@ -8135,7 +8135,7 @@ int initInitialise(void)
|
|||
}
|
||||
|
||||
#ifndef EMBEDDED_IN_VM
|
||||
if(gpioCfg.internals & PI_CFG_SIGHANDLER)
|
||||
if (!(gpioCfg.internals & PI_CFG_SIGHANDLER))
|
||||
sigSetHandler();
|
||||
#endif
|
||||
|
||||
|
@ -8534,7 +8534,7 @@ void gpioTerminate(void)
|
|||
|
||||
#ifndef EMBEDDED_IN_VM
|
||||
if ((gpioCfg.internals & PI_CFG_STATS) &&
|
||||
(gpioCfg.internals & PI_CFG_SIGHANDLER))
|
||||
(!(gpioCfg.internals & PI_CFG_SIGHANDLER)))
|
||||
{
|
||||
fprintf(stderr,
|
||||
"\n#####################################################\n");
|
||||
|
|
36
pigpio.h
36
pigpio.h
|
@ -31,7 +31,7 @@ For more information, please refer to <http://unlicense.org/>
|
|||
#include <stdint.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#define PIGPIO_VERSION 64
|
||||
#define PIGPIO_VERSION 6507
|
||||
|
||||
/*TEXT
|
||||
|
||||
|
@ -980,6 +980,8 @@ gpioSetMode(18, PI_OUTPUT); // Set GPIO18 as output.
|
|||
|
||||
gpioSetMode(22,PI_ALT0); // Set GPIO22 to alternative mode 0.
|
||||
...
|
||||
|
||||
See [[http://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2835/BCM2835-ARM-Peripherals.pdf]] page 102 for an overview of the modes.
|
||||
D*/
|
||||
|
||||
|
||||
|
@ -1494,6 +1496,20 @@ The function is passed the GPIO, the current level, and the
|
|||
current tick. The level will be PI_TIMEOUT if the optional
|
||||
interrupt timeout expires.
|
||||
|
||||
. .
|
||||
Parameter Value Meaning
|
||||
|
||||
GPIO 0-53 The GPIO which has changed state
|
||||
|
||||
level 0-2 0 = change to low (a falling edge)
|
||||
1 = change to high (a rising edge)
|
||||
2 = no level change (interrupt timeout)
|
||||
|
||||
tick 32 bit The number of microseconds since boot
|
||||
WARNING: this wraps around from
|
||||
4294967295 to 0 roughly every 72 minutes
|
||||
. .
|
||||
|
||||
The underlying Linux sysfs GPIO interface is used to provide
|
||||
the interrupt services.
|
||||
|
||||
|
@ -1547,6 +1563,22 @@ or PI_BAD_ISR_INIT.
|
|||
The function is passed the GPIO, the current level, the
|
||||
current tick, and the userdata pointer.
|
||||
|
||||
. .
|
||||
Parameter Value Meaning
|
||||
|
||||
GPIO 0-53 The GPIO which has changed state
|
||||
|
||||
level 0-2 0 = change to low (a falling edge)
|
||||
1 = change to high (a rising edge)
|
||||
2 = no level change (interrupt timeout)
|
||||
|
||||
tick 32 bit The number of microseconds since boot
|
||||
WARNING: this wraps around from
|
||||
4294967295 to 0 roughly every 72 minutes
|
||||
|
||||
userdata pointer Pointer to an arbitrary object
|
||||
. .
|
||||
|
||||
Only one of [*gpioSetISRFunc*] or [*gpioSetISRFuncEx*] can be
|
||||
registered per GPIO.
|
||||
|
||||
|
@ -3671,7 +3703,7 @@ int gpioStoreScript(char *script);
|
|||
/*D
|
||||
This function stores a null terminated script for later execution.
|
||||
|
||||
See [[http://abyz.co.uk/rpi/pigpio/pigs.html#Scripts]] for details.
|
||||
See [[http://abyz.me.uk/rpi/pigpio/pigs.html#Scripts]] for details.
|
||||
|
||||
. .
|
||||
script: the text of the script
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
." Process this file with
|
||||
." groff -man -Tascii pigpiod.1
|
||||
."
|
||||
.TH pigpiod 1 2012-2017 Linux "pigpio archive"
|
||||
.TH pigpiod 1 2012-2018 Linux "pigpio archive"
|
||||
.SH NAME
|
||||
pigpiod - A utility to start the pigpio library as a daemon.
|
||||
|
||||
|
@ -265,4 +265,4 @@ A full channel only requires one DMA control block regardless of the length of a
|
|||
pig2vcd(1), pigs(1), pigpio(3), pigpiod_if(3), pigpiod_if2(3)
|
||||
.SH AUTHOR
|
||||
|
||||
joan@abyz.co.uk
|
||||
joan@abyz.me.uk
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
." Process this file with
|
||||
." groff -man -Tascii pigpiod_if.3
|
||||
."
|
||||
.TH pigpiod_if 3 2012-2017 Linux "pigpio archive"
|
||||
.TH pigpiod_if 3 2012-2018 Linux "pigpio archive"
|
||||
.SH NAME
|
||||
pigpiod_if - A C library to interface to the pigpio daemon.
|
||||
|
||||
|
@ -4944,4 +4944,4 @@ typedef enum
|
|||
pigpiod(1), pig2vcd(1), pigs(1), pigpio(3), pigpiod_if2(3)
|
||||
.SH AUTHOR
|
||||
|
||||
joan@abyz.co.uk
|
||||
joan@abyz.me.uk
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
." Process this file with
|
||||
." groff -man -Tascii pigpiod_if2.3
|
||||
."
|
||||
.TH pigpiod_if2 3 2012-2017 Linux "pigpio archive"
|
||||
.TH pigpiod_if2 3 2012-2018 Linux "pigpio archive"
|
||||
.SH NAME
|
||||
pigpiod_if2 - A C library to interface to the pigpio daemon.
|
||||
|
||||
|
@ -7315,4 +7315,4 @@ typedef enum
|
|||
pigpiod(1), pig2vcd(1), pigs(1), pigpio(3), pigpiod_if(3)
|
||||
.SH AUTHOR
|
||||
|
||||
joan@abyz.co.uk
|
||||
joan@abyz.me.uk
|
||||
|
|
4
pigs.1
4
pigs.1
|
@ -2,7 +2,7 @@
|
|||
." Process this file with
|
||||
." groff -man -Tascii foo.1
|
||||
."
|
||||
.TH pigs 1 2012-2017 Linux "pigpio archive"
|
||||
.TH pigs 1 2012-2018 Linux "pigpio archive"
|
||||
.SH NAME
|
||||
pigs - command line socket access to the pigpio daemon.
|
||||
|
||||
|
@ -5727,4 +5727,4 @@ the current GPIO levels.
|
|||
pigpiod(1), pig2vcd(1), pigpio(3), pigpiod_if(3), pigpiod_if2(3)
|
||||
.SH AUTHOR
|
||||
|
||||
joan@abyz.co.uk
|
||||
joan@abyz.me.uk
|
||||
|
|
Loading…
Reference in New Issue