def METHOD_NAME(self, length):
    config = self.reg_read(CONFIG) & ~(CRCO | EN_CRC)
    if length == 0:
        pass
    elif length == 1:
        config |= EN_CRC
    else:
        config |= EN_CRC | CRCO
    self.reg_write(CONFIG, config)