From 114653357b8bf8b15213c52fbe5bcb2695d7d90b Mon Sep 17 00:00:00 2001 From: joan Date: Sun, 19 Feb 2017 11:28:15 +0000 Subject: [PATCH] V61 --- pigpio.c | 8 +++++++- pigpio.h | 10 +++++----- pigpio.py | 14 ++++++-------- pigs.1 | 31 +++++++++++++++++++++++++++++++ 4 files changed, 49 insertions(+), 14 deletions(-) diff --git a/pigpio.c b/pigpio.c index 570a8a2..4e5286f 100644 --- a/pigpio.c +++ b/pigpio.c @@ -25,7 +25,7 @@ OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to */ -/* pigpio version 60 */ +/* pigpio version 61 */ /* include ------------------------------------------------------- */ @@ -9484,6 +9484,12 @@ int gpioWaveTxSend(unsigned wave_id, unsigned wave_mode) PWMClockInited = 0; } + if (wave_mode < PI_WAVE_MODE_ONE_SHOT_SYNC) + { + dmaOut[DMA_CS] = DMA_CHANNEL_RESET; + dmaOut[DMA_CONBLK_AD] = 0; + } + p = rawWaveCBAdr(waveInfo[wave_id].topCB); if ((wave_mode & 1) == PI_WAVE_MODE_ONE_SHOT) diff --git a/pigpio.h b/pigpio.h index 5a28e64..57137c3 100644 --- a/pigpio.h +++ b/pigpio.h @@ -31,7 +31,7 @@ For more information, please refer to #include #include -#define PIGPIO_VERSION 60 +#define PIGPIO_VERSION 61 /*TEXT @@ -676,10 +676,10 @@ typedef void *(gpioThreadFunc_t) (void *); /* Files, I2C, SPI, SER */ -#define PI_FILE_SLOTS 8 -#define PI_I2C_SLOTS 32 -#define PI_SPI_SLOTS 16 -#define PI_SER_SLOTS 8 +#define PI_FILE_SLOTS 16 +#define PI_I2C_SLOTS 64 +#define PI_SPI_SLOTS 32 +#define PI_SER_SLOTS 16 #define PI_MAX_I2C_ADDR 0x7F diff --git a/pigpio.py b/pigpio.py index 65e0ac5..517943f 100644 --- a/pigpio.py +++ b/pigpio.py @@ -299,7 +299,7 @@ import threading import os import atexit -VERSION = "1.35" +VERSION = "1.36" exceptions = True @@ -4888,7 +4888,7 @@ class pi(): return a.trigger def __init__(self, - host = os.getenv("PIGPIO_ADDR", ''), + host = os.getenv("PIGPIO_ADDR", 'localhost'), port = os.getenv("PIGPIO_PORT", 8888)): """ Grants access to a Pi's GPIO. @@ -4926,6 +4926,9 @@ class pi(): port = int(port) + if host == '': + host = "localhost" + self._host = host self._port = port @@ -4954,12 +4957,7 @@ class pi(): if self.sl.s is not None: self.sl.s = None - if host == '': - h = "localhost" - else: - h = host - - s = "Can't connect to pigpio at {}({})".format(str(h), str(port)) + s = "Can't connect to pigpio at {}({})".format(host, str(port)) print(_except_a.format(s)) if exception == 1: diff --git a/pigs.1 b/pigs.1 index 28bc9bf..d909863 100644 --- a/pigs.1 +++ b/pigs.1 @@ -189,6 +189,37 @@ When a command takes a number as a parameter it may be entered as hex .br E.g. 23 is 23 decimal, 0x100 is 256 decimal, 070 is 56 decimal. +.br +Some commands can return a variable number of data bytes. By +default this data is displayed as decimal. The pigs -a option +can be used to force the display as ASCII and the pigs -x +option can be used to force the display as hex. + +.br +E.g. assuming the transmitted serial data is the letters ABCDEONM + +.br + +.EX +$ pigs slr 4 100 +.br +8 65 66 67 68 69 79 78 77 +.br + +.br +$ pigs -a slr 4 100 +.br +8 ABCDEONM +.br + +.br +$ pigs -x slr 4 100 +.br +8 41 42 43 44 45 4f 4e 4d +.br + +.EE + .br .SH COMMANDS