mirror of
https://github.com/clockworkpi/WiringPi.git
synced 2026-06-15 07:07:14 +02:00
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:
@@ -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] ;
|
||||
|
||||
Reference in New Issue
Block a user