Generating 180 degree phase shifted PWM waves

frequency should be uint32_t here.