blob: 106d9dbf9dd6f74cd3b7e79974fc313e6c78515b [file] [log] [blame]
Philip Howard6ae3e5b2013-05-21 22:48:41 +01001extern unsigned int ds1302rtcRead (const int reg) ;
2extern void ds1302rtcWrite (const int reg, const unsigned int data) ;
3extern unsigned int ds1302ramRead (const int addr) ;
4extern void ds1302ramWrite (const int addr, const unsigned int data) ;
5extern void ds1302clockRead (int clockData [8]) ;
6extern void ds1302clockWrite (const int clockData [8]) ;
7extern void ds1302trickleCharge (const int diodes, const int resistors) ;
8extern void ds1302setup (const int clockPin, const int dataPin, const int csPin) ;
9extern void gertboardAnalogWrite (const int chan, const int value) ;
10extern int gertboardAnalogRead (const int chan) ;
11extern int gertboardSPISetup (void) ;
12extern int gertboardAnalogSetup (const int pinBase) ;
13extern void lcd128x64setOrigin (int x, int y) ;
14extern void lcd128x64setOrientation (int orientation) ;
15extern void lcd128x64orientCoordinates (int *x, int *y) ;
16extern void lcd128x64getScreenSize (int *x, int *y) ;
17extern void lcd128x64point (int x, int y, int colour) ;
18extern void lcd128x64line (int x0, int y0, int x1, int y1, int colour) ;
19extern void lcd128x64lineTo (int x, int y, int colour) ;
20extern void lcd128x64rectangle (int x1, int y1, int x2, int y2, int colour, int filled) ;
21extern void lcd128x64circle (int x, int y, int r, int colour, int filled) ;
22extern void lcd128x64ellipse (int cx, int cy, int xRadius, int yRadius, int colour, int filled) ;
23extern void lcd128x64putchar (int x, int y, int c, int bgCol, int fgCol) ;
24extern void lcd128x64puts (int x, int y, const char *str, int bgCol, int fgCol) ;
25extern void lcd128x64update (void) ;
26extern void lcd128x64clear (int colour) ;
27extern int lcd128x64setup (void) ;
28extern void lcdHome (const int fd) ;
29extern void lcdClear (const int fd) ;
30extern void lcdDisplay (const int fd, int state) ;
31extern void lcdCursor (const int fd, int state) ;
32extern void lcdCursorBlink (const int fd, int state) ;
33extern void lcdSendCommand (const int fd, unsigned char command) ;
34extern void lcdPosition (const int fd, int x, int y) ;
35extern void lcdCharDef (const int fd, int index, unsigned char data [8]) ;
36extern void lcdPutchar (const int fd, unsigned char data) ;
37extern void lcdPuts (const int fd, const char *string) ;
38extern void lcdPrintf (const int fd, const char *message, ...) ;
39extern int lcdInit (const int rows, const int cols, const int bits,
40extern int piFaceSetup (const int pinBase) ;
41extern int setupNesJoystick (int dPin, int cPin, int lPin) ;
42extern unsigned int readNesJoystick (int joystick) ;
43extern int doExtension (char *progName, char *extensionData) ;
44extern int mcp23008Setup (const int pinBase, const int i2cAddress) ;
45extern int mcp23016Setup (const int pinBase, const int i2cAddress) ;
46extern int mcp23017Setup (const int pinBase, const int i2cAddress) ;
47extern int mcp23s08Setup (const int pinBase, const int spiPort, const int devId) ;
48extern int mcp23s17Setup (int pinBase, int spiPort, int devId) ;
49extern int mcp3002Setup (int pinBase, int spiChannel) ;
50extern int mcp3422Setup (int pinBase, int i2cAddress, int channels, int sampleRate, int gain) ;
51extern int mcp4802Setup (int pinBase, int spiChannel) ;
52extern int pcf8574Setup (const int pinBase, const int i2cAddress) ;
53extern int pcf8591Setup (const int pinBase, const int i2cAddress) ;
54extern int softPwmCreate (int pin, int value, int range) ;
55extern void softPwmWrite (int pin, int value) ;
56extern void softServoWrite (int pin, int value) ;
57extern int softServoSetup (int p0, int p1, int p2, int p3, int p4, int p5, int p6, int p7) ;
58extern int softToneCreate (int pin) ;
59extern void softToneWrite (int pin, int freq) ;
60extern int sr595Setup (const int pinBase, const int numPins,
61extern int wiringPiFailure (int fatal, const char *message, ...) ;
62extern struct wiringPiNodeStruct *wiringPiNewNode (int pinBase, int numPins) ;
63extern int wiringPiSetup (void) ;
64extern int wiringPiSetupSys (void) ;
65extern int wiringPiSetupGpio (void) ;
66extern int wiringPiSetupPhys (void) ;
67extern void pinMode (int pin, int mode) ;
68extern void pullUpDnControl (int pin, int pud) ;
69extern int digitalRead (int pin) ;
70extern void digitalWrite (int pin, int value) ;
71extern void pwmWrite (int pin, int value) ;
72extern int analogRead (int pin) ;
73extern void analogWrite (int pin, int value) ;
74extern int wiringPiSetupPiFace (void) ;
75extern int wiringPiSetupPiFaceForGpioProg (void) ; // Don't use this - for gpio program only
76extern int piBoardRev (void) ;
77extern int wpiPinToGpio (int wpiPin) ;
78extern int physPinToGpio (int physPin) ;
79extern void setPadDrive (int group, int value) ;
80extern int getAlt (int pin) ;
81extern void digitalWriteByte (int value) ;
82extern void pwmSetMode (int mode) ;
83extern void pwmSetRange (unsigned int range) ;
84extern void pwmSetClock (int divisor) ;
85extern void gpioClockSet (int pin, int freq) ;
86extern int waitForInterrupt (int pin, int mS) ;
87extern int wiringPiISR (int pin, int mode, void (*function)(void)) ;
88extern int piThreadCreate (void *(*fn)(void *)) ;
89extern void piLock (int key) ;
90extern void piUnlock (int key) ;
91extern int piHiPri (const int pri) ;
92extern void delay (unsigned int howLong) ;
93extern void delayMicroseconds (unsigned int howLong) ;
94extern unsigned int millis (void) ;
95extern unsigned int micros (void) ;
96extern int wiringPiI2CRead (int fd) ;
97extern int wiringPiI2CReadReg8 (int fd, int reg) ;
98extern int wiringPiI2CReadReg16 (int fd, int reg) ;
99extern int wiringPiI2CWrite (int fd, int data) ;
100extern int wiringPiI2CWriteReg8 (int fd, int reg, int data) ;
101extern int wiringPiI2CWriteReg16 (int fd, int reg, int data) ;
102extern int wiringPiI2CSetupInterface (const char *device, int devId) ;
103extern int wiringPiI2CSetup (const int devId) ;
104extern int serialOpen (const char *device, const int baud) ;
105extern void serialClose (const int fd) ;
106extern void serialFlush (const int fd) ;
107extern void serialPutchar (const int fd, const unsigned char c) ;
108extern void serialPuts (const int fd, const char *s) ;
109extern void serialPrintf (const int fd, const char *message, ...) ;
110extern int serialDataAvail (const int fd) ;
111extern int serialGetchar (const int fd) ;
112extern uint8_t shiftIn (uint8_t dPin, uint8_t cPin, uint8_t order) ;
113extern void shiftOut (uint8_t dPin, uint8_t cPin, uint8_t order, uint8_t val) ;