Option (currently commented out) for using an inverse cosine PWM waveform (not really an improvement though).
Working version of sinus-waveform for motor control.
Modify with a #define USE_DISCOVERY_BOARD, to use the standard STM32F4
Discovery board.