/* Configures the TIMER in Slave mode in interrupt mode.  */
ald_status_t ald_timer_slave_config_sync_by_it(ald_timer_handle_t *hperh, ald_timer_slave_config_t *config)
/* Configures the TIMER in Slave mode in interrupt mode.  */
ald_status_t ald_timer_slave_config_sync_by_it(ald_timer_handle_t *hperh, ald_timer_slave_config_t *config)
{
    assert_param(IS_TIMER_INSTANCE(hperh->perh));
    assert_param(IS_TIMER_SLAVE_MODE(config->mode));
    assert_param(IS_TIMER_TS(config->input));
    assert_param(IS_TIMER_CLOCK_POLARITY(config->polarity));
    assert_param(IS_TIMER_ETR_PSC(config->psc));
    assert_param(IS_TIMER_IC_FILTER(config->filter));
    __LOCK(hperh);
    hperh->state = ALD_TIMER_STATE_BUSY;
    timer_slave_set_config(hperh, config);
    ald_timer_interrupt_config(hperh, ALD_TIMER_IT_TRIGGER, ENABLE);
    ald_timer_dma_req_config(hperh, ALD_TIMER_DMA_TRIGGER, DISABLE);
    hperh->state = ALD_TIMER_STATE_READY;
    __UNLOCK(hperh);
    return ALD_OK;
}