twi: Add functions to set and read bits in registers on i2c slave