/* This function is used to set whether to inverse the output.  */
int tls_pwm_out_inverse_cmd(u8 channel, bool en)
/* This function is used to set whether to inverse the output.  */
int tls_pwm_out_inverse_cmd(u8 channel, bool en)
{
    if(channel > (PWM_CHANNEL_MAX_NUM - 1))
		return WM_FAILED;
    if (4 == channel)
    {
        if (ENABLE == en)
            tls_reg_write32(HR_PWM_CH4_REG2, tls_reg_read32(HR_PWM_CH4_REG2) |   BIT(0));
        else
            tls_reg_write32(HR_PWM_CH4_REG2, tls_reg_read32(HR_PWM_CH4_REG2) & (~BIT(0)));
    }
    else
    {
        if (ENABLE == en)
            tls_reg_write32(HR_PWM_CTL,    tls_reg_read32(HR_PWM_CTL) |   BIT(2 + channel));
        else
            tls_reg_write32(HR_PWM_CTL,    tls_reg_read32(HR_PWM_CTL) & (~BIT(2 + channel)));
    }
    return WM_SUCCESS;
}