Example #1
0
 def setSelect(self, level):
     """select bit"""
     if level:
         self.ctrlReg = self.ctrlReg & ~0x08
     else:
         self.ctrlReg = self.ctrlReg |  0x08
     _pyparallel.outp(self.ctrlRegAdr, self.ctrlReg)
Example #2
0
 def setInitOut(self, level):
     """initialize bit"""
     if level:
         self.ctrlReg = self.ctrlReg |  0x04
     else:
         self.ctrlReg = self.ctrlReg & ~0x04
     _pyparallel.outp(self.ctrlRegAdr, self.ctrlReg)
Example #3
0
 def setDataStrobe(self, level):
     """data strobe bit"""
     if level:
         self.ctrlReg = self.ctrlReg & ~0x01
     else:
         self.ctrlReg = self.ctrlReg |  0x01
     _pyparallel.outp(self.ctrlRegAdr, self.ctrlReg)
Example #4
0
 def setAutoFeed(self, level):
     """auto feed bit"""
     if level:
         self.ctrlReg = self.ctrlReg & ~0x02
     else:
         self.ctrlReg = self.ctrlReg |  0x02
     _pyparallel.outp(self.ctrlRegAdr, self.ctrlReg)
Example #5
0
 def setData(self, value):
     _pyparallel.outp(self.dataRegAdr, value)