PWM Code to for mosfet gate

Using phase and frequency correct PWM mode the channel pulses occur centered around counter overflow. Invert one channel output and both signals are off by 180°. You only have to adjust the duty cycle of the inverted channel to 100-x % for identical pulse width.