This commit is contained in:
joan 2017-02-19 11:28:15 +00:00
parent d1f7421e23
commit 114653357b
4 changed files with 49 additions and 14 deletions

View File

@ -25,7 +25,7 @@ OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org/> For more information, please refer to <http://unlicense.org/>
*/ */
/* pigpio version 60 */ /* pigpio version 61 */
/* include ------------------------------------------------------- */ /* include ------------------------------------------------------- */
@ -9484,6 +9484,12 @@ int gpioWaveTxSend(unsigned wave_id, unsigned wave_mode)
PWMClockInited = 0; 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); p = rawWaveCBAdr(waveInfo[wave_id].topCB);
if ((wave_mode & 1) == PI_WAVE_MODE_ONE_SHOT) if ((wave_mode & 1) == PI_WAVE_MODE_ONE_SHOT)

View File

@ -31,7 +31,7 @@ For more information, please refer to <http://unlicense.org/>
#include <stdint.h> #include <stdint.h>
#include <pthread.h> #include <pthread.h>
#define PIGPIO_VERSION 60 #define PIGPIO_VERSION 61
/*TEXT /*TEXT
@ -676,10 +676,10 @@ typedef void *(gpioThreadFunc_t) (void *);
/* Files, I2C, SPI, SER */ /* Files, I2C, SPI, SER */
#define PI_FILE_SLOTS 8 #define PI_FILE_SLOTS 16
#define PI_I2C_SLOTS 32 #define PI_I2C_SLOTS 64
#define PI_SPI_SLOTS 16 #define PI_SPI_SLOTS 32
#define PI_SER_SLOTS 8 #define PI_SER_SLOTS 16
#define PI_MAX_I2C_ADDR 0x7F #define PI_MAX_I2C_ADDR 0x7F

View File

@ -299,7 +299,7 @@ import threading
import os import os
import atexit import atexit
VERSION = "1.35" VERSION = "1.36"
exceptions = True exceptions = True
@ -4888,7 +4888,7 @@ class pi():
return a.trigger return a.trigger
def __init__(self, def __init__(self,
host = os.getenv("PIGPIO_ADDR", ''), host = os.getenv("PIGPIO_ADDR", 'localhost'),
port = os.getenv("PIGPIO_PORT", 8888)): port = os.getenv("PIGPIO_PORT", 8888)):
""" """
Grants access to a Pi's GPIO. Grants access to a Pi's GPIO.
@ -4926,6 +4926,9 @@ class pi():
port = int(port) port = int(port)
if host == '':
host = "localhost"
self._host = host self._host = host
self._port = port self._port = port
@ -4954,12 +4957,7 @@ class pi():
if self.sl.s is not None: if self.sl.s is not None:
self.sl.s = None self.sl.s = None
if host == '': s = "Can't connect to pigpio at {}({})".format(host, str(port))
h = "localhost"
else:
h = host
s = "Can't connect to pigpio at {}({})".format(str(h), str(port))
print(_except_a.format(s)) print(_except_a.format(s))
if exception == 1: if exception == 1:

31
pigs.1
View File

@ -189,6 +189,37 @@ When a command takes a number as a parameter it may be entered as hex
.br .br
E.g. 23 is 23 decimal, 0x100 is 256 decimal, 070 is 56 decimal. 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 .br
.SH COMMANDS .SH COMMANDS