mirror of https://github.com/joan2937/pigpio
Fixing command line arguments for new option -m
This commit is contained in:
parent
29bbd99b0e
commit
e1b7d8c508
|
@ -442,7 +442,7 @@ static errInfo_t errInfo[]=
|
||||||
{PI_BAD_PATHNAME , "can't open pathname"},
|
{PI_BAD_PATHNAME , "can't open pathname"},
|
||||||
{PI_NO_HANDLE , "no handle available"},
|
{PI_NO_HANDLE , "no handle available"},
|
||||||
{PI_BAD_HANDLE , "unknown handle"},
|
{PI_BAD_HANDLE , "unknown handle"},
|
||||||
{PI_BAD_IF_FLAGS , "ifFlags > 3"},
|
{PI_BAD_IF_FLAGS , "ifFlags > 4"},
|
||||||
{PI_BAD_CHANNEL , "DMA channel not 0-14"},
|
{PI_BAD_CHANNEL , "DMA channel not 0-14"},
|
||||||
{PI_BAD_SOCKET_PORT , "socket port not 1024-30000"},
|
{PI_BAD_SOCKET_PORT , "socket port not 1024-30000"},
|
||||||
{PI_BAD_FIFO_COMMAND , "unknown fifo command"},
|
{PI_BAD_FIFO_COMMAND , "unknown fifo command"},
|
||||||
|
|
2
pigpio.3
2
pigpio.3
|
@ -9796,7 +9796,7 @@ A 16-bit word value.
|
||||||
.br
|
.br
|
||||||
#define PI_BAD_HANDLE -25 // unknown handle
|
#define PI_BAD_HANDLE -25 // unknown handle
|
||||||
.br
|
.br
|
||||||
#define PI_BAD_IF_FLAGS -26 // ifFlags > 3
|
#define PI_BAD_IF_FLAGS -26 // ifFlags > 4
|
||||||
.br
|
.br
|
||||||
#define PI_BAD_CHANNEL -27 // DMA channel not 0-14
|
#define PI_BAD_CHANNEL -27 // DMA channel not 0-14
|
||||||
.br
|
.br
|
||||||
|
|
2
pigpio.c
2
pigpio.c
|
@ -13328,7 +13328,7 @@ int gpioCfgInterfaces(unsigned ifFlags)
|
||||||
|
|
||||||
CHECK_NOT_INITED;
|
CHECK_NOT_INITED;
|
||||||
|
|
||||||
if (ifFlags > 7)
|
if (ifFlags > 15)
|
||||||
SOFT_ERROR(PI_BAD_IF_FLAGS, "bad ifFlags (%X)", ifFlags);
|
SOFT_ERROR(PI_BAD_IF_FLAGS, "bad ifFlags (%X)", ifFlags);
|
||||||
|
|
||||||
gpioCfg.ifFlags = ifFlags;
|
gpioCfg.ifFlags = ifFlags;
|
||||||
|
|
2
pigpio.h
2
pigpio.h
|
@ -6143,7 +6143,7 @@ after this command is issued.
|
||||||
#define PI_BAD_PATHNAME -23 // can't open pathname
|
#define PI_BAD_PATHNAME -23 // can't open pathname
|
||||||
#define PI_NO_HANDLE -24 // no handle available
|
#define PI_NO_HANDLE -24 // no handle available
|
||||||
#define PI_BAD_HANDLE -25 // unknown handle
|
#define PI_BAD_HANDLE -25 // unknown handle
|
||||||
#define PI_BAD_IF_FLAGS -26 // ifFlags > 3
|
#define PI_BAD_IF_FLAGS -26 // ifFlags > 4
|
||||||
#define PI_BAD_CHANNEL -27 // DMA channel not 0-14
|
#define PI_BAD_CHANNEL -27 // DMA channel not 0-14
|
||||||
#define PI_BAD_PRIM_CHANNEL -27 // DMA primary channel not 0-14
|
#define PI_BAD_PRIM_CHANNEL -27 // DMA primary channel not 0-14
|
||||||
#define PI_BAD_SOCKET_PORT -28 // socket port not 1024-32000
|
#define PI_BAD_SOCKET_PORT -28 // socket port not 1024-32000
|
||||||
|
|
|
@ -712,7 +712,7 @@ _errors=[
|
||||||
[_PI_BAD_PATHNAME , "can't open pathname"],
|
[_PI_BAD_PATHNAME , "can't open pathname"],
|
||||||
[PI_NO_HANDLE , "no handle available"],
|
[PI_NO_HANDLE , "no handle available"],
|
||||||
[PI_BAD_HANDLE , "unknown handle"],
|
[PI_BAD_HANDLE , "unknown handle"],
|
||||||
[_PI_BAD_IF_FLAGS , "ifFlags > 3"],
|
[_PI_BAD_IF_FLAGS , "ifFlags > 4"],
|
||||||
[_PI_BAD_CHANNEL , "DMA channel not 0-14"],
|
[_PI_BAD_CHANNEL , "DMA channel not 0-14"],
|
||||||
[_PI_BAD_SOCKET_PORT , "socket port not 1024-30000"],
|
[_PI_BAD_SOCKET_PORT , "socket port not 1024-30000"],
|
||||||
[_PI_BAD_FIFO_COMMAND , "unknown fifo command"],
|
[_PI_BAD_FIFO_COMMAND , "unknown fifo command"],
|
||||||
|
|
|
@ -103,6 +103,7 @@ void usage()
|
||||||
" -k, disable socket interface, default enabled\n" \
|
" -k, disable socket interface, default enabled\n" \
|
||||||
" -l, localhost socket only default local+remote\n" \
|
" -l, localhost socket only default local+remote\n" \
|
||||||
" -n IP addr, allow address, name or dotted, default allow all\n" \
|
" -n IP addr, allow address, name or dotted, default allow all\n" \
|
||||||
|
" -m, disable alerts default enabled\n" \
|
||||||
" -p value, socket port, 1024-32000, default 8888\n" \
|
" -p value, socket port, 1024-32000, default 8888\n" \
|
||||||
" -s value, sample rate, 1, 2, 4, 5, 8, or 10, default 5\n" \
|
" -s value, sample rate, 1, 2, 4, 5, 8, or 10, default 5\n" \
|
||||||
" -t value, clock peripheral, 0=PWM 1=PCM, default PCM\n" \
|
" -t value, clock peripheral, 0=PWM 1=PCM, default PCM\n" \
|
||||||
|
@ -162,7 +163,7 @@ static void initOpts(int argc, char *argv[])
|
||||||
uint32_t addr;
|
uint32_t addr;
|
||||||
int64_t mask;
|
int64_t mask;
|
||||||
|
|
||||||
while ((opt = getopt(argc, argv, "a:b:c:d:e:fgkln:p:s:t:x:vV")) != -1)
|
while ((opt = getopt(argc, argv, "a:b:c:d:e:fgkln:mp:s:t:x:vV")) != -1)
|
||||||
{
|
{
|
||||||
switch (opt)
|
switch (opt)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue