Fix header file dependency and add missing include guards
Limit SYNC timestamps to 16 bits (was missing in some places)
Save one op in PWM_STOP_LOOP synchronisation (in non-triggered mode)
Quick fix for PWM_STOP where under some conditions the low-side was left
enabled (to be tested more thoroughly)