/* Get compare value of the specified TMR2 channel.  */
uint32_t TMR2_GetCompareValue(const CM_TMR2_TypeDef *TMR2x, uint32_t u32Ch)
/* Get compare value of the specified TMR2 channel.  */
uint32_t TMR2_GetCompareValue(const CM_TMR2_TypeDef *TMR2x, uint32_t u32Ch)
{
    __IO uint32_t *reg32CMPR;
    DDL_ASSERT(IS_TMR2_UNIT(TMR2x));
    DDL_ASSERT(IS_TMR2_CH(u32Ch));
    reg32CMPR = (__IO uint32_t *)((uint32_t)&TMR2x->CMPAR);
    return reg32CMPR[u32Ch];
}