/* Enables or disables the TIMER Capture Compare Channel xN.  */
static void timer_ccxn_channel_cmd(TIMER_TypeDef *TIMERx, ald_timer_channel_t ch, type_func_t state)
/* Enables or disables the TIMER Capture Compare Channel xN.  */
static void timer_ccxn_channel_cmd(TIMER_TypeDef *TIMERx, ald_timer_channel_t ch, type_func_t state)
{
    switch (ch) {
    case ALD_TIMER_CHANNEL_1:
        MODIFY_REG(TIMERx->CCEP, TIMER_CCEP_CC1NE_MSK, state << TIMER_CCEP_CC1NE_POS);
        break;
    case ALD_TIMER_CHANNEL_2:
        MODIFY_REG(TIMERx->CCEP, TIMER_CCEP_CC2NE_MSK, state << TIMER_CCEP_CC2NE_POS);
        break;
    case ALD_TIMER_CHANNEL_3:
        MODIFY_REG(TIMERx->CCEP, TIMER_CCEP_CC3NE_MSK, state << TIMER_CCEP_CC3NE_POS);
        break;
    default:
        break;
    }
}