Changeset - 0b86bf6808f8
[Not reviewed]
default
0 2 0
drewp - 22 years ago 2002-07-12 09:55:52

new serial port module to read the PCF8591 chip with the sliders on it
2 files changed with 13 insertions and 8 deletions:
0 comments (0 inline, 0 general)
light8/Makefile
Show inline comments
 
LIB=/usr/local/lib
 
INC=-I/usr/local/include/python2.2
 

	
 
go: parportmodule.so
 
go: parportmodule.so FlyingFader.py serportmodule.so
 
	result="your modules and links are now up to date"
 

	
 
FlyingFader.py:
 
	ln -s ../Widgets/FlyingFader.py
 
	sudo python pypar
 

	
 
parportmodule.so: parport_wrap.c
 
	gcc -shared -I/usr/local/include/python2.2 parport_wrap.c parport.c -o parportmodule.so 
 
	gcc -shared ${INC} parport_wrap.c parport.c -o parportmodule.so 
 

	
 
parport_wrap.c: parport.c parport.i
 
	swig -python parport.i
 

	
 
serportmodule.so: serport_wrap.c
 
	gcc -shared -O ${INC} serport_wrap.c -o serportmodule.so 
 

	
 
serport_wrap.c: serport.i
 
	swig -python serport.i
 

	
 
clean:
 
	rm -f parport_wrap.c *.o *.so
 
	rm -f parport_wrap.c serport_wrap.c *.o *.so
light8/serport.i
Show inline comments
 
@@ -34,10 +34,6 @@
 
    #define CHAN_TO_TUPLE_POS(chan,idx) i2c_smbus_write_byte(file, chan);\
 
    PyTuple_SetItem(t,idx,PyInt_FromLong(i2c_smbus_read_byte(file)));
 

	
 
    /*
 
      these are shuffled here to match the way the pots read in. in
 
      the returned tuple, 0=left pot..3=right pot.
 
    */
 
    CHAN_TO_TUPLE_POS(1,0)
 
    CHAN_TO_TUPLE_POS(2,1)
 
    CHAN_TO_TUPLE_POS(3,2)
0 comments (0 inline, 0 general)