/* This function is used to set the interrupt about the number of period.  */
int tls_pwm_stoptime_irq_cmd(u8 channel, bool en)
/* This function is used to set the interrupt about the number of period.  */
int tls_pwm_stoptime_irq_cmd(u8 channel, bool en)
{
    if(channel > (PWM_CHANNEL_MAX_NUM - 1))
		return WM_FAILED;
    if (4 == channel)
    {
        if (en)
            tls_reg_write32(HR_PWM_INTEN,   tls_reg_read32(HR_PWM_INTEN) |   BIT(4));
        else
            tls_reg_write32(HR_PWM_INTEN,   tls_reg_read32(HR_PWM_INTEN) & (~BIT(4)));
    }
    else
    {
        if (en)
            tls_reg_write32(HR_PWM_INTEN,  tls_reg_read32(HR_PWM_INTEN) |    BIT(channel));
        else
            tls_reg_write32(HR_PWM_INTEN,  tls_reg_read32(HR_PWM_INTEN) &  (~BIT(channel)));
    }
    return WM_SUCCESS;
}