Platform/ECM3532/M3/hw/hal/common/timer/src/timer_hal.c
/**
 * Blocking delay for n ticks
 *
 * @param iTmrCh timer channel
 *
 * @return int 0 on success; error code otherwise.
 */
Blocking delay for n ticks
@param iTmrCh timer channel

@return int 0 on success; error code otherwise.
Blocking delay for n ticks @param iTmrCh timer channel @return int 0 on success ; error code otherwise .
int32_t HalTmrDelay(tHalTmrCh iTmrCh, uint32_t ui32Tick)
{
    const struct sDevTmr *sDev;
    uint32_t ui32Until;
    sDev = TmrGetDev(iTmrCh);
    if (sDev == NULL) {
        return -EINVAL;
    }
    ui32Until = ECM3531TimerCurrTicks(sDev) + ui32Tick;
    while ((int32_t)(ECM3531TimerCurrTicks(sDev) - ui32Until) <= 0);
    return 0;
}
int32_t HalTmrDelay ( tHalTmrCh iTmrCh , uint32_t ui32Tick ) { const struct sDevTmr * sDev ; uint32_t ui32Until ; sDev = TmrGetDev ( iTmrCh ) ; if ( sDev == NULL ) { return - EINVAL ; } ui32Until = ECM3531TimerCurrTicks ( sDev ) + ui32Tick ; while ( ( int32_t ) ( ECM3531TimerCurrTicks ( sDev ) - ui32Until ) <= 0 ) ; return 0 ; }
Blocking delay for n ticks
 @param iTmrCh timer channel
Blocking delay for n ticks @param iTmrCh timer channel