def writeRegisterField(self, field, value): return self.writeRegister( field[0], TMC_helpers.field_set(self.readRegister(field[0]), field[1], field[2], value))
def set_gpio(self, idx, gpio): self.set_gpios( TMC_helpers.field_set(self.get_gpios(), (1 << idx), idx, gpio))
def set_direction(self, idx, direction): self.set_directions( TMC_helpers.field_set(self.get_directions(), (1 << idx), idx, direction))
def set_pullup(self, idx, pullup): self.set_pullups( TMC_helpers.field_set(self.get_pullups(), (1 << idx), idx, pullup))
def writeRegisterField(self, registerAddress, value, mask, shift): return self.writeRegister( registerAddress, TMC_helpers.field_set(self.readRegister(registerAddress), mask, shift, value))