/* Function for creating a timer user id from the current interrupt level.  */
static timer_user_id_t user_id_get(void)
/* Function for creating a timer user id from the current interrupt level.  */
static timer_user_id_t user_id_get(void)
{
    timer_user_id_t ret;
    STATIC_ASSERT(APP_TIMER_INT_LEVELS == 3);
    switch (current_int_priority_get())
    {
        case APP_IRQ_PRIORITY_HIGH:
            ret = APP_HIGH_USER_ID;
            break;
        case APP_IRQ_PRIORITY_LOW:
            ret = APP_LOW_USER_ID;
            break;
        default:
            ret = THREAD_MODE_USER_ID;
            break;
    }
    return ret;
}