Add pwm set_polarity & get_polarity functions