/* Returns either the enabled or raw timer interrupt status. 
This function will return the timer interrupt status. */
uint32_t am_hal_ctimer_int_status_get(bool bEnabledOnly)
/* Returns either the enabled or raw timer interrupt status. 
This function will return the timer interrupt status. */
uint32_t am_hal_ctimer_int_status_get(bool bEnabledOnly)
{
    if ( bEnabledOnly )
    {
        uint32_t u32RetVal;
        AM_CRITICAL_BEGIN_ASM
        u32RetVal  = AM_REGn(CTIMER, 0, INTSTAT);
        u32RetVal &= AM_REGn(CTIMER, 0, INTEN);
        AM_CRITICAL_END_ASM
        return u32RetVal;
    }
    else
    {
        return AM_REGn(CTIMER, 0, INTSTAT);
    }
}