Docs plus reverse PR #164 flag meaning
authorjoan <joan@abyz.co.uk>
Sun, 4 Feb 2018 18:59:37 +0000 (18:59 +0000)
committerjoan <joan@abyz.co.uk>
Sun, 4 Feb 2018 18:59:37 +0000 (18:59 +0000)
pig2vcd.1
pigpio.3
pigpio.c
pigpio.h
pigpiod.1
pigpiod_if.3
pigpiod_if2.3
pigs.1

index b2c64b40271761192e41127e4faa736dce9e1c50..e5271ee2e31ceee3720c0ec8acbdb5a8283a7e53 100644 (file)
--- a/pig2vcd.1
+++ b/pig2vcd.1
@@ -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
index fac81d9b63d085fc43b91fec99e81b4589154915..6fdff766134eec6c757a50cb42e41479d5725120 100644 (file)
--- a/pigpio.3
+++ b/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
index da5a809d14f8f07b1d604b8c3adcae69c8a6702b..933759591e05d8e22e927b6f49d2fb84a1a9e3a6 100644 (file)
--- a/pigpio.c
+++ b/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");
index 3ae2a09c816d0ec8bf6d64d855118913965c1828..1cedc09894f41dc5cd11843cf53373767f18493b 100644 (file)
--- a/pigpio.h
+++ b/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
index d677a88edcbcece99d3021c36f82cf4a28cee155..db10b5f1ff2b2605425e9eb7bff4fd5975ac9641 100644 (file)
--- a/pigpiod.1
+++ b/pigpiod.1
@@ -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
index 5c5cb0fcfabc6b8c1f7e361733f6651cd9bd9364..7e0754df607606851129385bc8b41f0ee935ba48 100644 (file)
@@ -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
index 5bb17ffcd2ecba596f8660950d218ab365ff2dcd..b66b8c4686f774b6b373d924d3cb08568f6d5520 100644 (file)
@@ -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
diff --git a/pigs.1 b/pigs.1
index 535497b163648911b320bd57d017ec8d29b41780..b16595b80000082bafa56ee79d088fb6300c34b7 100644 (file)
--- a/pigs.1
+++ b/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