def invertDataBit(bit):
 global dataReg
 dataReg = (dataReg ^ (2 ** bit))
 port.DlPortWritePortUchar(baseAddress, dataReg)

def invertDataBit ( bit ) : global dataReg dataReg = ( dataReg ^ ( 2 ** bit ) ) port . DlPortWritePortUchar ( baseAddress , dataReg )
inverts any data register bit .