code: func (b *IOPinDriver) ReadPinIOConfig() (config int, err error) {
  	c, e := b.adaptor().ReadCharacteristic(pinIOConfigCharacteristic)
  	if e != nil {
  		return 0, e
  	}
  
  	var result byte
  	for i := 0; i < 4; i++ {
  		result |= c[i] << uint(i)
  	}
  
  	b.ioMask = int(result)
  	return int(result), nil
  }
docs: // ReadPinIOConfig reads and returns the pin IO config mask for all pins