tinygo.org/x/drivers@v0.27.1-0.20240509133757-7dbca2a54349/tester/device.go (about)

     1  package tester
     2  
     3  // MaxRegisters is the maximum number of registers supported for a Device.
     4  const MaxRegisters = 255
     5  
     6  type I2CDevice interface {
     7  	// ReadRegister implements I2C.ReadRegister.
     8  	readRegister(r uint8, buf []byte) error
     9  
    10  	// WriteRegister implements I2C.WriteRegister.
    11  	writeRegister(r uint8, buf []byte) error
    12  
    13  	// Tx implements I2C.Tx
    14  	Tx(w, r []byte) error
    15  
    16  	// Addr returns the Device address.
    17  	Addr() uint8
    18  }