Optional gpio input debounce

Well the code was as per above


It uses interrupts on both edges - which then call the callback code which does
image
ie waits for the debounce time then re-reads the pin.