95 Commits

Author SHA1 Message Date
Gordon Henderson
bb6f08487c Updated wiringPi for the new Pi Zero.
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 )-:
2015-11-29 21:08:04 +00:00
Gordon Henderson
d79506694d Fixing a few issues - makefile goofs.
Also adding in the stuff for /dev/gpiomem with warnings
and information in the gpio manual page (who reads that
though!)
2015-09-30 16:11:42 +01:00
Gordon Henderson
f6c40cb2a6 Fixed the requirement for -lm
Updated the gpio program to be device tree aware.
2015-09-24 22:35:31 +01:00
Gordon Henderson
170dce5f19 Updated the Debian build system thanks to Ian Jackson for the
help.
2015-09-20 19:30:38 +01:00
Ian Jackson
a776e6b0e8 Introduce a proper Debian source package build system
It's not perfect - there is no symbol versioning, and I have had to
make some (perhaps false) assumptions about library ABI stability, but
it does produce something vaguely resembling what would be expected
from a library package found in Debian, and it does so using the
standard Debian source format.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2015-09-12 20:38:21 +01:00
Ian Jackson
ae421d4a9c Makefiles: Honour WIRINGPI_SONAME_SUFFIX
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>
2015-09-12 20:38:20 +01:00
Ian Jackson
3ceb07a9a6 Makefiles: Honour WIRINGPI_SUDO=0
This makes it possible for the caller of ./build to suppress the
chown/chmod of the gpio utility.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2015-09-12 20:38:20 +01:00
Ian Jackson
f5dd04b5ae Makefiles: Honour LDCONFIG from the environment
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>
2015-09-12 20:38:20 +01:00
Ian Jackson
508d6b31bd Makefiles: Do not override PREFIX or DESTDIR from the environment
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>
2015-09-12 20:38:20 +01:00
Ian Jackson
73aa8956c5 build: Introduce a variable "$sudo" and honour WIRINGPI_SUDO
We are going to want to not run sudo sometimes.  So replace literal
invocations of sudo with a variable, which is set to `sudo' by
default, but can be overridden from the environment.

No functional change if the environment variable is not set.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2015-09-12 20:38:20 +01:00
Ian Jackson
ac0f074ff7 Build system: Move template-based debian build into debian-template
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>
2015-09-12 20:38:19 +01:00
Ian Jackson
532083f474 Manpage gpio(1): Regularise header
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2015-09-12 20:38:19 +01:00
Ian Jackson
a19bfb5798 examples/blink.sh: Add missing +x bit with chmod
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2015-09-12 20:38:19 +01:00
Ian Jackson
f8a025189f Build system: Fix erroneous symlink in devLib/Makefile
The symlink libwiringPiDev.so was mistakenly created pointing to
libwiringPi.so.$(VERSION) (note lack of Dev), ie to the wrong library.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2015-09-10 00:15:29 +00:00
Ian Jackson
a6ee925df6 Build system: Fix ./build debian
We need to -I and -L the build tree directories, not the directories
in /usr/local or wheveever.  Otherwise (a) the `./debian build' fails
if wiringPi is not installed (b) if it _is_ installed, the build picks
up the installed versions rather than the versions being built, which
is wrong.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2015-09-10 00:15:29 +00:00
Ian Jackson
5f7dc3263b Build system: Remove a trailing tab from gpio/Makefile
emacs complains about this line, because it thinks lines with just a
tab on in Makefiles are suspicious.  Remove the needless tab.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2015-09-10 00:15:29 +00:00
Ian Jackson
da03f9ed2f Build system: Enable V=1 to disable @'s
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>
2015-09-10 00:15:28 +00:00
Ian Jackson
cf6f38107e Build system: Add a formulaic setting of Q from V for debugging
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>
2015-09-10 00:15:28 +00:00
Ian Jackson
2ab836ecea Build system: Add a .gitignore
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2015-09-10 00:15:28 +00:00
Ian Jackson
95a292824f Build system: Add missing set -e
So that shell scripts do not blunder on after errors.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2015-09-09 23:30:16 +00:00
Gordon Henderson
5edd177112 Updated the board types to cope with an 0014 version in the new compute module 2015-03-08 16:59:33 +00:00
Gordon Henderson
72b2af231b OK. So the Pi v2 I have had older firmware and it wasn't quite
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.
2015-02-03 14:53:32 +00:00
Gordon Henderson
7cb817498e OK, so an easier way to manage versions.
Debian package creation - crude, probably violated the Debian policys
but it seems to work just fine...
some other changes.
2015-01-31 16:43:08 +00:00
Gordon Henderson
eb1fc2c920 Updates to the build process
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
2015-01-30 18:14:49 +00:00
Gordon Henderson
51fff3cab9 Updated a technicality in softPwm, and added a suggested memset to zero
for the SPI code - it's mentioned in spidev.h but not used in the actual
kernel documentation example spi_test.c program )-:
2015-01-29 10:17:25 +00:00
Gordon Henderson
d42e831089 Updated versions for new maker - mbest 2015-01-07 14:26:17 +00:00
Gordon Henderson
0a9fdeb29d Minor changes to the PiGlow code - got the orange & yellow the right way
round at last..

Updated for the 0x0012 board revision on the new A+
2014-11-10 10:55:23 +00:00
Gordon Henderson
df45388f64 Fixed a bug in the gpio readall command on model B's (caused by a side-effect
of changing it for the B+)

Aded a gpio command: usbp hi/low - to change the usb power
2014-07-17 22:23:57 +01:00
Gordon Henderson
dca8a19fb8 Updated mostly to the gpio readall command to support the Raspberry Pi B+ 2014-07-14 08:39:38 +01:00
Gordon Henderson
0150b02478 Fixed a small bug in the ISR code where it was looking for the gpio program.
Should now work correctly on Arch, or other systems that install gpio as
/usr/bin/gpio.
2014-06-27 10:55:39 +01:00
Gordon Henderson
7cbb8865c8 Bumped version to 2.15 2014-06-24 19:25:42 +01:00
Gordon Henderson
6fba403b2f Updates for the Raspnerry Pi Compute Module - changes to the gpio program
to produce a nicer 'readall' output too.

It also understands new pins 53,54,55 and 56 in wiringPiSetupPhys()
mode to represent the pins on the P5 connector on the Rev 2 Pi's

Changes to pinMode() to allow new modes SOFT_PWM and SOFT_TONE.
2014-06-24 19:23:31 +01:00
Gordon Henderson
05e2f67e7f changed to pin mode to support softPwm.
bugfix in blink.sh - wring pin
improving the maxdetect routing - a little.
gpio pins
2014-05-20 11:43:07 +01:00
Gordon Henderson
f18c8f7204 Added some tweaks to gpio to set alt modes on pins (sssh!) 2013-08-03 23:53:35 +01:00
Gordon Henderson
43422be6ac Bumped version 2013-07-28 21:38:08 +01:00
Gordon Henderson
477f856247 It helps if you add the files into GIT... 2013-07-28 11:12:09 +01:00
Gordon Henderson
f52dd8393c Minor changes to the files and removed a bit of debug. 2013-07-28 11:05:28 +01:00
Gordon Henderson
5e16e15a59 tidied and tested DRC Serial (renamed it it drcSerial too)
Tweaked the mcp3422 code
altered the build script to let me build static
2013-07-28 10:54:32 +01:00
Gordon Henderson
e25cbc0a62 Added in the PiGlow devLib extension driver.
Written some examples for the PiGlow board
bumped wiringPi version
2013-07-24 15:14:09 +01:00
Gordon Henderson
cbf6d642b5 Added in PiGlow devLib and a couple of examples for the PiGlow
bumped version.
2013-07-23 20:25:46 +01:00
Gordon Henderson
d24cf0630b Added in the SN3218 LED controller IC - as used in the PiGlow
so write a little test program with it too.
Updated gpio to use the sn3218 too.
2013-07-23 17:52:27 +01:00
Gordon Henderson
8c8578a26b Reverted gpio readall to older version - new version is gpio nreadall
fixed the max5322 code.
2013-07-23 09:19:34 +01:00
Gordon Henderson
27afc017b9 Added in a max5322 SPI D to A chip 2013-07-16 10:37:26 +01:00
Gordon Henderson
4d43c8cdca gpio Makefile changed to add PREFIX & DESTDIR
mcp3004.c bugfixed. It works now!
2013-07-14 12:28:12 +01:00
Gordon Henderson
45bfe43c1e Typo in mcp3002.c 2013-06-30 11:55:26 +01:00
Gordon Henderson
02a3bd8d8f Readall command in gpio changed. 2013-06-27 21:57:09 +01:00
Gordon Henderson
4a379ec085 Properly added the max31855 files now 2013-06-27 21:52:42 +01:00
Gordon Henderson
27698766b2 Fixed delayMicroseconds for more than 1 second.
Added new code for max31855
2013-06-27 21:51:55 +01:00
Gordon Henderson
348bc739d1 Sorted a variable initialisation issue that was giving incorrect results
with wiringPiISR.
Added the ability to readall/reset from extension modules.
Changed the build script to use /bin/sh rather than /bin/bash as it seems
some installations don't have /bin/bash (or if they do, then the people who
are telling me that ./build gives them command not found are wrong)
2013-05-25 13:02:02 +01:00
Gordon Henderson
711017ec36 More typos, added mcp3004/mcp3008 2013-05-21 22:38:16 +01:00