24 #ifndef __WIRING_PI_H__
25 #define __WIRING_PI_H__
33 # define FALSE (!TRUE)
38 #define UNU __attribute__((unused))
43 #define PI_GPIO_MASK (0xFFFFFFC0)
49 #define WPI_MODE_PINS 0
50 #define WPI_MODE_GPIO 1
51 #define WPI_MODE_GPIO_SYS 2
52 #define WPI_MODE_PHYS 3
53 #define WPI_MODE_PIFACE 4
54 #define WPI_MODE_UNINITIALISED -1
62 #define SOFT_PWM_OUTPUT 4
63 #define SOFT_TONE_OUTPUT 5
64 #define PWM_TONE_OUTPUT 6
78 #define PWM_MODE_BAL 1
82 #define INT_EDGE_SETUP 0
83 #define INT_EDGE_FALLING 1
84 #define INT_EDGE_RISING 2
85 #define INT_EDGE_BOTH 3
99 #define PI_MODEL_ZERO 9
100 #define PI_MODEL_CM3 10
101 #define PI_MODEL_ZERO_W 12
102 #define PI_MODEL_3BP 13
103 #define PI_MODEL_3AP 14
104 #define PI_MODEL_CM3P 16
106 #define PI_VERSION_1 0
107 #define PI_VERSION_1_1 1
108 #define PI_VERSION_1_2 2
109 #define PI_VERSION_2 3
111 #define PI_MAKER_SONY 0
112 #define PI_MAKER_EGOMAN 1
113 #define PI_MAKER_EMBEST 2
114 #define PI_MAKER_UNKNOWN 3
126 #define PI_THREAD(X) void *X (UNU void *dummy)
130 #define WPI_FATAL (1==1)
131 #define WPI_ALMOST (1==2)
204 extern void pinMode (
int pin,
int mode) ;
210 extern void pwmWrite (
int pin,
int value) ;
224 extern void piBoardId (
int *model,
int *rev,
int *mem,
int *maker,
int *overVolted) ;
228 extern int getAlt (
int pin) ;
243 extern int wiringPiISR (
int pin,
int mode,
void (*
function)(
void)) ;
248 extern void piLock (
int key) ;
253 extern int piHiPri (
const int pri) ;
257 extern void delay (
unsigned int howLong) ;
259 extern unsigned int millis (
void) ;
260 extern unsigned int micros (
void) ;
struct wiringPiNodeStruct * wiringPiNewNode(int pinBase, int numPins)
Definition: wiringPi.c:1320
struct wiringPiNodeStruct * wiringPiFindNode(int pin)
Definition: wiringPi.c:1290
unsigned int digitalReadByte2(void)
Definition: wiringPi.c:1855
unsigned int data2
Definition: wiringPi.h:150
void pwmToneWrite(int pin, int freq)
Definition: wiringPi.c:1730
void pinMode(int pin, int mode)
Definition: wiringPi.c:1415
int wiringPiFailure(int fatal, const char *message,...)
Definition: wiringPi.c:649
int pinMax
Definition: wiringPi.h:145
tuple fn
Definition: owgeneric_arduino.py:218
struct wiringPiNodeStruct * wiringPiNodes
Definition: wiringPi.c:90
const char * piRevisionNames[16]
Definition: wiringPi.c:245
void pullUpDnControl(int pin, int pud)
Definition: wiringPi.c:1496
const char * piModelNames[20]
Definition: wiringPi.c:221
void(* pwmWrite)(struct wiringPiNodeStruct *node, int pin, int value)
Definition: wiringPi.h:159
void digitalWrite(int pin, int value)
Definition: wiringPi.c:1596
int piHiPri(const int pri)
Definition: piHiPri.c:39
void digitalWriteByte(int value)
Definition: wiringPi.c:1764
int wiringPiSetupPiFaceForGpioProg(void)
void pinModeAlt(int pin, int mode)
Definition: wiringPi.c:1386
struct wiringPiNodeStruct * next
Definition: wiringPi.h:163
void wiringPiVersion(int *major, int *minor)
Definition: wiringPi.c:2197
void analogWrite(int pin, int value)
Definition: wiringPi.c:1712
volatile unsigned int * _wiringPiClk
Definition: wiringPi.c:202
int piBoardRev(void)
Definition: wiringPi.c:872
int wiringPiSetup(void)
Definition: wiringPi.c:2215
unsigned int digitalReadByte(void)
Definition: wiringPi.c:1797
int pinBase
Definition: wiringPi.h:144
const char * piMakerNames[16]
Definition: wiringPi.c:265
int digitalRead(int pin)
Definition: wiringPi.c:1532
unsigned int data0
Definition: wiringPi.h:148
unsigned int digitalRead8(int pin)
int wiringPiISR(int pin, int mode, void(*function)(void))
Definition: wiringPi.c:1954
volatile unsigned int * _wiringPiGpio
Definition: wiringPi.c:200
void pwmSetMode(int mode)
Definition: wiringPi.c:1172
const int piMemorySize[8]
Definition: wiringPi.c:285
int physPinToGpio(int physPin)
Definition: wiringPi.c:1104
volatile unsigned int * _wiringPiTimerIrqRaw
Definition: wiringPi.c:205
int getAlt(int pin)
Definition: wiringPi.c:1144
int(* analogRead)(struct wiringPiNodeStruct *node, int pin)
Definition: wiringPi.h:160
unsigned int micros(void)
Definition: main.cpp:258
void gpioClockSet(int pin, int freq)
Definition: wiringPi.c:1255
volatile unsigned int * _wiringPiTimer
Definition: wiringPi.c:204
void(* pinMode)(struct wiringPiNodeStruct *node, int pin, int mode)
Definition: wiringPi.h:153
int wiringPiSetupSys(void)
Definition: wiringPi.c:2412
unsigned int millis(void)
Definition: main.cpp:251
void pwmSetClock(int divisor)
Definition: wiringPi.c:1209
void(* pullUpDnControl)(struct wiringPiNodeStruct *node, int pin, int mode)
Definition: wiringPi.h:154
void(* analogWrite)(struct wiringPiNodeStruct *node, int pin, int value)
Definition: wiringPi.h:161
int fd
Definition: wiringPi.h:147
int piGpioLayout(void)
Definition: wiringPi.c:737
int analogRead(int pin)
Definition: wiringPi.c:1693
uint16_t freq[18]
Definition: Due_AS7265X_Spectrometer.ino:33
void piLock(int key)
Definition: piThread.c:54
int wiringPiSetupPhys(void)
Definition: wiringPi.c:2390
unsigned int data3
Definition: wiringPi.h:151
volatile unsigned int * _wiringPiPads
Definition: wiringPi.c:203
Definition: wiringPi.h:142
volatile unsigned int * _wiringPiPwm
Definition: wiringPi.c:201
void pwmSetRange(unsigned int range)
Definition: wiringPi.c:1191
int(* digitalRead)(struct wiringPiNodeStruct *node, int pin)
Definition: wiringPi.h:155
void(* digitalWrite)(struct wiringPiNodeStruct *node, int pin, int value)
Definition: wiringPi.h:157
int wiringPiSetupPiFace(void)
void setPadDrive(int group, int value)
Definition: wiringPi.c:1116
void delay(unsigned int howLong)
Definition: wiringPi.c:2076
void digitalWrite8(int pin, int value)
int wiringPiSetupGpio(void)
Definition: wiringPi.c:2368
int piThreadCreate(void *(*fn)(void *))
Definition: piThread.c:39
void pwmWrite(int pin, int value)
Definition: wiringPi.c:1659
void piBoardId(int *model, int *rev, int *mem, int *maker, int *overVolted)
Definition: wiringPi.c:946
int wpiPinToGpio(int wpiPin)
Definition: wiringPi.c:1091
void piUnlock(int key)
Definition: piThread.c:59
void digitalWriteByte2(int value)
Definition: wiringPi.c:1834
void delayMicroseconds(unsigned int howLong)
Definition: wiringPi.c:2118
unsigned int data1
Definition: wiringPi.h:149
mode
Definition: onewire.c:520
int waitForInterrupt(int pin, int mS)
Definition: wiringPi.c:1885