/* This function is used to set whether to inverse the capture input.  */
int tls_pwm_capture_inverse_cmd(u8 channel, bool en)
/* This function is used to set whether to inverse the capture input.  */
int tls_pwm_capture_inverse_cmd(u8 channel, bool en)
{
    if (channel != 0 && channel != 4)
        return WM_FAILED;
    if (channel == 0)
    {
        if (ENABLE == en)
            tls_reg_write32(HR_PWM_CTL,  tls_reg_read32(HR_PWM_CTL) | BIT(25));
        else
            tls_reg_write32(HR_PWM_CTL,  tls_reg_read32(HR_PWM_CTL) & (~BIT(25)));
    }
    else
    {
        if (ENABLE == en)
            tls_reg_write32(HR_PWM_CAP2CTL, tls_reg_read32(HR_PWM_CAP2CTL) |   BIT(0));
        else
            tls_reg_write32(HR_PWM_CAP2CTL, tls_reg_read32(HR_PWM_CAP2CTL) & (~BIT(0)));
    }
    return WM_SUCCESS;
}