void ButtonIO::update() { int value = digitalRead(_pin); int i = 0; for (; i < 3; i++) { Action &action = _actions[i]; // Is set if (action.pin > -1) { switch(action.type) { case TypePressed: handle_pressed(action, value); break; case TypeHold: handle_hold(action, value); break; case TypeBetween: handle_between(action, value); break; } action.lastState = value; } } }
/* callback called at the end of DVENA pulse */ void ti_fdc_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) { m_DVENA = CLEAR_LINE; handle_hold(); }