Phil Howard | aee4f5d | 2016-02-28 09:54:53 +0000 | [diff] [blame^] | 1 | |
| 2 | // Header file WiringPi/wiringPi/wiringPi.h |
| 3 | extern int wiringPiFailure (int fatal, const char *message, ...) ; |
| 4 | extern struct wiringPiNodeStruct *wiringPiFindNode (int pin) ; |
| 5 | extern struct wiringPiNodeStruct *wiringPiNewNode (int pinBase, int numPins) ; |
| 6 | extern int wiringPiSetup (void) ; |
| 7 | extern int wiringPiSetupSys (void) ; |
| 8 | extern int wiringPiSetupGpio (void) ; |
| 9 | extern int wiringPiSetupPhys (void) ; |
| 10 | extern void pinModeAlt (int pin, int mode) ; |
| 11 | extern void pinMode (int pin, int mode) ; |
| 12 | extern void pullUpDnControl (int pin, int pud) ; |
| 13 | extern int digitalRead (int pin) ; |
| 14 | extern void digitalWrite (int pin, int value) ; |
| 15 | extern void pwmWrite (int pin, int value) ; |
| 16 | extern int analogRead (int pin) ; |
| 17 | extern void analogWrite (int pin, int value) ; |
| 18 | extern int wiringPiSetupPiFace (void) ; |
| 19 | extern int wiringPiSetupPiFaceForGpioProg (void) ; // Don't use this - for gpio program only |
| 20 | extern int piBoardRev (void) ; |
| 21 | extern void piBoardId (int *model, int *rev, int *mem, int *maker, int *overVolted) ; |
| 22 | extern int wpiPinToGpio (int wpiPin) ; |
| 23 | extern int physPinToGpio (int physPin) ; |
| 24 | extern void setPadDrive (int group, int value) ; |
| 25 | extern int getAlt (int pin) ; |
| 26 | extern void pwmToneWrite (int pin, int freq) ; |
| 27 | extern void digitalWriteByte (int value) ; |
| 28 | extern void pwmSetMode (int mode) ; |
| 29 | extern void pwmSetRange (unsigned int range) ; |
| 30 | extern void pwmSetClock (int divisor) ; |
| 31 | extern void gpioClockSet (int pin, int freq) ; |
| 32 | extern int waitForInterrupt (int pin, int mS) ; |
| 33 | extern int piThreadCreate (void *(*fn)(void *)) ; |
| 34 | extern void piLock (int key) ; |
| 35 | extern void piUnlock (int key) ; |
| 36 | extern int piHiPri (const int pri) ; |
| 37 | extern void delay (unsigned int howLong) ; |
| 38 | extern void delayMicroseconds (unsigned int howLong) ; |
| 39 | extern unsigned int millis (void) ; |
| 40 | extern unsigned int micros (void) ; |
| 41 | |
| 42 | // Header file WiringPi/wiringPi/wiringPiI2C.h |
| 43 | extern int wiringPiI2CRead (int fd) ; |
| 44 | extern int wiringPiI2CReadReg8 (int fd, int reg) ; |
| 45 | extern int wiringPiI2CReadReg16 (int fd, int reg) ; |
| 46 | extern int wiringPiI2CWrite (int fd, int data) ; |
| 47 | extern int wiringPiI2CWriteReg8 (int fd, int reg, int data) ; |
| 48 | extern int wiringPiI2CWriteReg16 (int fd, int reg, int data) ; |
| 49 | extern int wiringPiI2CSetupInterface (const char *device, int devId) ; |
| 50 | extern int wiringPiI2CSetup (const int devId) ; |
| 51 | |
| 52 | // Header file WiringPi/wiringPi/wiringPiSPI.h |
| 53 | int wiringPiSPIGetFd (int channel) ; |
| 54 | int wiringPiSPIDataRW (int channel, unsigned char *data, int len) ; |
| 55 | int wiringPiSPISetupMode (int channel, int speed, int mode) ; |
| 56 | int wiringPiSPISetup (int channel, int speed) ; |
| 57 | |
| 58 | // Header file WiringPi/wiringPi/wiringSerial.h |
| 59 | extern int serialOpen (const char *device, const int baud) ; |
| 60 | extern void serialClose (const int fd) ; |
| 61 | extern void serialFlush (const int fd) ; |
| 62 | extern void serialPutchar (const int fd, const unsigned char c) ; |
| 63 | extern void serialPuts (const int fd, const char *s) ; |
| 64 | extern void serialPrintf (const int fd, const char *message, ...) ; |
| 65 | extern int serialDataAvail (const int fd) ; |
| 66 | extern int serialGetchar (const int fd) ; |
| 67 | |
| 68 | // Header file WiringPi/wiringPi/wiringShift.h |
| 69 | extern uint8_t shiftIn (uint8_t dPin, uint8_t cPin, uint8_t order) ; |
| 70 | extern void shiftOut (uint8_t dPin, uint8_t cPin, uint8_t order, uint8_t val) ; |
| 71 | |
| 72 | // Header file WiringPi/wiringPi/wpiExtensions.h |
| 73 | extern int loadWPiExtension (char *progName, char *extensionData, int verbose) ; |
| 74 | |
| 75 | // Header file WiringPi/wiringPi/drcSerial.h |
| 76 | extern int drcSetupSerial (const int pinBase, const int numPins, const char *device, const int baud) ; |
| 77 | |
| 78 | // Header file WiringPi/wiringPi/max31855.h |
| 79 | extern int max31855Setup (int pinBase, int spiChannel) ; |
| 80 | |
| 81 | // Header file WiringPi/wiringPi/max5322.h |
| 82 | extern int max5322Setup (int pinBase, int spiChannel) ; |
| 83 | |
| 84 | // Header file WiringPi/wiringPi/mcp23008.h |
| 85 | extern int mcp23008Setup (const int pinBase, const int i2cAddress) ; |
| 86 | |
| 87 | // Header file WiringPi/wiringPi/mcp23016.h |
| 88 | extern int mcp23016Setup (const int pinBase, const int i2cAddress) ; |
| 89 | |
| 90 | // Header file WiringPi/wiringPi/mcp23016reg.h |
| 91 | |
| 92 | // Header file WiringPi/wiringPi/mcp23017.h |
| 93 | extern int mcp23017Setup (const int pinBase, const int i2cAddress) ; |
| 94 | |
| 95 | // Header file WiringPi/wiringPi/mcp23s08.h |
| 96 | extern int mcp23s08Setup (const int pinBase, const int spiPort, const int devId) ; |
| 97 | |
| 98 | // Header file WiringPi/wiringPi/mcp23s17.h |
| 99 | extern int mcp23s17Setup (int pinBase, int spiPort, int devId) ; |
| 100 | |
| 101 | // Header file WiringPi/wiringPi/mcp23x0817.h |
| 102 | |
| 103 | // Header file WiringPi/wiringPi/mcp23x08.h |
| 104 | |
| 105 | // Header file WiringPi/wiringPi/mcp3002.h |
| 106 | extern int mcp3002Setup (int pinBase, int spiChannel) ; |
| 107 | |
| 108 | // Header file WiringPi/wiringPi/mcp3004.h |
| 109 | extern int mcp3004Setup (int pinBase, int spiChannel) ; |
| 110 | |
| 111 | // Header file WiringPi/wiringPi/mcp3422.h |
| 112 | extern int mcp3422Setup (int pinBase, int i2cAddress, int sampleRate, int gain) ; |
| 113 | |
| 114 | // Header file WiringPi/wiringPi/mcp4802.h |
| 115 | extern int mcp4802Setup (int pinBase, int spiChannel) ; |
| 116 | |
| 117 | // Header file WiringPi/wiringPi/pcf8574.h |
| 118 | extern int pcf8574Setup (const int pinBase, const int i2cAddress) ; |
| 119 | |
| 120 | // Header file WiringPi/wiringPi/pcf8591.h |
| 121 | extern int pcf8591Setup (const int pinBase, const int i2cAddress) ; |
| 122 | |
| 123 | // Header file WiringPi/wiringPi/sn3218.h |
| 124 | extern int sn3218Setup (int pinBase) ; |
| 125 | |
| 126 | // Header file WiringPi/wiringPi/softPwm.h |
| 127 | extern int softPwmCreate (int pin, int value, int range) ; |
| 128 | extern void softPwmWrite (int pin, int value) ; |
| 129 | extern void softPwmStop (int pin) ; |
| 130 | |
| 131 | // Header file WiringPi/wiringPi/softServo.h |
| 132 | extern void softServoWrite (int pin, int value) ; |
| 133 | extern int softServoSetup (int p0, int p1, int p2, int p3, int p4, int p5, int p6, int p7) ; |
| 134 | |
| 135 | // Header file WiringPi/wiringPi/softTone.h |
| 136 | extern int softToneCreate (int pin) ; |
| 137 | extern void softToneStop (int pin) ; |
| 138 | extern void softToneWrite (int pin, int freq) ; |
| 139 | |
| 140 | // Header file WiringPi/wiringPi/sr595.h |
| 141 | extern int sr595Setup (const int pinBase, const int numPins, |
| 142 | const int dataPin, const int clockPin, const int latchPin) ; |
| 143 | |
| 144 | // Header file WiringPi/devLib/ds1302.h |
| 145 | extern unsigned int ds1302rtcRead (const int reg) ; |
| 146 | extern void ds1302rtcWrite (const int reg, const unsigned int data) ; |
| 147 | extern unsigned int ds1302ramRead (const int addr) ; |
| 148 | extern void ds1302ramWrite (const int addr, const unsigned int data) ; |
| 149 | extern void ds1302clockRead (int clockData [8]) ; |
| 150 | extern void ds1302clockWrite (const int clockData [8]) ; |
| 151 | extern void ds1302trickleCharge (const int diodes, const int resistors) ; |
| 152 | extern void ds1302setup (const int clockPin, const int dataPin, const int csPin) ; |
| 153 | |
| 154 | // Header file WiringPi/devLib/font.h |
| 155 | |
| 156 | // Header file WiringPi/devLib/gertboard.h |
| 157 | extern void gertboardAnalogWrite (const int chan, const int value) ; |
| 158 | extern int gertboardAnalogRead (const int chan) ; |
| 159 | extern int gertboardSPISetup (void) ; |
| 160 | extern int gertboardAnalogSetup (const int pinBase) ; |
| 161 | |
| 162 | // Header file WiringPi/devLib/lcd128x64.h |
| 163 | extern void lcd128x64setOrigin (int x, int y) ; |
| 164 | extern void lcd128x64setOrientation (int orientation) ; |
| 165 | extern void lcd128x64orientCoordinates (int *x, int *y) ; |
| 166 | extern void lcd128x64getScreenSize (int *x, int *y) ; |
| 167 | extern void lcd128x64point (int x, int y, int colour) ; |
| 168 | extern void lcd128x64line (int x0, int y0, int x1, int y1, int colour) ; |
| 169 | extern void lcd128x64lineTo (int x, int y, int colour) ; |
| 170 | extern void lcd128x64rectangle (int x1, int y1, int x2, int y2, int colour, int filled) ; |
| 171 | extern void lcd128x64circle (int x, int y, int r, int colour, int filled) ; |
| 172 | extern void lcd128x64ellipse (int cx, int cy, int xRadius, int yRadius, int colour, int filled) ; |
| 173 | extern void lcd128x64putchar (int x, int y, int c, int bgCol, int fgCol) ; |
| 174 | extern void lcd128x64puts (int x, int y, const char *str, int bgCol, int fgCol) ; |
| 175 | extern void lcd128x64update (void) ; |
| 176 | extern void lcd128x64clear (int colour) ; |
| 177 | extern int lcd128x64setup (void) ; |
| 178 | |
| 179 | // Header file WiringPi/devLib/lcd.h |
| 180 | extern void lcdHome (const int fd) ; |
| 181 | extern void lcdClear (const int fd) ; |
| 182 | extern void lcdDisplay (const int fd, int state) ; |
| 183 | extern void lcdCursor (const int fd, int state) ; |
| 184 | extern void lcdCursorBlink (const int fd, int state) ; |
| 185 | extern void lcdSendCommand (const int fd, unsigned char command) ; |
| 186 | extern void lcdPosition (const int fd, int x, int y) ; |
| 187 | extern void lcdCharDef (const int fd, int index, unsigned char data [8]) ; |
| 188 | extern void lcdPutchar (const int fd, unsigned char data) ; |
| 189 | extern void lcdPuts (const int fd, const char *string) ; |
| 190 | extern void lcdPrintf (const int fd, const char *message, ...) ; |
| 191 | extern int lcdInit (const int rows, const int cols, const int bits, |
| 192 | const int rs, const int strb, |
| 193 | const int d0, const int d1, const int d2, const int d3, const int d4, |
| 194 | const int d5, const int d6, const int d7) ; |
| 195 | |
| 196 | // Header file WiringPi/devLib/maxdetect.h |
| 197 | int maxDetectRead (const int pin, unsigned char buffer [4]) ; |
| 198 | int readRHT03 (const int pin, int *temp, int *rh) ; |
| 199 | |
| 200 | // Header file WiringPi/devLib/piFace.h |
| 201 | extern int piFaceSetup (const int pinBase) ; |
| 202 | |
| 203 | // Header file WiringPi/devLib/piGlow.h |
| 204 | extern void piGlow1 (const int leg, const int ring, const int intensity) ; |
| 205 | extern void piGlowLeg (const int leg, const int intensity) ; |
| 206 | extern void piGlowRing (const int ring, const int intensity) ; |
| 207 | extern void piGlowSetup (int clear) ; |
| 208 | |
| 209 | // Header file WiringPi/devLib/piNes.h |
| 210 | extern int setupNesJoystick (int dPin, int cPin, int lPin) ; |
| 211 | extern unsigned int readNesJoystick (int joystick) ; |