Added functions to write inverted PWMs.