This is a general tidyup to detach this fork better from Gordon, who was (and perhaps still is) completely inundated with WiringPi-related support questions.
This changeset includes a number of tweaks which should reduce support burden on Gordon. I believe they are essential if we plan to release a new debian package.
They should - hopefully - not reduce or make ambiguous the origins of this code while achieving the above.
* Remove Gordon's email address from all source files to avoid support queries finding their way to him
* Update wiringPi URLs to the GitHub repository to try and keep bugs/issues within the fork
* Bump version to 2.70 ready for a debian package release
* Update debian package maintainer info, add bugs & homepage URLs to this repository
* Changes to support the Zero 2 W (model type 18|0x12)
* Increment version in version.h
* Increment version in debian-template/wiringPi/DEBIAN/control
* Increment version in VERSION as well - I keep missing places where this number is defined
* Increment VERSION_MINOR, missed in previous commits; add missing Pi Z2W model name to piModelNames
Co-authored-by: schwartz <pi@schwartz>
Co-authored-by: PumpkinPi <jack@mirkwood.net>
A recent compiler complains about the sprintf() in authenticate() being able to
write up to 1023 bytes into challenge, which is not possible given that getChallenge()
returns a string 10 bytes smaller than whatever string is in its 1024 byte buffer.
Reducing the size of the buffer in getChallenge() quiets the warning. It should not
affect anything else, as the challenge string is used as a salt that must be <= 96 bits.
If `pthread_create` fails, `newPin` will never get reset to -1 and process would hang. This change will return from `softPwmCreate` immediately if `pthread_create` returns a non-zero value and avoid hanging forever.
wiringPi.c:1328:21: warning: ‘digitalWrite8Dummy’ defined but not used [-Wunused-function]
1328 | static void digitalWrite8Dummy (UNU struct wiringPiNodeStruct *node, UNU int pin, UNU int value) { return ; }
| ^~~~~~~~~~~~~~~~~~
wiringPi.c:1327:21: warning: ‘digitalRead8Dummy’ defined but not used [-Wunused-function]
1327 | static unsigned int digitalRead8Dummy (UNU struct wiringPiNodeStruct *node, UNU int UNU pin) { return 0 ; }
| ^~~~~~~~~~~~~~~~~
The related nodes at line 1360 and 1362 have been commented before.
Signed-off-by: MichaIng <micha@dietpi.com>
Based on this raspi-gpio commit[1] the 2711 chip uses a different method
for pull up/down. This change implements that same method.
With this change, wiringPi now works for the Pi4B with the subset of
functionality used by zynthian.
[1] 80fa7d04ea?diff=unified
This change make the following commands correctly detect the 4B
however there may be an issue with reading GPIO inputs on the 4B
as they are always returning zero.
The aim of this change is to be the source-equivalent of the binary
package release 2.52[1] which was the last release before upstream
development ceased.
[1] http://wiringpi.com/wiringpi-updated-to-2-52-for-the-raspberry-pi-4b/
for kernels 4.8 onwards.
Some very old stuff might break.
Additional fixes for the ISR code and some tweaks here and
there. I've removed the checks for some operations that might
fail when using the gpiomem interface - which is now the default
way of doing things - if your program segfaults, then you
may need to use sudo on it.
Added support for the ADS1115 16-bit ADC
Updated the gpio readall command to correctly with with the Compute Module
and fixed a resulting bug in wiringPi...
Also affects the Pi v2 which also uses the new Revision
encoding scheme (It was slightly bodged before) This ought
to be relatively future proof, but who knows.
Fixed a minor thing in the examples Makefile
(not that anyone bothers to use it, judging by the emails I get )-:
This makes it possible for the caller of ./build to add a version
number to the sonames of the shared libraries. (This is required for
Debian packages.)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
This is not set in normal shell sessions.
Honouring an existing setting of LDCONFIG allows the caller of ./build
to specify an alternative program to run.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
These are not set in normal shell sessions. Honouring existing
settings allows the caller of ./build to specify alternative values.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
We are going to want to introduce a real Debian source package build
system. But that needs to contain a lot of things in debian/ which
ought not to appear in the .deb made by the existing ad-hoc `./build
debian' arrangements, which we want to keep so as not to unduly
disturb existing users.
So rename the whole debian/ directory to debian-template/ and change
all references in the build system.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
This patch is autogenerated, with:
git-ls-files | grep Makefile | xargs perl -i~ -pe 's/^\t\@/\t\$Q /'
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
We want to be able to disable the many @'s in the Makefiles so
that we can see what they are doing, when things go wrong. It is
conventional to arrange for setting V=1 to have this effect.
Here we supply a formulaic stanza for either setting Q?=@ or
doing nothing. (There is sadly no standard place which is
included in all the Makefiles so this is probably best).
In this patch we do not introduce any users of Q yet. This is
because the next patch, which introduces all the users of Q, can
be generated entirely automatically. (This is also convenient in
case something needs to be rebased across it.)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
the same as everyone elses.
This is an interim version which will work on both Pi v1 and v2
boards until I have a bit more time to implement the correct
stuff for v2.
Moved the extensions into wiringPi from gpio and made it more general purpose
more so that RTB and anything else can dymanically add devices
into wiringPi.
Changes to GPIO to updates for the SPI and I2C module loads
Added gpio unload for SPI and I2C.
Added a new way to setup SPI - by passing the mode in.
Support for the new Pi2 thing too