forked from Gadgetoid/WiringPi-Python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wiringpi.i
57 lines (46 loc) · 2.12 KB
/
wiringpi.i
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
%module wiringpi
%apply unsigned char { uint8_t };
extern int wiringPiSetup (void) ;
extern int wiringPiSetupSys (void) ;
extern int wiringPiSetupGpio (void) ;
extern void pullUpDnControl (int pin, int pud) ;
extern void pinMode (int pin, int mode) ;
extern void digitalWrite (int pin, int value) ;
extern void pwmWrite (int pin, int value) ;
extern void pwmSetMode (int mode) ;
extern void pwmSetRange (unsigned int range) ;
extern void pwmSetClock (int divisor) ;
extern int digitalRead (int pin) ;
extern void shiftOut (uint8_t dPin, uint8_t cPin, uint8_t order, uint8_t val);
extern uint8_t shiftIn (uint8_t dPin, uint8_t cPin, uint8_t order);
extern void delay (unsigned int howLong) ;
extern void delayMicroseconds (unsigned int howLong) ;
extern unsigned int millis (void) ;
extern int serialOpen (char *device, int baud) ;
extern void serialClose (int fd) ;
extern void serialPutchar (int fd, uint8_t c) ;
extern void serialPuts (int fd, char *s) ;
extern int serialDataAvail (int fd) ;
extern int serialGetchar (int fd) ;
extern void serialPrintf (int fd, char *message, ...) ;
extern int wiringPiSPIGetFd (int channel) ;
extern int wiringPiSPIDataRW (int channel, unsigned char *data, int len) ;
extern int wiringPiSPISetup (int channel, int speed) ;
extern void gertboardAnalogWrite (int chan, int value) ;
extern int gertboardAnalogRead (int chan) ;
extern int gertboardSPISetup (void) ;
extern int setupNesJoystick (int dPin, int cPin, int lPin) ;
extern unsigned int readNesJoystick (int joystick) ;
extern int softPwmCreate (int pin, int value, int range) ;
extern void softPwmWrite (int pin, int value) ;
extern int waitForInterrupt(int pin, int mS) ;
%{
#include "WiringPi/wiringPi/wiringPi.h"
#include "WiringPi/wiringPi/wiringShift.h"
#include "WiringPi/wiringPi/wiringSerial.h"
#include "WiringPi/wiringPi/gertboard.h"
#include "WiringPi/wiringPi/wiringPiSPI.h"
#include "WiringPi/wiringPi/softPwm.h"
#include "WiringPi/wiringPi/piNes.h"
#include "WiringPi/wiringPi/lcd.h"
%}