finished the receiver as state machine. Also included an example that shows how to configure timer for input capture. However, it doesn't work on the ASK receivers (they don't trigger the interrupt), I'll have to see why.