code: func ReadPin(pin Pin) State {
  	// Input level register offset (13 / 14 depending on bank)
  	levelReg := uint8(pin)/32 + 13
  
  	if (gpioMem[levelReg] & (1 << uint8(pin&31))) != 0 {
  		return High
  	}
  
  	return Low
  }
docs: // ReadPin reads the state of a pin