sketchbook
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Classes | Macros | Functions | Variables
wiringPi.h File Reference

Go to the source code of this file.

Classes

struct  wiringPiNodeStruct
 

Macros

#define TRUE   (1==1)
 
#define FALSE   (!TRUE)
 
#define UNU   __attribute__((unused))
 
#define PI_GPIO_MASK   (0xFFFFFFC0)
 
#define WPI_MODE_PINS   0
 
#define WPI_MODE_GPIO   1
 
#define WPI_MODE_GPIO_SYS   2
 
#define WPI_MODE_PHYS   3
 
#define WPI_MODE_PIFACE   4
 
#define WPI_MODE_UNINITIALISED   -1
 
#define INPUT   0
 
#define OUTPUT   1
 
#define PWM_OUTPUT   2
 
#define GPIO_CLOCK   3
 
#define SOFT_PWM_OUTPUT   4
 
#define SOFT_TONE_OUTPUT   5
 
#define PWM_TONE_OUTPUT   6
 
#define LOW   0
 
#define HIGH   1
 
#define PUD_OFF   0
 
#define PUD_DOWN   1
 
#define PUD_UP   2
 
#define PWM_MODE_MS   0
 
#define PWM_MODE_BAL   1
 
#define INT_EDGE_SETUP   0
 
#define INT_EDGE_FALLING   1
 
#define INT_EDGE_RISING   2
 
#define INT_EDGE_BOTH   3
 
#define PI_MODEL_A   0
 
#define PI_MODEL_B   1
 
#define PI_MODEL_AP   2
 
#define PI_MODEL_BP   3
 
#define PI_MODEL_2   4
 
#define PI_ALPHA   5
 
#define PI_MODEL_CM   6
 
#define PI_MODEL_07   7
 
#define PI_MODEL_3B   8
 
#define PI_MODEL_ZERO   9
 
#define PI_MODEL_CM3   10
 
#define PI_MODEL_ZERO_W   12
 
#define PI_MODEL_3BP   13
 
#define PI_MODEL_3AP   14
 
#define PI_MODEL_CM3P   16
 
#define PI_VERSION_1   0
 
#define PI_VERSION_1_1   1
 
#define PI_VERSION_1_2   2
 
#define PI_VERSION_2   3
 
#define PI_MAKER_SONY   0
 
#define PI_MAKER_EGOMAN   1
 
#define PI_MAKER_EMBEST   2
 
#define PI_MAKER_UNKNOWN   3
 
#define PI_THREAD(X)   void *X (UNU void *dummy)
 
#define WPI_FATAL   (1==1)
 
#define WPI_ALMOST   (1==2)
 

Functions

int wiringPiFailure (int fatal, const char *message,...)
 
struct wiringPiNodeStructwiringPiFindNode (int pin)
 
struct wiringPiNodeStructwiringPiNewNode (int pinBase, int numPins)
 
void wiringPiVersion (int *major, int *minor)
 
int wiringPiSetup (void)
 
int wiringPiSetupSys (void)
 
int wiringPiSetupGpio (void)
 
int wiringPiSetupPhys (void)
 
void pinModeAlt (int pin, int mode)
 
void pinMode (int pin, int mode)
 
void pullUpDnControl (int pin, int pud)
 
int digitalRead (int pin)
 
void digitalWrite (int pin, int value)
 
unsigned int digitalRead8 (int pin)
 
void digitalWrite8 (int pin, int value)
 
void pwmWrite (int pin, int value)
 
int analogRead (int pin)
 
void analogWrite (int pin, int value)
 
int wiringPiSetupPiFace (void)
 
int wiringPiSetupPiFaceForGpioProg (void)
 
int piGpioLayout (void)
 
int piBoardRev (void)
 
void piBoardId (int *model, int *rev, int *mem, int *maker, int *overVolted)
 
int wpiPinToGpio (int wpiPin)
 
int physPinToGpio (int physPin)
 
void setPadDrive (int group, int value)
 
int getAlt (int pin)
 
void pwmToneWrite (int pin, int freq)
 
void pwmSetMode (int mode)
 
void pwmSetRange (unsigned int range)
 
void pwmSetClock (int divisor)
 
void gpioClockSet (int pin, int freq)
 
unsigned int digitalReadByte (void)
 
unsigned int digitalReadByte2 (void)
 
void digitalWriteByte (int value)
 
void digitalWriteByte2 (int value)
 
int waitForInterrupt (int pin, int mS)
 
int wiringPiISR (int pin, int mode, void(*function)(void))
 
int piThreadCreate (void *(*fn)(void *))
 
void piLock (int key)
 
void piUnlock (int key)
 
int piHiPri (const int pri)
 
void delay (unsigned int howLong)
 
void delayMicroseconds (unsigned int howLong)
 
unsigned int millis (void)
 
unsigned int micros (void)
 

Variables

const char * piModelNames [20]
 
const char * piRevisionNames [16]
 
const char * piMakerNames [16]
 
const int piMemorySize [8]
 
struct wiringPiNodeStructwiringPiNodes
 
volatile unsigned int * _wiringPiGpio
 
volatile unsigned int * _wiringPiPwm
 
volatile unsigned int * _wiringPiClk
 
volatile unsigned int * _wiringPiPads
 
volatile unsigned int * _wiringPiTimer
 
volatile unsigned int * _wiringPiTimerIrqRaw
 

Macro Definition Documentation

#define FALSE   (!TRUE)
#define GPIO_CLOCK   3
#define HIGH   1
#define INPUT   0
#define INT_EDGE_BOTH   3
#define INT_EDGE_FALLING   1
#define INT_EDGE_RISING   2
#define INT_EDGE_SETUP   0
#define LOW   0
#define OUTPUT   1
#define PI_ALPHA   5
#define PI_GPIO_MASK   (0xFFFFFFC0)
#define PI_MAKER_EGOMAN   1
#define PI_MAKER_EMBEST   2
#define PI_MAKER_SONY   0
#define PI_MAKER_UNKNOWN   3
#define PI_MODEL_07   7
#define PI_MODEL_2   4
#define PI_MODEL_3AP   14
#define PI_MODEL_3B   8
#define PI_MODEL_3BP   13
#define PI_MODEL_A   0
#define PI_MODEL_AP   2
#define PI_MODEL_B   1
#define PI_MODEL_BP   3
#define PI_MODEL_CM   6
#define PI_MODEL_CM3   10
#define PI_MODEL_CM3P   16
#define PI_MODEL_ZERO   9
#define PI_MODEL_ZERO_W   12
#define PI_THREAD (   X)    void *X (UNU void *dummy)
#define PI_VERSION_1   0
#define PI_VERSION_1_1   1
#define PI_VERSION_1_2   2
#define PI_VERSION_2   3
#define PUD_DOWN   1
#define PUD_OFF   0
#define PUD_UP   2
#define PWM_MODE_BAL   1
#define PWM_MODE_MS   0
#define PWM_OUTPUT   2
#define PWM_TONE_OUTPUT   6
#define SOFT_PWM_OUTPUT   4
#define SOFT_TONE_OUTPUT   5
#define TRUE   (1==1)
#define UNU   __attribute__((unused))
#define WPI_ALMOST   (1==2)
#define WPI_FATAL   (1==1)
#define WPI_MODE_GPIO   1
#define WPI_MODE_GPIO_SYS   2
#define WPI_MODE_PHYS   3
#define WPI_MODE_PIFACE   4
#define WPI_MODE_PINS   0
#define WPI_MODE_UNINITIALISED   -1

Function Documentation

int analogRead ( int  pin)
void analogWrite ( int  pin,
int  value 
)
void delay ( unsigned int  howLong)
void delayMicroseconds ( unsigned int  howLong)
int digitalRead ( int  pin)
unsigned int digitalRead8 ( int  pin)
unsigned int digitalReadByte ( void  )
unsigned int digitalReadByte2 ( void  )
void digitalWrite ( int  pin,
int  value 
)
void digitalWrite8 ( int  pin,
int  value 
)
void digitalWriteByte ( int  value)
void digitalWriteByte2 ( int  value)
int getAlt ( int  pin)
void gpioClockSet ( int  pin,
int  freq 
)
unsigned int micros ( void  )
unsigned int millis ( void  )
int physPinToGpio ( int  physPin)
void piBoardId ( int *  model,
int *  rev,
int *  mem,
int *  maker,
int *  overVolted 
)
int piBoardRev ( void  )
int piGpioLayout ( void  )
int piHiPri ( const int  pri)
void piLock ( int  key)
void pinMode ( int  pin,
int  mode 
)
void pinModeAlt ( int  pin,
int  mode 
)
int piThreadCreate ( void *(*)(void *)  fn)
void piUnlock ( int  key)
void pullUpDnControl ( int  pin,
int  pud 
)
void pwmSetClock ( int  divisor)
void pwmSetMode ( int  mode)
void pwmSetRange ( unsigned int  range)
void pwmToneWrite ( int  pin,
int  freq 
)
void pwmWrite ( int  pin,
int  value 
)
void setPadDrive ( int  group,
int  value 
)
int waitForInterrupt ( int  pin,
int  mS 
)
int wiringPiFailure ( int  fatal,
const char *  message,
  ... 
)
struct wiringPiNodeStruct* wiringPiFindNode ( int  pin)
int wiringPiISR ( int  pin,
int  mode,
void(*)(void)  function 
)
struct wiringPiNodeStruct* wiringPiNewNode ( int  pinBase,
int  numPins 
)
int wiringPiSetup ( void  )
int wiringPiSetupGpio ( void  )
int wiringPiSetupPhys ( void  )
int wiringPiSetupPiFace ( void  )
int wiringPiSetupPiFaceForGpioProg ( void  )
int wiringPiSetupSys ( void  )
void wiringPiVersion ( int *  major,
int *  minor 
)
int wpiPinToGpio ( int  wpiPin)

Variable Documentation

volatile unsigned int* _wiringPiClk
volatile unsigned int* _wiringPiGpio
volatile unsigned int* _wiringPiPads
volatile unsigned int* _wiringPiPwm
volatile unsigned int* _wiringPiTimer
volatile unsigned int* _wiringPiTimerIrqRaw
const char* piMakerNames[16]
const int piMemorySize[8]
const char* piModelNames[20]
const char* piRevisionNames[16]
struct wiringPiNodeStruct* wiringPiNodes