diff --git a/MakeRemote b/MakeRemote index 2f5885b..a3a235c 100644 --- a/MakeRemote +++ b/MakeRemote @@ -98,3 +98,4 @@ pigpiod_if.o: pigpiod_if.c pigpio.h pigpiod_if.h command.h pigpiod_if2.o: pigpiod_if2.c pigpio.h pigpiod_if2.h command.h pigs.o: pigs.c pigpio.h command.h + diff --git a/Makefile b/Makefile index 5b3bb99..846daf0 100644 --- a/Makefile +++ b/Makefile @@ -130,3 +130,4 @@ pigs.o: pigs.c pigpio.h command.h x_pigpio.o: x_pigpio.c pigpio.h x_pigpiod_if.o: x_pigpiod_if.c pigpiod_if.h pigpio.h x_pigpiod_if2.o: x_pigpiod_if2.c pigpiod_if2.h pigpio.h + diff --git a/pigpio.3 b/pigpio.3 index 43406d5..1853e72 100644 --- a/pigpio.3 +++ b/pigpio.3 @@ -3409,7 +3409,7 @@ active low chip select. .br .br -An auxiliary SPI device is available on the A+/B+/Pi2 and may be +An auxiliary SPI device is available on the A+/B+/Pi2/Zero and may be selected by setting the A bit in the flags. The auxiliary device has 3 chip selects and a selectable word size in bits. @@ -3418,7 +3418,7 @@ device has 3 chip selects and a selectable word size in bits. .br .EX - spiChan: 0-1 (0-2 for A+/B+/Pi2 auxiliary device) + spiChan: 0-1 (0-2 for A+/B+/Pi2/Zero auxiliary device) .br baud: 32K-125M (values above 30M are unlikely to work) .br @@ -3492,7 +3492,7 @@ ux is 0 if the CEx gpio is reserved for SPI (default) and 1 otherwise. .br A is 0 for the standard SPI device, 1 for the auxiliary SPI. The -auxiliary device is only present on the A+/B+/Pi2. +auxiliary device is only present on the A+/B+/Pi2/Zero. .br @@ -4673,11 +4673,11 @@ The gpio must be one of the following. .EX 4 clock 0 All models .br -5 clock 1 A+/B+/Pi2 and compute module only (reserved for system use) +5 clock 1 A+/B+/Pi2/Zero and compute module only (reserved for system use) .br -6 clock 2 A+/B+/Pi2 and compute module only +6 clock 2 A+/B+/Pi2/Zero and compute module only .br -20 clock 0 A+/B+/Pi2 and compute module only +20 clock 0 A+/B+/Pi2/Zero and compute module only .br 21 clock 1 All models but Rev.2 B (reserved for system use) .br @@ -4758,13 +4758,13 @@ The gpio must be one of the following. .br .EX -12 PWM channel 0 A+/B+/Pi2 and compute module only +12 PWM channel 0 A+/B+/Pi2/Zero and compute module only .br -13 PWM channel 1 A+/B+/Pi2 and compute module only +13 PWM channel 1 A+/B+/Pi2/Zero and compute module only .br 18 PWM channel 0 All models .br -19 PWM channel 1 A+/B+/Pi2 and compute module only +19 PWM channel 1 A+/B+/Pi2/Zero and compute module only .br .br @@ -4781,6 +4781,25 @@ The gpio must be one of the following. .EE +.br + +.br +The actual number of steps beween off and fully on is the +integral part of 250 million divided by PWMfreq. + +.br + +.br +The actual frequency set is 250 million / steps. + +.br + +.br +There will only be a million steps for a PWMfreq of 250. +Lower frequencies will have more steps and higher +frequencies will have fewer steps. PWMduty is +automatically scaled to take this into account. + .IP "\fBint gpioTime(unsigned timetype, int *seconds, int *micros)\fP" .IP "" 4 Updates the seconds and micros variables with the current time. @@ -5271,7 +5290,7 @@ Configures pigpio support of the fifo and socket interfaces. .br .EX -ifFlags: 0-3 +ifFlags: 0-7 .br .EE @@ -5285,8 +5304,19 @@ The default setting (0) is that both interfaces are enabled. .br Or in PI_DISABLE_FIFO_IF to disable the pipe interface. + +.br + +.br Or in PI_DISABLE_SOCK_IF to disable the socket interface. +.br + +.br +Or in PI_LOCALHOST_SOCK_IF to disable remote socket +access (this means that the socket interface is only +usable from the local Pi). + .IP "\fBint gpioCfgMemAlloc(unsigned memAllocMode)\fP" .IP "" 4 Selects the method of DMA memory allocation. @@ -7963,7 +7993,7 @@ A 16-bit word value. .br #define PI_BAD_POINTER -90 // bad (NULL) pointer .br -#define PI_NO_AUX_SPI -91 // need a A+/B+/Pi2 for auxiliary SPI +#define PI_NO_AUX_SPI -91 // need a A+/B+/Pi2/Zero for auxiliary SPI .br #define PI_NOT_PWM_GPIO -92 // gpio is not in use for PWM .br diff --git a/pigpio.c b/pigpio.c index 4577eca..77c92c0 100644 --- a/pigpio.c +++ b/pigpio.c @@ -25,7 +25,7 @@ OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to */ -/* pigpio version 42 */ +/* pigpio version 43 */ /* include ------------------------------------------------------- */ @@ -11616,3 +11616,4 @@ int gpioCfgInternals(unsigned cfgWhat, unsigned cfgVal) #include "custom.cext" + diff --git a/pigpio.h b/pigpio.h index c92157d..e934a6d 100644 --- a/pigpio.h +++ b/pigpio.h @@ -31,7 +31,7 @@ For more information, please refer to #include #include -#define PIGPIO_VERSION 42 +#define PIGPIO_VERSION 43 /*TEXT @@ -2620,12 +2620,12 @@ Data will be transferred at baud bits per second. The flags may be used to modify the default behaviour of 4-wire operation, mode 0, active low chip select. -An auxiliary SPI device is available on the A+/B+/Pi2 and may be +An auxiliary SPI device is available on the A+/B+/Pi2/Zero and may be selected by setting the A bit in the flags. The auxiliary device has 3 chip selects and a selectable word size in bits. . . - spiChan: 0-1 (0-2 for A+/B+/Pi2 auxiliary device) + spiChan: 0-1 (0-2 for A+/B+/Pi2/Zero auxiliary device) baud: 32K-125M (values above 30M are unlikely to work) spiFlags: see below . . @@ -2657,7 +2657,7 @@ px is 0 if CEx is active low (default) and 1 for active high. ux is 0 if the CEx gpio is reserved for SPI (default) and 1 otherwise. A is 0 for the standard SPI device, 1 for the auxiliary SPI. The -auxiliary device is only present on the A+/B+/Pi2. +auxiliary device is only present on the A+/B+/Pi2/Zero. W is 0 if the device is not 3-wire, 1 if the device is 3-wire. Standard SPI device only. @@ -3366,9 +3366,9 @@ The gpio must be one of the following. . . 4 clock 0 All models -5 clock 1 A+/B+/Pi2 and compute module only (reserved for system use) -6 clock 2 A+/B+/Pi2 and compute module only -20 clock 0 A+/B+/Pi2 and compute module only +5 clock 1 A+/B+/Pi2/Zero and compute module only (reserved for system use) +6 clock 2 A+/B+/Pi2/Zero and compute module only +20 clock 0 A+/B+/Pi2/Zero and compute module only 21 clock 1 All models but Rev.2 B (reserved for system use) 32 clock 0 Compute module only @@ -3412,10 +3412,10 @@ share a PWM channel. The gpio must be one of the following. . . -12 PWM channel 0 A+/B+/Pi2 and compute module only -13 PWM channel 1 A+/B+/Pi2 and compute module only +12 PWM channel 0 A+/B+/Pi2/Zero and compute module only +13 PWM channel 1 A+/B+/Pi2/Zero and compute module only 18 PWM channel 0 All models -19 PWM channel 1 A+/B+/Pi2 and compute module only +19 PWM channel 1 A+/B+/Pi2/Zero and compute module only 40 PWM channel 0 Compute module only 41 PWM channel 1 Compute module only @@ -3423,6 +3423,16 @@ The gpio must be one of the following. 52 PWM channel 0 Compute module only 53 PWM channel 1 Compute module only . . + +The actual number of steps beween off and fully on is the +integral part of 250 million divided by PWMfreq. + +The actual frequency set is 250 million / steps. + +There will only be a million steps for a PWMfreq of 250. +Lower frequencies will have more steps and higher +frequencies will have fewer steps. PWMduty is +automatically scaled to take this into account. D*/ /*F*/ @@ -3707,13 +3717,18 @@ int gpioCfgInterfaces(unsigned ifFlags); Configures pigpio support of the fifo and socket interfaces. . . -ifFlags: 0-3 +ifFlags: 0-7 . . The default setting (0) is that both interfaces are enabled. Or in PI_DISABLE_FIFO_IF to disable the pipe interface. + Or in PI_DISABLE_SOCK_IF to disable the socket interface. + +Or in PI_LOCALHOST_SOCK_IF to disable remote socket +access (this means that the socket interface is only +usable from the local Pi). D*/ @@ -5048,7 +5063,7 @@ after this command is issued. #define PI_UNKNOWN_COMMAND -88 // unknown command #define PI_SPI_XFER_FAILED -89 // spi xfer/read/write failed #define PI_BAD_POINTER -90 // bad (NULL) pointer -#define PI_NO_AUX_SPI -91 // need a A+/B+/Pi2 for auxiliary SPI +#define PI_NO_AUX_SPI -91 // need a A+/B+/Pi2/Zero for auxiliary SPI #define PI_NOT_PWM_GPIO -92 // gpio is not in use for PWM #define PI_NOT_SERVO_GPIO -93 // gpio is not in use for servo pulses #define PI_NOT_HCLK_GPIO -94 // gpio has no hardware clock @@ -5117,3 +5132,4 @@ after this command is issued. #endif + diff --git a/pigpio.py b/pigpio.py index e8587d7..c46b9d2 100644 --- a/pigpio.py +++ b/pigpio.py @@ -269,7 +269,7 @@ import threading import os import atexit -VERSION = "1.24" +VERSION = "1.25" exceptions = True @@ -667,7 +667,7 @@ _errors=[ [PI_UNKNOWN_COMMAND , "unknown command"], [PI_SPI_XFER_FAILED , "SPI xfer/read/write failed"], [_PI_BAD_POINTER , "bad (NULL) pointer"], - [PI_NO_AUX_SPI , "need a A+/B+/Pi2 for auxiliary SPI"], + [PI_NO_AUX_SPI , "need a A+/B+/Pi2/Zero for auxiliary SPI"], [PI_NOT_PWM_GPIO , "gpio is not in use for PWM"], [PI_NOT_SERVO_GPIO , "gpio is not in use for servo pulses"], [PI_NOT_HCLK_GPIO , "gpio has no hardware clock"], @@ -1564,10 +1564,10 @@ class pi(): . . 4 clock 0 All models - 5 clock 1 A+/B+/Pi2 and compute module only + 5 clock 1 A+/B+/Pi2/Zero and compute module only (reserved for system use) - 6 clock 2 A+/B+/Pi2 and compute module only - 20 clock 0 A+/B+/Pi2 and compute module only + 6 clock 2 A+/B+/Pi2/Zero and compute module only + 20 clock 0 A+/B+/Pi2/Zero and compute module only 21 clock 1 All models but Rev.2 B (reserved for system use) 32 clock 0 Compute module only @@ -1615,10 +1615,10 @@ class pi(): The gpio must be one of the following. . . - 12 PWM channel 0 A+/B+/Pi2 and compute module only - 13 PWM channel 1 A+/B+/Pi2 and compute module only + 12 PWM channel 0 A+/B+/Pi2/Zero and compute module only + 13 PWM channel 1 A+/B+/Pi2/Zero and compute module only 18 PWM channel 0 All models - 19 PWM channel 1 A+/B+/Pi2 and compute module only + 19 PWM channel 1 A+/B+/Pi2/Zero and compute module only 40 PWM channel 0 Compute module only 41 PWM channel 1 Compute module only @@ -1627,6 +1627,16 @@ class pi(): 53 PWM channel 1 Compute module only . . + The actual number of steps beween off and fully on is the + integral part of 250 million divided by PWMfreq. + + The actual frequency set is 250 million / steps. + + There will only be a million steps for a PWMfreq of 250. + Lower frequencies will have more steps and higher + frequencies will have fewer steps. PWMduty is + automatically scaled to take this into account. + ... pi.hardware_PWM(18, 800, 250000) # 800Hz 25% dutycycle @@ -2895,12 +2905,12 @@ class pi(): modify the default behaviour of 4-wire operation, mode 0, active low chip select. - An auxiliary SPI device is available on the A+/B+/Pi2 and may be - selected by setting the A bit in the flags. The auxiliary - device has 3 chip selects and a selectable word size in bits. + An auxiliary SPI device is available on the A+/B+/Pi2/Zero + and may be selected by setting the A bit in the flags. + The auxiliary device has 3 chip selects and a selectable + word size in bits. - - spi_channel:= 0-1 (0-2 for A+/B+/Pi2 auxiliary device). + spi_channel:= 0-1 (0-2 for A+/B+/Pi2/Zero auxiliary device). baud:= 32K-125M (values above 30M are unlikely to work). spi_flags:= see below. @@ -2935,7 +2945,7 @@ class pi(): and 1 otherwise. A is 0 for the standard SPI device, 1 for the auxiliary SPI. - The auxiliary device is only present on the A+/B+/Pi2. + The auxiliary device is only present on the A+/B+/Pi2/Zero. W is 0 if the device is not 3-wire, 1 if the device is 3-wire. Standard SPI device only. @@ -3631,9 +3641,13 @@ class pi(): FALLING_EDGE. wait_timeout:= 0.0- (default 60.0). - The function returns as soon as the edge is detected - or after the number of seconds specified by timeout has - expired. + The function returns when the edge is detected or after + the number of seconds specified by timeout has expired. + + Do not use this function for precise timing purposes, + the edge is only checked 20 times a second. Whenever + you need to know the accurate time of GPIO events use + a [*callback*] function. The function returns True if the edge is detected, otherwise False. diff --git a/pigpiod.c b/pigpiod.c index 7b9074c..b6be227 100644 --- a/pigpiod.c +++ b/pigpiod.c @@ -26,7 +26,7 @@ For more information, please refer to */ /* -This version is for pigpio version 38+ +This version is for pigpio version 43+ */ #include @@ -97,6 +97,7 @@ void usage() " -p value, socket port, 1024-32000, default 8888\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" \ + " -v, -V, display pigpio version and exit\n" \ " -x mask, gpios which may be updated, default board user gpios\n" \ "EXAMPLE\n" \ "sudo pigpiod -s 2 -b 200 -f\n" \ @@ -121,7 +122,7 @@ static void initOpts(int argc, char *argv[]) int opt, err, i; int64_t mask; - while ((opt = getopt(argc, argv, "a:b:c:d:e:fklp:s:t:x:")) != -1) + while ((opt = getopt(argc, argv, "a:b:c:d:e:fklp:s:t:x:vV")) != -1) { switch (opt) { @@ -206,6 +207,12 @@ static void initOpts(int argc, char *argv[]) else fatal("invalid -t option (%d)", i); break; + case 'v': + case 'V': + printf("%d\n", PIGPIO_VERSION); + exit(EXIT_SUCCESS); + break; + case 'x': mask = getNum(optarg, &err); if (!err) @@ -218,7 +225,7 @@ static void initOpts(int argc, char *argv[]) default: /* '?' */ usage(); - exit(-1); + exit(EXIT_FAILURE); } } } @@ -347,3 +354,4 @@ int main(int argc, char **argv) return 0; } + diff --git a/pigpiod_if2.3 b/pigpiod_if2.3 index 3015610..9e3c251 100644 --- a/pigpiod_if2.3 +++ b/pigpiod_if2.3 @@ -1360,11 +1360,11 @@ The gpio must be one of the following. .EX 4 clock 0 All models .br -5 clock 1 A+/B+/Pi2 and compute module only (reserved for system use) +5 clock 1 A+/B+/Pi2/Zero and compute module only (reserved for system use) .br -6 clock 2 A+/B+/Pi2 and compute module only +6 clock 2 A+/B+/Pi2/Zero and compute module only .br -20 clock 0 A+/B+/Pi2 and compute module only +20 clock 0 A+/B+/Pi2/Zero and compute module only .br 21 clock 1 All models but Rev.2 B (reserved for system use) .br @@ -1448,13 +1448,13 @@ The gpio must be one of the following. .br .EX -12 PWM channel 0 A+/B+/Pi2 and compute module only +12 PWM channel 0 A+/B+/Pi2/Zero and compute module only .br -13 PWM channel 1 A+/B+/Pi2 and compute module only +13 PWM channel 1 A+/B+/Pi2/Zero and compute module only .br 18 PWM channel 0 All models .br -19 PWM channel 1 A+/B+/Pi2 and compute module only +19 PWM channel 1 A+/B+/Pi2/Zero and compute module only .br .br @@ -1471,6 +1471,25 @@ The gpio must be one of the following. .EE +.br + +.br +The actual number of steps beween off and fully on is the +integral part of 250 million divided by PWMfreq. + +.br + +.br +The actual frequency set is 250 million / steps. + +.br + +.br +There will only be a million steps for a PWMfreq of 250. +Lower frequencies will have more steps and higher +frequencies will have fewer steps. PWMduty is +automatically scaled to take this into account. + .IP "\fBuint32_t get_current_tick(int pi)\fP" .IP "" 4 Gets the current system tick. @@ -3622,7 +3641,7 @@ active low chip select. .br .br -An auxiliary SPI device is available on the A+/B+/Pi2 and may be +An auxiliary SPI device is available on the A+/B+/Pi2/Zero and may be selected by setting the A bit in the flags. The auxiliary device has 3 chip selects and a selectable word size in bits. @@ -3633,7 +3652,7 @@ device has 3 chip selects and a selectable word size in bits. .EX pi: 0- (as returned by \fBpigpio_start\fP). .br -spi_channel: 0-1 (0-2 for A+/B+/Pi2 auxiliary device). +spi_channel: 0-1 (0-2 for A+/B+/Pi2/Zero auxiliary device). .br baud: 32K-125M (values above 30M are unlikely to work). .br @@ -3707,7 +3726,7 @@ ux is 0 if the CEx gpio is reserved for SPI (default) and 1 otherwise. .br A is 0 for the standard SPI device, 1 for the auxiliary SPI. The -auxiliary device is only present on the A+/B+/Pi2. +auxiliary device is only present on the A+/B+/Pi2/Zero. .br @@ -4214,13 +4233,21 @@ user_gpio: 0-31. .br -.br -The function returns 1 if the edge occurred, otherwise 0. - -.br - .br The function returns when the edge occurs or after the timeout. + +.br + +.br +Do not use this function for precise timing purposes, +the edge is only checked 20 times a second. Whenever +you need to know the accurate time of GPIO events use +a \fBcallback\fP function. + +.br + +.br +The function returns 1 if the edge occurred, otherwise 0. .SH PARAMETERS .br diff --git a/pigpiod_if2.c b/pigpiod_if2.c index 110063d..8067e97 100644 --- a/pigpiod_if2.c +++ b/pigpiod_if2.c @@ -25,7 +25,7 @@ OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to */ -/* PIGPIOD_IF2_VERSION 1 */ +/* PIGPIOD_IF2_VERSION 2 */ #include #include @@ -1650,7 +1650,7 @@ int wait_for_edge(int pi, unsigned user_gpio, unsigned edge, double timeout) id = callback_ex(pi, user_gpio, edge, _wfe, &triggered); - while (!triggered && (time_time() < due)) time_sleep(0.1); + while (!triggered && (time_time() < due)) time_sleep(0.05); callback_cancel(id); diff --git a/pigpiod_if2.h b/pigpiod_if2.h index 45aeb0f..fda029a 100644 --- a/pigpiod_if2.h +++ b/pigpiod_if2.h @@ -30,7 +30,7 @@ For more information, please refer to #include "pigpio.h" -#define PIGPIOD_IF2_VERSION 1 +#define PIGPIOD_IF2_VERSION 2 /*TEXT @@ -982,9 +982,9 @@ The gpio must be one of the following. . . 4 clock 0 All models -5 clock 1 A+/B+/Pi2 and compute module only (reserved for system use) -6 clock 2 A+/B+/Pi2 and compute module only -20 clock 0 A+/B+/Pi2 and compute module only +5 clock 1 A+/B+/Pi2/Zero and compute module only (reserved for system use) +6 clock 2 A+/B+/Pi2/Zero and compute module only +20 clock 0 A+/B+/Pi2/Zero and compute module only 21 clock 1 All models but Rev.2 B (reserved for system use) 32 clock 0 Compute module only @@ -1031,10 +1031,10 @@ share a PWM channel. The gpio must be one of the following. . . -12 PWM channel 0 A+/B+/Pi2 and compute module only -13 PWM channel 1 A+/B+/Pi2 and compute module only +12 PWM channel 0 A+/B+/Pi2/Zero and compute module only +13 PWM channel 1 A+/B+/Pi2/Zero and compute module only 18 PWM channel 0 All models -19 PWM channel 1 A+/B+/Pi2 and compute module only +19 PWM channel 1 A+/B+/Pi2/Zero and compute module only 40 PWM channel 0 Compute module only 41 PWM channel 1 Compute module only @@ -1042,6 +1042,16 @@ The gpio must be one of the following. 52 PWM channel 0 Compute module only 53 PWM channel 1 Compute module only . . + +The actual number of steps beween off and fully on is the +integral part of 250 million divided by PWMfreq. + +The actual frequency set is 250 million / steps. + +There will only be a million steps for a PWMfreq of 250. +Lower frequencies will have more steps and higher +frequencies will have fewer steps. PWMduty is +automatically scaled to take this into account. D*/ @@ -2274,13 +2284,13 @@ Data will be transferred at baud bits per second. The flags may be used to modify the default behaviour of 4-wire operation, mode 0, active low chip select. -An auxiliary SPI device is available on the A+/B+/Pi2 and may be +An auxiliary SPI device is available on the A+/B+/Pi2/Zero and may be selected by setting the A bit in the flags. The auxiliary device has 3 chip selects and a selectable word size in bits. . . pi: 0- (as returned by [*pigpio_start*]). -spi_channel: 0-1 (0-2 for A+/B+/Pi2 auxiliary device). +spi_channel: 0-1 (0-2 for A+/B+/Pi2/Zero auxiliary device). baud: 32K-125M (values above 30M are unlikely to work). spi_flags: see below. . . @@ -2312,7 +2322,7 @@ px is 0 if CEx is active low (default) and 1 for active high. ux is 0 if the CEx gpio is reserved for SPI (default) and 1 otherwise. A is 0 for the standard SPI device, 1 for the auxiliary SPI. The -auxiliary device is only present on the A+/B+/Pi2. +auxiliary device is only present on the A+/B+/Pi2/Zero. W is 0 if the device is not 3-wire, 1 if the device is 3-wire. Standard SPI device only. @@ -2624,9 +2634,14 @@ user_gpio: 0-31. timeout: >=0. . . -The function returns 1 if the edge occurred, otherwise 0. - The function returns when the edge occurs or after the timeout. + +Do not use this function for precise timing purposes, +the edge is only checked 20 times a second. Whenever +you need to know the accurate time of GPIO events use +a [*callback*] function. + +The function returns 1 if the edge occurred, otherwise 0. D*/ /*PARAMS diff --git a/pigs.1 b/pigs.1 index 12cad6b..afef3df 100644 --- a/pigs.1 +++ b/pigs.1 @@ -687,9 +687,9 @@ The gpio must be one of the following. .EX 4 clock 0 All models -5 clock 1 A+/B+/Pi2 and compute module only (reserved for system use) -6 clock 2 A+/B+/Pi2 and compute module only -20 clock 0 A+/B+/Pi2 and compute module only +5 clock 1 A+/B+/Pi2/Zero and compute module only (reserved for system use) +6 clock 2 A+/B+/Pi2/Zero and compute module only +20 clock 0 A+/B+/Pi2/Zero and compute module only 21 clock 1 All models but Type 2 (reserved for system use) .EE @@ -762,10 +762,10 @@ The gpio must be one of the following. .br .EX -12 PWM channel 0 A+/B+/Pi2 and compute module only -13 PWM channel 1 A+/B+/Pi2 and compute module only +12 PWM channel 0 A+/B+/Pi2/Zero and compute module only +13 PWM channel 1 A+/B+/Pi2/Zero and compute module only 18 PWM channel 0 All models -19 PWM channel 1 A+/B+/Pi2 and compute module only +19 PWM channel 1 A+/B+/Pi2/Zero and compute module only .EE @@ -780,6 +780,19 @@ The gpio must be one of the following. .EE +.br +The actual number of steps beween off and fully on is the +integral part of 250 million divided by \fBpf\fP. + +.br +The actual frequency set is 250 million / steps. + +.br +There will only be a million steps for a \fBpf\fP of 250. +Lower frequencies will have more steps and higher +frequencies will have fewer steps. \fBpdc\fP is +automatically scaled to take this into account. + .br .IP "\fBHWVER \fP - Get hardware version" @@ -2736,7 +2749,7 @@ Speeds between 32kbps and 125Mbps are allowed. Speeds above 30Mbps are unlikely to work. .br -An auxiliary SPI device is available on the A+/B+/Pi2 and may be +An auxiliary SPI device is available on the A+/B+/Pi2/Zero and may be selected by setting the A bit in the flags. The auxiliary device has 3 chip selects and a selectable word size in bits. @@ -2783,7 +2796,7 @@ ux is 0 if the CEx gpio is reserved for SPI (default) and 1 otherwise. .br A is 0 for the standard SPI device, 1 for the auxiliary SPI. The -auxiliary device is only present on the A+/B+/Pi2. +auxiliary device is only present on the A+/B+/Pi2/Zero. .br W is 0 if the device is not 3-wire, 1 if the device is 3-wire. Standard diff --git a/setup.py b/setup.py index 407cb8d..c58a792 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from distutils.core import setup setup(name='pigpio', - version='1.24', + version='1.25', author='joan', author_email='joan@abyz.co.uk', maintainer='joan', diff --git a/x_pigpio.c b/x_pigpio.c index 58a08c2..9725094 100644 --- a/x_pigpio.c +++ b/x_pigpio.c @@ -4,9 +4,9 @@ sudo ./x_pigpio *** WARNING ************************************************ * * -* All the tests make extensive use of gpio 4 (pin P1-7). * +* All the tests make extensive use of gpio 25 (pin 22). * * Ensure that either nothing or just a LED is connected to * -* gpio 4 before running any of the tests. * +* gpio 25 before running any of the tests. * * * * Some tests are statistical in nature and so may on * * occasion fail. Repeated failures on the same test or * @@ -27,7 +27,7 @@ sudo ./x_pigpio #define USERDATA 18249013 -#define GPIO 4 +#define GPIO 25 void CHECK(int t, int st, int got, int expect, int pc, char *desc) { @@ -273,7 +273,7 @@ void t4() gpioSetPWMrange(GPIO, 100); h = gpioNotifyOpen(); - e = gpioNotifyBegin(h, (1<<4)); + e = gpioNotifyBegin(h, (1<