code: func EdgeDetected(pin Pin) bool {
  	p := uint8(pin)
  
  	// Event detect status register (16/17)
  	edsReg := p/32 + 16
  
  	test := gpioMem[edsReg] & (1 << (p & 31))
  	gpioMem[edsReg] = test // set bit to clear it
  	return test != 0
  }
docs: // EdgeDetected checks whether edge event occured since last call
  // or since detection was enabled
  //
  // There is no way (yet) to handle interruption caused by edge event, you have to use polling.
  //
  // Event detection has to be enabled first, by pin.Detect(edge)