Thanks that was exactly what I was looking for you're very helpful.

Could you explain what the line void(*func)(void) is doing - it's way above my current skill level.