Modify C template to accept function pointers on init

This allows for a bit more flexibility on the device side, for example,
you could implement platform handlers for USB or USART and decide at
runtime which one to fire up.