Exemple #1
0
inline
uint16_t timer_elapsed(uint16_t last)
{
    uint32_t t;

    uint8_t sreg = SREG;
    cli();
    t = timer_count;
    SREG = sreg;

    return TIMER_DIFF_16((t & 0xFFFF), last);
}
Exemple #2
0
inline bool has_oneshot_layer_timed_out() {
    return TIMER_DIFF_16(timer_read(), oneshot_layer_time) >= ONESHOT_TIMEOUT &&
        !(get_oneshot_layer_state() & ONESHOT_TOGGLED);
}
Exemple #3
0
uint16_t timer_elapsed(uint16_t last)
{
    return TIMER_DIFF_16(timer_read(), last);
}
Exemple #4
0
bool has_oneshot_mods_timed_out(void) {
  return TIMER_DIFF_16(timer_read(), oneshot_time) >= ONESHOT_TIMEOUT;
}