# HG changeset patch # User drewp # Date 1026467752 0 # Node ID 0b86bf6808f8765cb0c2270f571b7a767207b1a2 # Parent 2dfae9ed1cdab4e679d993703cf1e45ec8766810 new serial port module to read the PCF8591 chip with the sliders on it diff -r 2dfae9ed1cda -r 0b86bf6808f8 light8/Makefile --- a/light8/Makefile Thu Jul 11 15:54:24 2002 +0000 +++ b/light8/Makefile Fri Jul 12 09:55:52 2002 +0000 @@ -1,14 +1,23 @@ 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 diff -r 2dfae9ed1cda -r 0b86bf6808f8 light8/serport.i --- a/light8/serport.i Thu Jul 11 15:54:24 2002 +0000 +++ b/light8/serport.i Fri Jul 12 09:55:52 2002 +0000 @@ -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)