modified gpio handover, works for 10kHz :'-(