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!)
This commit is contained in:
Gordon Henderson
2015-09-30 16:11:42 +01:00
parent f6c40cb2a6
commit d79506694d
9 changed files with 80 additions and 11 deletions

View File

@@ -37,7 +37,7 @@ INCLUDE = -I$(DESTDIR)$(PREFIX)/include
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
LDFLAGS = -L$(DESTDIR)$(PREFIX)/lib
LIBS = -lwiringPi -lwiringPiDev -lpthread -lm
LIBS = -lwiringPi -lwiringPiDev -lpthread
# May not need to alter anything below this line
###############################################################################

View File

@@ -260,7 +260,7 @@ raspi-config program to load/unload the I2C device at boot time.
This loads the spi drivers into the kernel and changes the permissions
on the associated /dev/ entries so that the current user has access to
them. It used to have the ability to change the buffer size from the
default of 4096 bytes to an arbitary value, however for some time the
default of 4096 bytes to an arbitrary value, however for some time the
Pi Foundation have compiled the SPI device driver into the kernel and
this has fixed the buffer size. The way to change it now is to edit
the /boot/cmdline.txt file and add on spdev.bufsiz=8192 to set it to
@@ -321,6 +321,18 @@ When using the \fIexport\fR, \fIedge\fR or \fIunexport\fR commands, the
pin numbers are \fBalways\fR native BCM_GPIO numbers and never wiringPi
pin numbers.
As of kernels 4.1.7, a user-level GPIO access mechanism is available,
however wiringPi will not use this by default - because at this time
there appears to be issues when trying to program the PWM or clock output
hardware. If you can live without PWM or GPIO clocks and you want to use
the GPIO from a non-root program, then you need to make sure that the
module \fIbcm2835_gpiomem\fR is loaded at boot time. This should happen
automatically when you enable the device tree in raspi-config. You may
also need some additional information in /etc/udev/rules.d/ to change the
mode and ownership of the /dev/gpiomem file. Finally, you need to set
the environment variable \fIWIRINGPI_GPIOMEM\fR. This will go-away
in future releases once the /dev/gpiomem interface is fully operational.
.SH "SEE ALSO"
.LP

View File

@@ -1223,7 +1223,10 @@ int main (int argc, char *argv [])
printf (" Device tree is enabled.\n") ;
if (stat ("/dev/gpiomem", &statBuf) == 0) // User level GPIO is GO
{
printf (" This Raspberry Pi supports user-level GPIO access.\n") ;
printf (" -> See the man-page for more details\n") ;
}
else
printf (" * Root or sudo required for GPIO access.\n") ;

View File

@@ -1 +1 @@
#define VERSION "2.28"
#define VERSION "2.29"