code: func (m *MCP23017Driver) read(reg uint8) (val uint8, err error) {
  	buf := []byte{0}
  	if _, err := m.connection.Write([]uint8{reg}); err != nil {
  		return val, err
  	}
  	bytesRead, err := m.connection.Read(buf)
  	if err != nil {
  		return val, err
  	}
  	if bytesRead != 1 {
  		err = ErrNotEnoughBytes
  		return
  	}
  	if debug {
  		log.Printf("reading: MCP address: 0x%X, register:0x%X,value: 0x%X\n", m.GetAddressOrDefault(mcp23017Address), reg, buf)
  	}
  	return buf[0], nil
  }
docs: // read get the data from a given register