Changeset - 0459cecf8145
[Not reviewed]
default
0 1 0
drewp - 22 years ago 2002-07-13 02:28:45

added missing imports and constants to SerialPots
1 file changed with 4 insertions and 0 deletions:
0 comments (0 inline, 0 general)
light8/io.py
Show inline comments
 

	
 

	
 
class BaseIO:
 
    def __init__(self):
 
        self.dummy=1
 
        self.__name__ = 'BaseIO'
 
        # please override and set __name__ to your class name
 
@@ -73,12 +74,15 @@ class SerialPots(BaseIO):
 
        
 
        self.f = open("/dev/i2c-0","rw")
 

	
 
        # this is for a chip with A0,A1,A2 lines all low:
 
        port = 72
 

	
 
        from fcntl import *
 

	
 
        I2C_SLAVE = 0x0703  #/* Change slave address                 */
 
        ioctl(self.f,I2C_SLAVE,port)
 
        self.dummy=0
 

	
 
    def godummy(self):
 
        BaseIO.godummy(self)
 
        self.f.close()
0 comments (0 inline, 0 general)