def pportTristate(state):
 global ctrlReg
 if (state == 0):
  ctrlReg = (ctrlReg & (~ 16))
 else:
  ctrlReg = (ctrlReg | 16)
 port.DlPortWritePortUchar(ctrlRegAdrs, ctrlReg)

def pportTristate ( state ) : global ctrlReg if ( state == 0 ) : ctrlReg = ( ctrlReg & ( ~ 16 ) ) else : ctrlReg = ( ctrlReg | 16 ) port . DlPortWritePortUchar ( ctrlRegAdrs , ctrlReg )
toggle tristate output bit .