Added a custom wait function to enable interrupts

Fork of m3pi by Chris Styles

m3pi.h/shortlog@4b7d6ea9b35b: not found in manifest