A new version of wiringPi. Added in more stuff and fixed it up

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.
This commit is contained in:
Gordon Henderson
2016-12-12 14:19:55 +00:00
parent b0a60c3302
commit b1dfc186ef
37 changed files with 1255 additions and 291 deletions

View File

@@ -28,6 +28,7 @@
#include <errno.h>
#include <string.h>
#include <sys/ioctl.h>
#include <asm/ioctl.h>
#include <linux/spi/spidev.h>
#include "wiringPi.h"
@@ -38,10 +39,10 @@
// The SPI bus parameters
// Variables as they need to be passed as pointers later on
const static char *spiDev0 = "/dev/spidev0.0" ;
const static char *spiDev1 = "/dev/spidev0.1" ;
const static uint8_t spiBPW = 8 ;
const static uint16_t spiDelay = 0 ;
static const char *spiDev0 = "/dev/spidev0.0" ;
static const char *spiDev1 = "/dev/spidev0.1" ;
static const uint8_t spiBPW = 8 ;
static const uint16_t spiDelay = 0 ;
static uint32_t spiSpeeds [2] ;
static int spiFds [2] ;